Repository navigation
fix(goals): retain admitted continuation custody across restart - #193136
GoatInAHat wants to merge 3 commits into
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 persists admitted Goal continuation custody and restores it through ordinary execution admission after a Gateway restart. Example: The Goal “Verify the checked deliverable” has an accepted continuation when the Gateway restarts.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 4 items remain Keep this dependent draft open: it contains distinct recovery work, but changes an intentional restart tradeoff and needs an owner decision before merge. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherGoal execution and child settlement produce continuation receipts in the existing session store; Gateway startup restores their original authority and submits ordinary session input, yielding agent execution and user replies. flowchart TD
A[Admitted Goal execution] --> B[Existing session store]
B --> C[Gateway startup recovery]
C --> D[Original authority and Goal checks]
D --> E[Ordinary input admission]
E --> F[Harness or CLI execution]
F --> G[Goal settlement and user reply]
Technical reviewBest possible solution: Use the existing session store and admission owners for an owner-approved durable Goal contract, with the handoff and native prerequisites qualified as separate coherent stages. Do we have a high-confidence way to reproduce the issue? Current-main source keeps Goal-return custody in memory and lacks the proposed successor receipt; this establishes the persistence gap, while supplied regressions report baseline failures and this review ran no target code. Is this the best way to solve the issue? The required invariant is that an accepted Goal obligation retains one owner until successor acquisition or explicit invalidation; the proposed producer/store/recovery cutover reuses existing owners, but its stronger durability guarantee changes an intentional product tradeoff. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c0a2d4ca0d7a. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Live guards are present, but restored and retained authority remains unqualified at the final effects. EvidenceSecurity concerns:
What I checked:
PR surfaceSource +2050, Tests +3015, Docs +67, Other +7. Total +5139 across 77 files. Added test files: 10. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 Reviewed November 4, 2026, 9:43 PM ET / November 5, 2026, 02:43 UTC. |
Related: #192988. Depends on #193103 and #193024.
What Problem This Solves
An accepted Goal continuation can disappear during a Gateway restart, leaving an active Goal with no execution owner.
User Impact
Admitted Goal work can resume after restart using its original operator permissions and tool/delivery restrictions. Earlier accepted human input keeps priority, and Stop, Pause, clear, or replacement cancels stale pursuit.
This dependent draft is not live-qualified or ready to merge. Recovery refuses unavailable original authority, source-bound capabilities, and required workers rather than broadening permissions. Unanswered human-decision durability and Codex autonomous pursuit are not implemented by this slice.
Why This Change Was Made
The existing session store records the accepted continuation before its predecessor releases it. Startup and child settlement use the ordinary input/execution owners to recover that exact receipt. Writer cleanup preserves pursuit custody, while explicit Stop and Goal/session changes invalidate it. A narrowly guarded adoption transition permits a restart-interrupted execution to reacquire its Goal without weakening the native owner check.
Storage, publication, restoration, acquisition, and final delivery ship together: splitting these would leave a stored receipt without a safe consumer. No new scheduler, queue, timer, or state store is introduced. This branch includes the unchanged prerequisites; the stage-only comparison isolates this change.
Evidence
Checked recovery commit:
41f1d1aab017a0ec0268621ec01d11d873347ee1.Final owning/consumer batch: 594 passing tests across 29 files.
Eight canonical production/test type projects pass. Scoped lint, formatting, MDX and exact incremental test allocation (1,690 LF) pass.
All 49 committed paths match the independently reviewed final source and index hashes.
Original production reproduces writer receipt loss and interrupted execution rejection before any model call. Five cancellation controls pass on that baseline.
Corrected running and already-killed recovery cases pass. A second interrupted recovery completes through a fresh Gateway context over the same store; expired occurrence authority remains expired. All eleven execution scenarios have passing results across full and focused runs.
Independent source review resolves both production findings; final fixture-delta review is clear.
Physical two-process restart, real provider inference and final external delivery remain unqualified. Mocked provider and same-process restart tests are not presented as live proof.