Repository navigation
fix: Stop omits native descendant requester lifecycle - #181766
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. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR carries the selected session’s lifecycle revision into exact-run descendant cancellation and preserves source identity during metadata preparation. Example: Stop native-parent-run in physical session native-parent-session with lifecycle original-incarnation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it repairs a current-main cancellation defect using the existing owners, and source review found no actionable introduced bug. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherGateway chat.abort and sessions.abort select a captured run, prepare session metadata, and invoke the existing harness cancellation owner, which selects native children and interrupts their exact Codex turns. flowchart TD
A[Stop request] --> B[Gateway requester authorization]
B --> C[Captured run and session metadata]
C --> D[Session Stop controller]
D --> E[Harness descendant cancellation]
E --> F[Codex native child selection]
F --> G[Interrupt and terminal settlement]
Technical reviewBest possible solution: Retain the focused producer fix and existing cancellation owners, then demonstrate authorized settlement and unauthorized rejection through Gateway exact Stop. Do we have a high-confidence way to reproduce the issue? Current main omits lifecycleRevision at both exact-run producers, while native selection compares it against retained ownership; the PR reports matching red-on-base regressions, but this read-only review ran no target code. Is this the best way to solve the issue? The patch fixes metadata at its producer, reuses the session snapshot and cancellation owners, and retains distinct reserved/indexed settlement contracts without adding persistent state or a parallel cancellation path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9ff9d8837459. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Existing requester, generation, binding, and custody checks remain intact, with no concrete authorization bypass found. EvidenceWhat I checked:
PR surfaceSource +22, Tests +204. Total +226 across 4 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 24, 2026, 11:18 PM ET / October 25, 2026, 03:18 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix(gateway): retain exact requester lifecycle during Stop * test: verify exact Stop requester authority * test: preserve generic callback in Stop authority proof --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes: stopping an exact Gateway run can stop its parent but leave native descendants running with a requester-generation error.
User Impact
User impact: exact Stop cancels the selected request's native descendants while preserving other requests, replacement sessions, and already accepted cancellation outcomes. No configuration or migration is required.
Why This Change Was Made
The reserved and indexed request paths omitted the selected physical session's lifecycle revision. Both now supply that revision only when the session ID matches, and retain the captured source identity across asynchronous metadata preparation. Native generation, custody, and live requester checks remain with their existing owners. Main's committed-cancellation callback is preserved.
Related: #181475 fixes retained-parent selection inside Codex; this fixes the earlier Gateway request producer. #174900 covers separate catalog and completion continuity.
Evidence
turn/interruptrequests after revocation. Existing native tests cover authorized interruption/settlement and foreign custody.A fresh Gateway-to-native live run was not performed: the existing tests do not expose that composition, and adding a new cross-boundary harness exceeds this bounded proof pass. The native tests exercise the real cancellation owner with a mocked app-server transport; they are not live-model evidence.
Original fix by @enki; contributor commits and authorship preserved.