Skip to content

test(windows): stabilize root marker race evidence - #3872

Merged
M4n5ter merged 2 commits into
apache:mainfrom
liugddx:fix/windows-root-marker-race-fixture
Aug 26, 2026
Merged

test(windows): stabilize root marker race evidence#3872
M4n5ter merged 2 commits into
apache:mainfrom
liugddx:fix/windows-root-marker-race-fixture

Conversation

@liugddx

@liugddx liugddx commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

Close the remaining deterministic Windows root-initialization race failure found while validating #2624.

  • matches the child fixture's unique temporary marker basename instead of requiring the opened path to share the exact realpath string spelling;
  • keeps the interception before the dynamic authority import, so production marker I/O remains bound and immutable;
  • adds the exact race to required windows_recovery with a strict 1 test / 1 pass / 0 skip assertion;
  • pins the workflow step, test pattern, file, and counts in the repository-control test.

Why

The first post-#3789 full Windows baseline on byte-identical main@32a1db0eb reproduced one deterministic failure in both the focused Storage gate and the complete Storage suite:

  • fork full baseline run
  • focused Storage: 87 passed / 1 failed / 12 skipped;
  • complete Storage: 939 passed / 1 failed / 38 skipped;
  • failure: initialization race fixture reported resolved while waiting for marker_open_pending.

The child fixture compared the opened temporary path against a realpath-derived parent prefix. Windows can expose equivalent parents with different long/short, namespaced, case, or canonical spellings. This child performs exactly one root initialization, so the marker filename uniquely identifies the intended open cut without relying on parent spelling.

All other baseline groups passed: install/build, CLI and Electron smoke, Runtime PTY 3/3, PowerShell UTF-8 2/2, the remaining Storage path/lock gates, and residual-process audit.

Verification

Local Windows, Node 24:

  • focused root replacement race: 20 consecutive passes;
  • marker suite: 7 passed, 0 failed;
  • strict workflow-equivalent root gate: 1 test / 1 pass / 0 skip;
  • CI planner and Windows harness: passed, including the new workflow contract;
  • Core/Storage builds, lint, format, and git diff --check: passed.

Hosted exact-head windows_recovery passed and directly executed the new root race step. Hosted test also passed.

Three consecutive fork full-baseline runs on this exact head are clean: run 1, run 2, and run 3. Each reports focused Storage 88/0/12, full Storage 940/0/38, empty residual-process evidence, and successful PTY/UTF-8/smoke steps.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool and scope: Codex inspected the full Windows baseline artifact, isolated the path-spelling-sensitive fixture cut, implemented the fixture and workflow contract changes, and ran the listed local gates.

Refs #2624. Refs #2142.

Checklist

  • Tests cover the exact failure and fail if the gate disappears
  • Lint, format, affected builds, and focused Windows tests pass locally
  • Hosted test and windows_recovery pass on exact head 6dae318b9

Does this PR entail a change in behavior?

  • Yes
  • No - this changes a race fixture and its required Windows evidence only.

@liugddx

liugddx commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@Astro-Han Exact-head est and windows_recovery are green. The hosted Windows job directly ran the new root initialization replacement race step as 1 test / 1 pass / 0 skip. Local focused evidence is 20 consecutive passes. Please review when available.

@M4n5ter
M4n5ter force-pushed the fix/windows-root-marker-race-fixture branch 2 times, most recently from eed5e6d to 78e4c95 Compare August 26, 2026 09:44
@M4n5ter
M4n5ter force-pushed the fix/windows-root-marker-race-fixture branch from 78e4c95 to e354489 Compare August 26, 2026 09:52

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed exact head e354489615c9940c56d6a99600cb47586d83043d and found no P0–P3 issues.

The fixture now keys the interception on the unique marker basename instead of one particular full-path spelling. That is appropriately bounded: the child performs one root initialization, and production still constructs the temporary marker under that root with the same marker filename plus a process ID and UUID. This removes the Windows long/short, namespaced, and case-spelling dependency without changing production authority or state.

The dedicated Windows workflow step also proves that exactly one matching test ran and passed with none skipped. The workflow contract test protects that evidence from being silently removed or broadened.

Validation on this head:

  • exact-head hosted test and windows_recovery checks completed successfully;
  • Storage and Core builds passed;
  • the focused race test passed exactly 1/1 with 0 skipped;
  • the complete root-authority suite passed 28 tests with 3 platform-specific tests skipped and no failures;
  • all 39 CI workflow contract tests passed;
  • Biome and git diff --check passed;
  • the current-main merge tree is clean and preserves all three reviewed files byte-for-byte.

Posted by an automated review agent operated by @M4n5ter. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.

简体中文

本条评论由 @M4n5ter 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。

@M4n5ter
M4n5ter merged commit 235a12d into apache:main Aug 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants