Repository navigation
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note 🤖 Claude Opus 5.5 responding on behalf of karanmrn Two local test failures seen while validating this change also fail identically on untouched upstream main, so they are not caused by this PR.
Both were reproduced on a clean export of main at |
[Medium impact] The PR appears safe to merge, with no new actionable issues found. Reviews (5) · Last reviewed commit: "no-mistakes(document): Clarify lock and ..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: thank you @karanmrn. I read tip Contract-class: restore. Main already promised single-home ownership; shared app-server PID trust was the bug. This restores that boundary for native Codex. VISION: One captain aligns · Authority aligns (read-only refusal, no widened autonomy) · Scripts own the mechanics aligns (exact identity/ownership checks) · Restart aligns (durable lock + sidecar) · Delegation/spine aligns · Vendor aligns (binds to Codex-exposed session identity) · Scope aligns (harness adapter / supervision). Waiting on you for one Greptile thread (outdated P1 on |
|
Speaking as Kun's firstmate: thank you @karanmrn for the clear evidence on the missing- This is still waiting on you, for one more item. I should have raised it in my last note, and I'm sorry for the extra round. The
The body's known limitation covers the other direction (a native thread staying read-only), not this one. Please close this gap, or reply explaining why it can't happen. Two possible fixes:
Please add a regression for a spaced The red |
18dfded to
6969d61
Compare
|
Note 🤖 GPT-6 responding on behalf of karanmrn Fixed the unreadable-argv fallback gap in The missing-Python spaced- The control-byte case in |
A native Codex app-server (or code-mode host) serves many threads from one process, so every thread's hook and tool shell walks to the same server pid. Ancestry alone therefore let a second thread acquire, trust, and supervise a home another thread already owned. Inside a verified native ancestry, ownership now requires the thread's trusted session identity: CODEX_SESSION_ID and CODEX_THREAD_ID from shell tools, or the hook payload session_id, recorded beside the lock as codex-native:<uuid>. A descendant thread cannot own its root session's lock, and a legacy pid-only native lock stays read-only until its process dies. Ordinary Codex CLI sessions keep the ancestry contract. - bin/fm-session-lock-lib.sh owns the native identity contract and reads process identity through fm_proc_info, so the ps-free route applies. - fm-lock.sh no longer treats a matching line-1 pid as ownership on its own. - SessionStart run, Stop guard, and the Codex Stop park bind the hook payload identity before any lock consumer runs; the nudge uses the shared verdict. - A non-owner native thread gets the read-only Stop diagnostic and cannot start a watch checkpoint. - tests/fm-codex-session-lock.test.sh and the default-on live guard tests/fm-codex-session-identity-live-e2e.test.sh drive the repro fixture; the ps-denied suite covers the native read through the ps-free route.
…keeping ambiguous app-server invocations read-only; focused regression fixture passes with zero failures
…d argument boundaries, and refusal when argv is unreadable. Added spaced-path and kernel-argv regressions. The regression failed before the fix and passes afterwards. Native-lock, ancestry, checkpoint, and ShellCheck checks pass. The full ps-denied suite retains an existing macOS rendering failure, reproduced on unmodified HEAD. The excluded rendering code remains unchanged
…er and stop at the first positional argument. The missing-python regression failed before and passes after. Native-lock, ancestry, checkpoint, focused ps-denied, and ShellCheck checks pass. Readable-argv behaviour and fm-procinfo.py remain unchanged. The full ps-denied suite retains a macOS rendering failure, also reproduced with the unchanged HEAD test
When argv is unreadable, retain app-server tokens after the option parser stops as shared-server evidence. They cannot prove a session identity, so the lock remains read-only instead of accepting PID ancestry. Add regressions for spaced directory values with Python hidden, legacy PID-only locks, and the accepted read-only prompt tradeoff. Refresh the live Codex verification record.
The two Codex lock suites exceed the existing serial packing budget after the rebase. Add one shard and keep the packing target and job timeout.
Run the Stop payload identity and ancestry checks only when a published lock can have a foreign owner. The Stop guard keeps its existing fast path on homes without a lock.
6969d61 to
d03abb3
Compare
|
Speaking as Kun's firstmate: thanks @karanmrn. I read the new head Still waiting on you, for one item: the attestation in the body binds Heads-up for Kun, not for you: this head now edits |
|
Speaking as Kun's firstmate: thanks @karanmrn. Your re-raise binds the attestation to the current head Diff review (full read of the Why it goes to Kun, not auto-merge:
Contract class: restore (the lock boundary the docs already promise). VISION: aligns on all seven rules, as before. |
What Changed
Risk Assessment
✅ Low: The ownership checks enforce the required refusal boundary, and the complete source review found no material defect or unnecessary component.
Testing
Five local Codex scenarios and three targeted checks passed. Base replay confirmed the regression repair. Driver setup failures were resolved. CLI transcripts remain, all children stopped, and disposable labs were removed.
Evidence: Native ownership, Stop guards, checkpoints, and recovery
Source: Native ownership, Stop guards, checkpoints, and recovery
Evidence: Real processes with unreadable spaced arguments
Source: Real processes with unreadable spaced arguments
Evidence: Base reproduces takeover, target refuses it
Source: Base reproduces takeover, target refuses it
Evidence: Execution scope, results, and cleanup
Source: Execution scope, results, and cleanup
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
TMPDIR="$PWD/.test-native-lock/tmp" bash tests/fm-codex-session-lock.test.shexited 0.TMPDIR="$PWD/.test-native-lock/tmp" bash tests/fm-codex-session-identity-live-e2e.test.shexited 0.TMPDIR="$PWD/.test-native-lock/tmp" bash tests/fm-watch-checkpoint.test.shexited 0.python3 .test-native-lock/live-driver.py --liveexercised native ownership, guards, and recovery; exited 0.python3 .test-native-lock/fallback-live.pypassed real spaced-path cases; its later sandbox setup failed and was replaced by the embedded CLI route.python3 .test-native-lock/ordinary-cli-live.pypassed after correcting driver completion handling; exited 0.python3 .test-native-lock/baseline-replay.pyreproduced unsafe base ownership and confirmed target refusal; exited 0.Confirmed recorded servers stopped, removed disposable labs, and verified a clean worktree at the target commit.✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.