Add win-fix-transaction-logs - #150
Edwin Bernal Microsoft (EdwinBernal1) merged 7 commits into
Conversation
Clears exhausted Common Log File System transaction logs on an offline disk, so servicing that fails with ERROR_LOG_FULL (0x800719e4) can run again.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf64bab1-6099-4e7e-aef4-57ffea10ce6b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf64bab1-6099-4e7e-aef4-57ffea10ce6b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf64bab1-6099-4e7e-aef4-57ffea10ce6b
Automated review using the supplied PR Review AgentReviewed head: 80dfd983eae6b06b5398d47f6df804536f1442ac This is the supplied agent's static analysis, not a maintainer decision or a fresh repair/boot test. Findings have not been independently reproduced. No source or Azure resources were changed during review. The original report is retained locally; only leading process narration and local prompt-path provenance were normalized for posting. Finding text is unchanged. Full automated review reportPR Review: #150 — Add win-fix-transaction-logsGenerated: 2026-09-10 Scope reviewed: the two changed files pinned in the review packet ( FindingsCritical
Warning
Info
Standards checks that pass (verified against the source, not assumed): init sourcing at L117 matches the documented convention; Operational Risk Assessment
Overall Risk: Medium 🟡 ValidationDeterministic checks below were performed by the launcher and recorded in the review packet; I did not re-execute them. I did independently assess the corresponding source.
Not performed in this review: no repair, boot, disk, registry-hive or Azure testing of any kind. No script was executed, no disk mounted, no hive loaded. Findings are derived from reading the pinned snapshots. The one finding carrying environmental uncertainty (drive-safe paths) is labelled as such with a proposed validation. Recommendationrequest changes Two Critical findings should be resolved before merge. Both are localized and neither requires redesigning the repair logic:
The Warning items — The underlying repair is well-constructed: correctly separated from This is an automated review, not a human maintainer approval. Provenance
|
Addresses the PR150 review findings.
- A manifest that cannot be written now fails the run instead of being
ignored. The manifest is staged and read back before it is published, so
a partially written file can never be presented as a usable undo record.
- A malformed, empty or unreadable manifest is refused rather than being
treated as "nothing to revert".
- detectOnly and revert are strictly non-mutating.
- Manifest paths are built drive-safely, so a stale offline drive letter
cannot throw during cleanup.
- The main flow follows the helper caller contract: a top-level finally
that releases discovery-owned drive letters and flushes the buffered
helper log, with the status returned after that cleanup.
Validated with the local mocked harness (44 checks, no registry, disk or hive
access) and the log-ordering audit. The Azure create/run/restore acceptance
cycle was performed previously against the pre-review script.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Review findings implementedPublication head: d3cc62da241455db812067c9ebacc923ce9e9279 The earlier automated report remains a static review of
Testing scope, stated plainly: these changes were validated with the local mocked harness Original review provenance
|
Edwin Bernal Microsoft (EdwinBernal1)
left a comment
There was a problem hiding this comment.
Reviewed the current head after the prior destructive-operation findings were addressed. The removal plan is bounded to the selected transaction-log scope, backup and hash verification occur before deletion, manifest publication is staged and verified, and failed post-delete verification triggers rollback while preserving recovery state. Conflicting detect/revert modes fail early, and the catalog entry matches the script. I found no new blocking issue.
Residual validation gap: only the CLA check is reported by GitHub. This was a static review; I did not induce ERROR_LOG_FULL or exercise delete/rollback against an attached customer-equivalent disk.
VMRepairMint automated test results — PR #150
TL;DR✅ Grade A (80/100), 4/4 quorum met (100 %), all 4 configurations validated end-to-end against real fault injection. Ready to merge from a functional standpoint. Sole recoverable score gap is telemetry coverage (38.8 %). Subscription used: 1. Test scope
Configurations run
Configurations excluded (subscription-level constraint, not script defect)
Please re-run on a subscription with CVM quota / PremiumV2 image-create support if these axes need explicit coverage. 2. Fault-injection evidence (per configuration, inline)Every VM was corrupted with
Summary
The framework-measured duration includes Azure Guest Extension install on cold-start VMs (2–5 min is typical); the actual breaker logic completes in under 1 s in every case. Config 1 — full breaker stdout (WS2022 Standard)Config 2 — breaker stdout tail (WS2022 TL + Encryption at Host)Config 3 — breaker stdout tail (WS2016 Gen1 + ADE)Config 4 — breaker stdout tail (WS2019 Cross-Gen + ja-JP locale)Breaker script source (final v2, 331 lines) — click to expandFault mechanism: append 38 synthetic 3. Repair-execution evidence (per configuration, inline)Each config: source VM was stopped → OS disk snapshotted → snapshot copy attached to a shared rescue VM → the PR-head repair script was executed inline via Config 1 — repair stdout (WS2022 Standard, Standard_D2s_v5, Premium_LRS)Config 2 — repair signals (WS2022 TL + EAH)Config 3 — repair signals (WS2016 Gen1 + ADE)Config 4 — repair signals (WS2019 Cross-Gen + ja-JP)Command line invoked (identical across all 4 configs, differs only by VM name and RG): az vm run-command invoke \
--resource-group vmrepair-env-win-fix-transaction-logs-shared-20260917005138 \
--name rescue-d625e2 \
--command-id RunPowerShellScript \
--scripts @<inline PR-head script + bootstrapped `.\src\windows\common\...` helpers> \
--parameters "Force=false" "detectOnly=false" "scope=TxR" "revert=false" \
--subscription d4895902-76c8-43c7-be78-f27ef254ebebRepair script exit signal on every config: 4. Static analysisCode Quality — PSScriptAnalyzer 100/100 (A+)
Header validator — 52/100 (F), but this is a validator false-positive on this scriptThe header-doc validator ( The actual script header at lines 1–110 uses the alternative valid PowerShell convention of a
So the F grade is a validator gap (only recognizes Telemetry coverage — 38.8 % (3/8 deep-analysis emission points instrumented)Deep-analysis breakdown (from the AST walk in
Note: The analyzer labels these "empty or minimal catch" because it looks for structured dimensions (
5. Scoring breakdown
20 points recoverable — all from telemetry instrumentation on the five listed catch blocks. 6. Recommendations for the PR author (actionable)High-impact (recovers 20 score points if adopted):
Nice-to-have (no score impact, robustness only):
Not recommended to change:
7. Test reproducibilityAnyone with access to a subscription that has Standard/TrustedLaunch WS2016/2019/2022 quota can reproduce this run bit-for-bit: # Pin PR-head SHA (bypasses any subsequent PR force-pushes)
python Scripts/test_vmrepair_script.py win-fix-transaction-logs \
--source pr --pr 150 \
--pr-head-sha d3cc62da241455db812067c9ebacc923ce9e9279 \
--subscription <YOUR_SUB_ID> \
--strategy representative \
--with-breaker --rescue-mode \
--only-configs 1,2,4,6Quorum threshold at N=4 is 4/4 = 100 % ( 8. Framework caveats discovered during this cycleDisclosed for transparency so the PR author knows the boundaries of what was validated. None of these invalidate the pass verdict — every claim above is backed by inline stdout evidence from the repair script itself, not by the affected validators. List of six framework bugs (click to expand)
Metadata
|
a1eb743
into
Azure:main
What this adds
win-fix-transaction-logs- one scenario script and its ownmap.jsonentry.Clears exhausted Common Log File System transaction logs on an offline disk, so servicing that fails with ERROR_LOG_FULL (0x800719e4) can run again.
The catalog entry a support engineer reads when choosing it:
How it works
Runs against the broken OS disk attached to a rescue VM by "az vm repair create".
It looks for
ERROR_LOG_FULLevidence in the offline CBS logs, then builds a bounded removalplan for the selected scope. TxR is the default; Config/SMI require an explicit scope choice.
force=trueis an explicit override for cases where local evidence has rolled out of the logs.Before deletion, the helper verifies capacity and captures a backup with original hashes,
security descriptors and attributes. It checks the resulting file set and rolls back if
verification fails. The revert manifest persists those verified records, so a later restore
can reject a modified or unverifiable backup. Failed or partial restores return error and
retain the manifest for retry.
Parameters
detectOnlyscopeforcerevertwindowsDriveConventions followed
.\src\windows\common\setup\init.ps1and returns$STATUS_SUCCESSor$STATUS_ERROR.Write-Host.az vm run-commandkeeps only the last 4096 characters of the output stream, so a summary printed first is the first thing a long run loses.Testing
Historical acceptance: this scenario is included in the recorded completed
az vm repair run --previewproduct-path batch. This publication does not repeat the fullcreate/run --preview/restorecycle.September 10 removal/consumer coverage: 66/66 removal regressions and 57/57 consumer
regressions passed on both PS5.1 and PS7. Native Gen1/Gen2 volume checks exercised capacity,
backup tampering, automatic rollback and exact ACL/attribute restoration.
An additional native run executed the real manifest writers and both removal consumers'
revert entry points: 22 assertions through four processes on a disposable attached VHD.
This script returned
STATUS_ERRORfor a same-size modified backup, retained its manifest,and completed a verified retry once the original backup was restored. Those fixtures used
synthetic files/hives; they are not a fresh full Windows scenario acceptance matrix.
Series
First wave of four independent scenario PRs, and the first planned upstream consumer of
Invoke-OfflineRemovalPlan. The shared helpers in #143, #146 and #147 are already merged.This PR adds no helper files and changes no existing scenario; its only existing file change
is appending this run-id to
map.json, preserving every upstream entry.