Skip to content

Tolerate a locked harness executable when MP contracts clean up - #201

Open
akacross wants to merge 1 commit into
themuffinator:mainfrom
akacross:ci/windows-arm64-harness-cleanup
Open

akacross wants to merge 1 commit into
themuffinator:mainfrom
akacross:ci/windows-arm64-harness-cleanup

Conversation

@akacross

Copy link
Copy Markdown
Contributor

Fixes the remaining Windows ARM64 failure in the native test step (openq4-imported-game-regressions, 71/74).

Cause

With the diagnostics #200 added, the Windows ARM64 logs (commit and push runs) show that all three failing contracts (mp_match_authentication_contract.py, mp_match_pause_contract.py, mp_match_teams_contract.py) finish their checks, then fail while TemporaryDirectory cleans up:

PermissionError: [WinError 5] Access is denied: '...\.tmp\match-teams-97qsdvc9\match_teams_contract.exe'

So the harness executable each contract has just run is still locked when Python deletes it. The failure isn't in the checks themselves, and the same contracts pass on Linux and Windows x64. These are the contracts that build and run their own native harness on Windows. locate_msvc() selects the x64 toolset (-arch=x64), so on an ARM64 runner the harness may be running under emulation, which could keep the file open briefly after exit. That's a plausible cause, but I haven't confirmed it.

Fix

Their temporary directories pass ignore_cleanup_errors=True, so a leftover executable in .tmp no longer fails a passing check. A failing check still fails the test. On Linux all three still pass and leave nothing behind. The check logic is unchanged.

Building the harnesses natively for ARM64 would also avoid any emulation, but I couldn't test an ARM64 toolchain change here, so I've left it out.

Not verified

I don't have a Windows ARM64 machine, so this PR's own CI is the first real test of it.

🤖 Generated with Claude Code

On the Windows ARM64 runners, mp_match_authentication_contract.py,
mp_match_pause_contract.py and mp_match_teams_contract.py complete their
checks and then fail in TemporaryDirectory cleanup: deleting the harness
executable they just ran raises PermissionError (WinError 5). The
imported game regression suite therefore reports 71/74, failing the
Windows ARM64 native test step on main and every PR.

Their temporary directories now pass ignore_cleanup_errors=True, so a
leftover file in .tmp no longer turns a pass into a failure. Failures in
the checks themselves still fail the test. Linux runs are unchanged and
still remove everything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@themuffinator themuffinator left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed. This changes only cleanup: ignore_cleanup_errors=True drops the WinError 5 raised while the temporary directory is deleted, and a check that fails still raises inside the with block. CI installs Python 3.x, which is newer than the 3.10 this parameter needs. I'll merge this once #202 has made the script smoke job green and this branch has been brought up to date.

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