Skip to content

fix: harden final signal checks and failure evidence - #105

Merged
abruption merged 1 commit into
mainfrom
abruption/fix-96-97-signal-evidence
Oct 7, 2026
Merged

abruption merged 1 commit into
mainfrom
abruption/fix-96-97-signal-evidence

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

  • Repeat the owner's exact single-thread lock set after the final transcript hash; unknown or changed evidence refuses before signaling.
  • After the awaited process sample, synchronously validate the transcript through a nonfollowing, nonblocking regular-file descriptor tied to the expected path and snapshots. Close it before the final native guard and signal; cleanup failures refuse.
  • Preserve zero await/spawn/retry between the final guarded probe and SIGTERM, release the native guard before signaling, and retain lease -> native guard -> thread probe ordering.
  • If the SIGTERM attempt throws, report unavailable exit evidence as processExited: null, preserving null signal, unchanged state, failure outcome, and reason within JSON v1.
  • Document the new late checks and the residual non-atomic observation/signaling windows.

Validation

On macOS arm64 / Node 24.16.0:

  • npm ci, npm run check, npm run lint, npm test, npm run smoke:package: passed.
  • Full suite: 189 tests, 188 passed, 1 existing case-sensitive-filesystem skip, 0 failures.
  • Dedicated plus native-coordination tests: 36 passed, including existing native-guard release/no-microtask and busy refusal cases.
  • New deterministic real advisory-lock cases cover an extra lock acquired during final hashing, a transcript append during the late process sample, unchanged control, failed evidence, symlink/directory replacement, actual descriptor cleanup failure, and ESRCH/EPERM signaling exceptions. Refusal cases assert zero SIGTERM and owner survival before cleanup; results validate against JSON v1.
  • New barrier waits are bounded and fail if the unlock completes before the expected test phase.
  • git diff --check: passed.

No actual Codex session was signaled or native user home modified. Repeated observations narrow race windows; they do not make lock-set/transcript observations atomic with signaling.

PR grouping

#96 and #97 are intentionally grouped: both change the same unlock executor and use the same exact-owner/real-lock/JSON evidence regression harness. A single review can check the pre-signal boundary and failed-signal output together. This PR is independently based on main, not stacked on the macOS classification or CODEX_HOME PRs.

Fixes #96.
Fixes #97.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T05:01:08.771869Z 49a479d PR opened
🔒 Security Review ✅ Completed 2026-10-07T05:02:21.063295Z 49a479d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abruption

Copy link
Copy Markdown
Owner Author

Combined-candidate validation also passed, without merging or publishing anything.

The candidate contains exactly the changes from #103 (0b7ecf5), #104 (d7dc716), and #105 (49a479d). All 12 changed file blobs match their source branches; there were no cherry-pick conflicts or extra changes.

On macOS arm64 / Node 24.16.0:

  • npm ci, npm run check, npm run lint, npm test, npm run smoke:package, and npm run smoke:platform passed.
  • Combined suite: 218 tests, 217 passed, 1 existing filesystem-dependent skip, 0 failures.
  • Refusal and signal regressions use isolated fixtures and real advisory locks; no actual Codex session was signaled or native user home changed.

All three PRs remain open. Integration validation is not merge approval, and Codex reviews must cover each latest HEAD before any merge decision.

@abruption
abruption merged commit 3b50921 into main Oct 7, 2026
23 checks passed
@abruption
abruption deleted the abruption/fix-96-97-signal-evidence branch October 7, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant