Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
a66d6f6 to
c744017
Compare
|
Codex review: needs maintainer review before merge. Reviewed September 30, 2026, 12:47 PM ET / 16:47 UTC (Revision 14). ClawSweeper reviewWhat this changesThe Codex plugin makes attempt-owned binding cleanup check both the native thread and physical app-server client, with regressions for successor bindings and cleanup after lost authority. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Current main still permits stale cleanup to remove a successor Codex binding. The proposed owner check addresses that defect, and the latest commit repairs the test fixtures behind the prior failed shard. I found no remaining patch defect; exact-head checks were still running in the captured state. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw stores a Codex native-thread binding so later agent turns can resume the same conversation. Attempt cleanup may clear that binding and release the old client's route and lease. flowchart LR
A[Agent turn] --> B[Codex app-server client]
B --> C[Stored native thread binding]
D[Attempt cleanup] --> E{Thread and client match?}
C --> E
E -->|Yes| F[Clear old binding]
E -->|No| G[Preserve successor binding]
D --> H[Release old route and lease]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +118, Tests +518. Total +636 across 14 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the exact-client check at the binding-store mutation and land the focused cleanup regressions once the required exact-head gates complete. Do we have a high-confidence way to reproduce the issue? Yes. The linked issue gives a deterministic same-thread client-replacement sequence, and current-main source lacks the client check; I did not execute target code in this read-only review. Is this the best way to solve the issue? Yes. Checking the physical client at the existing binding-store mutation repairs the owner boundary without a new setting or stored format. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 870c5b6b7f97. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (13 earlier review cycles; latest 8 shown)
|
aa83426 to
e690652
Compare
e690652 to
68b6890
Compare
# Conflicts: # extensions/codex/src/app-server/run-attempt-cleanup.ts # extensions/codex/src/app-server/run-attempt-turn-start.ts
…generation # Conflicts: # extensions/codex/src/app-server/run-attempt-turn-start.ts # extensions/codex/src/app-server/run-attempt.test.ts
…164197) Fence Codex native effects, binding mutations, and subscription cleanup to the initiating session lineage and exact physical client. A replaced session can no longer borrow a peer's process custody or clear a successor binding, including across worker CAS retries and delayed remote-file responses. Use the existing database workers and authority cohorts, preserve synchronous released SDK contracts and reversible deletion vetoes, and retain main's shared bounded media reader. Regression proof covers physical writes, successor recovery, compaction, cleanup, and API compatibility. Consolidates #156940 and the independently reimplemented physical-client checks from #143201. Unblocks compound PR2's native-binding authority work; executor settlement remains its required extension. Co-authored-by: Galin Iliev <[email protected]> Co-authored-by: KirDE <[email protected]>
|
Consolidated and landed in #164197 (283d5e6). The replacement independently reimplements this PR's physical-client checks inside the current worker-backed binding compare-and-swap flow, including captured absence and retries, so delayed cleanup cannot mutate a successor using the same native thread. Thank you @KirDE. Your original commit-author credit is retained on the consolidating commit and the landed squash. The physical-client regressions include failing pre-fix controls; focused and broader Testbox proof, released-SDK checks, worker ratchet, zero-cycle Madge, P2 review, and final-head CI passed. Closing this PR as consolidated; its source branch is preserved. |
…penclaw#164197) Fence Codex native effects, binding mutations, and subscription cleanup to the initiating session lineage and exact physical client. A replaced session can no longer borrow a peer's process custody or clear a successor binding, including across worker CAS retries and delayed remote-file responses. Use the existing database workers and authority cohorts, preserve synchronous released SDK contracts and reversible deletion vetoes, and retain main's shared bounded media reader. Regression proof covers physical writes, successor recovery, compaction, cleanup, and API compatibility. Consolidates openclaw#156940 and the independently reimplemented physical-client checks from openclaw#143201. Unblocks compound PR2's native-binding authority work; executor settlement remains its required extension. Co-authored-by: Galin Iliev <[email protected]> Co-authored-by: KirDE <[email protected]>
Closes #143187
What Problem This Solves
Fixes a Codex session losing its native thread binding when a stale attempt cleans up after a newer physical client reuses the same thread ID.
User Impact
The successor client keeps its binding and can resume the same native thread; a rejected stale cleanup also releases the old attempt's route and client lease. No config or storage migration is needed.
Why This Change Was Made
Attempt-owned clears now compare the recorded physical client ID as well as the thread ID in the SQLite binding mutation, and recheck attempt authority at the final effect. Startup teardown still runs when that authority check rejects. This integration retains current main's generation, supervision, lease, and native-subagent owners; obsolete context-engine tests were dropped in favor of current-main coverage plus a focused teardown regression.
Evidence