Repository navigation
Description
Priority: P2. Baseline: v0.4.3, 543b661f64f65f65154e3322847be1756deb778e.
Evidence and limits
This is a source-confirmed revalidation gap, not a dynamically reproduced unsafe termination. Final inspection and owner lock-set comparison precede the final transcript hash. The last resample checks start time and native lock evidence, but does not repeat the owner lock set or transcript snapshot.
The existing extra-lock test mutates before final inspection. It does not exercise acquisition during final hashing. The race matrix describes this boundary's partial resampling.
Problem
An owner could acquire another thread lock during the final hash; a transcript could append after that hash while the asynchronous process sample completes. The last checks would not observe those particular changes. Post-signal verification may detect a changed transcript, but detection after termination does not satisfy pre-signal refusal. Whether real Codex performs these transitions in this window remains unverified.
Acceptance criteria
- Recheck the exact single-element owner lock set after final hashing. Unknown, changed, or unavailable evidence must refuse with zero SIGTERM.
- Compare a safe synchronous transcript snapshot as late as practical, after awaited process evidence and before the final guarded probe. Refuse snapshot changes or observation failures. Retain regular-file, identity, and stable-hash protections.
- Preserve no await, spawn, or asynchronous retry between the final guarded probe and
process.kill; release the native guard before signaling. Lock order remains operation lease, native guard, then thread probe. - Add deterministic barriers for extra-lock acquisition during final hashing and transcript append after hashing during process sampling. Use synthetic owners with real advisory locks; assert refusal, null signal, and an untouched owner before cleanup. Retain a successful unchanged-owner control and the existing guard-boundary checks.
- Update the race matrix and JSON documentation to distinguish these checks from residual races. They narrow independent-writer windows; they cannot make transcript and lock-set observations atomic with signaling.
Related history: closed #9, #10, and #24 cover revalidation races. Closed #55 constrains the native coordination boundary. This issue adds coverage for a later observation window rather than claiming those previous fixes failed.
Activity