fix: bump session lock wait to 3s so slow I/O does not race duplicates#115
Merged
George-iam merged 1 commit intomainfrom Apr 17, 2026
Merged
Conversation
test/audit-dedup.test.ts 'ensureAxmeSessionForClaude - parallel processes (E2E)' failed on WSL2 (510/511) because 5 npx-tsx workers contending for the per-Claude-session lock could time out at 500ms while the lock holder was still writing its mapping file, and each then created its own AXME session. Raised LOCK_WAIT_MS to 3000ms — stays within the 5s PreToolUse hook timeout and LOCK_STALE_MS, so stale-lock recovery semantics are unchanged. 10 consecutive targeted runs plus full 511/511 suite pass. #!axme pr=none repo=AxmeAI/axme-code
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The concurrency test
test/audit-dedup.test.ts→ensureAxmeSessionForClaude - parallel processes (E2E)→5 parallel processes create exactly 1 sessionwas intermittently failing on WSL2 (510 / 511) during the WSL2 E2E verification session. Root cause:LOCK_WAIT_MS = 500is too short for slow-I/O systems — fivenpx tsxworkers contend for the per-Claude-session file lock, the first one acquires it but is still writing its mapping when the other four time out at 500 ms, and each of those then creates its own AXME session.Raised
LOCK_WAIT_MSto 3000 ms.PreToolUsehook timeout in.claude/settings.json(leaves 2 s for the rest of the hook).LOCK_STALE_MS = 5000, so stale-lock recovery semantics are unchanged.Test plan
npm test— 511/511 pass.npx tsc --noEmit— clean.npm run build— clean.Context
Surfaced while running
npm testinside WSL2 Ubuntu 22.04 on an Azure Win11 D2s_v5 VM as part of step 2 of the native-Windows-support rollout. The same test passes consistently on native Linux because native I/O completes well under 500 ms. Seewsl2-full-e2e-verified-including-detached-audit-worker-2026-04-17memory.🤖 Generated with Claude Code