Problem: Only the worktree-allocator has a dedicated test for concurrent-process collisions — portfolio-queue and claim-ledger atomicity are only exercised per-function, not under real concurrent load from two actual processes.
Area: AMS / Testing
Proposal: Add an integration test that spawns two real processes racing the same portfolio-queue/claim-ledger files and asserts no double-claim or corruption occurs.
Deliverables:
- A real, passing concurrent-process test for both stores.
Scope note: this issue is limited to adding a test harness that spawns two real processes and asserts the existing portfolio-queue/claim-ledger atomicity holds (no double-claim, no corruption). It does not include changing the claim-conflict resolution logic itself (who wins a race) -- if this test uncovers a real race/corruption bug in that logic, the fix must be filed as a separate maintainer-only issue, not folded into this PR.
Problem: Only the worktree-allocator has a dedicated test for concurrent-process collisions — portfolio-queue and claim-ledger atomicity are only exercised per-function, not under real concurrent load from two actual processes.
Area: AMS / Testing
Proposal: Add an integration test that spawns two real processes racing the same portfolio-queue/claim-ledger files and asserts no double-claim or corruption occurs.
Deliverables:
Scope note: this issue is limited to adding a test harness that spawns two real processes and asserts the existing portfolio-queue/claim-ledger atomicity holds (no double-claim, no corruption). It does not include changing the claim-conflict resolution logic itself (who wins a race) -- if this test uncovers a real race/corruption bug in that logic, the fix must be filed as a separate maintainer-only issue, not folded into this PR.