paneflow icon indicating copy to clipboard operation
paneflow copied to clipboard

Windows: agent_commits_never_hit_index_lock_while_probes_run fails with OS error 1224 (quarantined)

Open arthjean opened this issue 1 month ago • 1 comments

git_command::tests::agent_commits_never_hit_index_lock_while_probes_run (paneflow-app::bin/paneflow) fails intermittently on the Windows x86_64 leg, and runs past 60 s in nearly every Windows run.

Signature: edit: Os { code: 1224 } (a user-mapped section is open) at src-app/src/git_command_tests.rs.

Rate: 6 failures in 157 exposed Windows attempts between 2026-09-28 and 2026-11-02 (4 %), 3 of them hidden by the old whole-suite retry loop; 314 slow-test notices in the same window. Examples: runs 41329301310, 41179820663.

Hypothesis: a concurrent git probe memory-maps the file the test rewrites, and Windows refuses a write that truncates a mapped file. Serializing the probe with the edit, which is what the test claims to prove, would make the failure impossible; retrying the write on 1224 would only hide it.

Repro (Windows): cargo nextest run --locked -p paneflow-app -E 'test(=git_command::tests::agent_commits_never_hit_index_lock_while_probes_run)' in a loop.

The test is quarantined in .config/nextest.toml (2 retries, reported as a warning) until this is fixed. Refs the CI hardening PRD, US-010.

arthjean avatar Nov 03 '26 10:11 arthjean

Fixed by #125 (12b50b850), green on run_tests 41904266092. The test's edit was a truncating std::fs::write that raced git diff --shortstat, which maps the worktree file it diffs; Windows refuses to truncate a file with a user-mapped section open (os error 1224). The edit is now staged outside the repository and renamed over tracked.txt, and the test left the quarantine. The product side (an agent's own truncating write can hit the same error) is tracked in #124.

arthjean avatar Nov 04 '26 20:11 arthjean