fix(windows): make recovery evidence authoritative #3789
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.75) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 647 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.387
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #3789"
general
weight: 0.35
liugddx
Summary
This PR advances #2624 and the Windows support plan in #2142 by making the native recovery check eligible for branch protection and removing two deterministic failure groups from the Windows baseline.
windows_recoveryon every pull request andmainpush;windows_recoverybesidetestin the ASF-managed required status checks and locks the workflow/config relationship with a CI contract;fs.promises.openintrinsic at module initialization, while the Node 24 Windows initialization-race fixture patches it before dynamically importing the authority;fsutil file queryStreamscall with one bounded Windows stream query fed by Node's no-reparse tree walk;FindFirstStreamW/FindNextStreamW, including Win32 namespaced paths for long-path compatibility;Runtime PTY cleanup is intentionally excluded because another contributor has already claimed that slice on #2624. The remaining Git fixture cleanup and symlink-permission inventory are also not folded into this PR.
Why the ADS change is needed
fsutil file queryStreamsis not a supported subcommand on the current developer Windows build or the GitHub hosted runner. Normal dependency trees therefore failed before their receipt could be verified. The previous ADS test matched the words "alternate data stream" in the query-failure diagnostic, so it passed without proving a named stream had been observed.The replacement keeps traversal in Node, rejects reparse points before the external query, and sends a JSON array over stdin to one bounded Windows PowerShell 5.1 process. The process hosts the documented Win32 stream enumeration APIs because the PowerShell 5.1 provider does not enumerate directory streams. Only
ERROR_HANDLE_EOFis accepted as no streams; other API and process failures reject the environment. Regressions now prove exact named-stream rejection for a regular file, the published dependency root, and a nested directory.Verification
Local Windows, Node 24.19 for platform-sensitive tests:
npm run windows:inventory: current, 64 declarations;git diff --check: passed.Hosted exact-head evidence:
windows_recovery: passed, including the strict UTF-8/non-ASCII managed-dependency ADS gate (3 tests / 3 pass / 0 skip), followed by every recovery step;test: all steps through Runtime Host passed, then the independent prompt-rail virtualization timing issue #3862 failed Desktop e2e (65 passed, 1 failed, 1 skipped). The separate fix #3863 is exact-head green, including the full Desktop e2e suite.The post-merge #3788/#3790 blockers were repaired by merged #3796. The overlapping schema-constructor handle fix is inherited from
mainand no longer appears in this PR diff. The marker P2 is closed by commit917e3d110; the fixture binding clarification is in648585896; the strict ADS gate is in4645cec9c; the UTF-8 pipe fix is inb98f3b329.Administration boundary
.asf.yamlis the repository's declarative branch-protection authority. After merge, ASF infrastructure must apply the updatedmainprotection sowindows_recoveryis actually required. The workflow now reports that stable context on every PR and main push, so enabling it cannot leave unrelated PRs permanently pending.AI use
Tool and scope: Codex traced recent Windows baseline artifacts, reproduced the system API and handle failures on Windows/Node 24, implemented the storage and workflow changes, and ran the listed local gates.
Refs #2624. Refs #2142.
Checklist
windows_recoverypasses on headb98f3b329with strict UTF-8/non-ASCII ADS evidencetestpasses; currently blocked only by independent #3862, fixed in green #3863Does this PR entail a change in behavior?
windows_recoveryreturns to PR/main and becomes a required context; Windows storage validation now uses supported Win32 ADS enumeration for files and directories plus a portable marker-race interception boundary.