Repository navigation
test(lock): make stress assertions deterministic - #106
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 7:57 PM ET / 23:57 UTC. ClawSweeper reviewWhat this changesThe PR replaces a timing-dependent file-lock stress assertion with a gated throwing holder and explicit checks for mutual exclusion, lifecycle balance, timeout failures, lock-file removal, and manager cleanup. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 2 items remain Keep this PR open: it is not on current Priority: P3 Review scores
Verification
How this fits togetherThe file-lock subsystem coordinates exclusive access to filesystem paths via sidecar lock files and in-process manager state. Its stress tests start many local contenders and child processes, then verify that critical sections do not overlap and all lock state is released. flowchart LR
A[In-process contenders] --> C[File lock manager]
B[Child processes] --> D[Sidecar lock files]
C --> D
D --> E[Exclusive critical section]
E --> F[Entry and exit events]
F --> G[Cleanup assertions]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the deterministic lifecycle assertions and add a redacted terminal transcript showing the focused stress test completing successfully after this patch. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR improves deterministic regression coverage rather than reporting a separate user-facing failure. The source clearly establishes the in-process and cross-process contention paths it exercises. Is this the best way to solve the issue? Yes: gating one deliberate throwing holder makes its acquisition and cleanup path deterministic while retaining checks for mutual exclusion, timeout shape, sidecar deletion, and manager cleanup. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 94d76c315247. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
The 16 child-process events remain exact by protocol: the parent only inspects the log after all eight children exit successfully, and each successful child writes one
enterand oneexitevent.Testing
pnpm exec vitest run test/file-lock-concurrency-stress.test.ts --reporter=dotpnpm checkpnpm test:securitygit diff --checkNo changelog entry because this is test-only.