Repository navigation
fix: report the same cancellation when a queued steer is replayed - #201399
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 maintainer review before merge. What this changesThis PR waits for actual steering admission and durable cancellation before checking that replay is rejected. Example: Cancel queued CLI input canceled-steer while initial-held-turn is awaiting its provider response.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused, source-supported repair to the cancellation test without weakening its behavioral assertions; no actionable patch defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Gateway accepts CLI chat requests, passes steering into the active agent queue, and exposes pending-input settlement through history and retry responses. flowchart LR
A[CLI chat requests] --> B[Gateway admission]
B --> C[Active agent steering queue]
C --> D[Scripted provider]
B --> E[Pending input owner]
E --> F[History and replay responses]
Technical reviewBest possible solution: Retain this focused test repair using the existing admission observer and pending-input owner. Do we have a high-confidence way to reproduce the issue? Source establishes the mismatch: durable cancellation takes precedence over cached replay, while the base test expects cached timeout success; no target code was executed during this review. Is this the best way to solve the issue? The patch is the smallest complete repair: synchronize on real admission and settlement, then assert the existing cancellation contract while preserving the original non-delivery and active-turn checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ee37dd3b0335. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +25. Total +25 across 1 file. Added test files: 0. 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. LabelsLabel 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 18, 2026, 2:31 PM ET / 19:31 UTC. |
Baseline-Refresh: 135965e94fdc5117b604f1527638d94b2b360a30
Co-authored-by: steipete <[email protected]>
Co-authored-by: steipete <[email protected]>
Baseline-Refresh: 11a5067bfc5914b62cbc97b0fa61371eff223ceb Co-authored-by: steipete <[email protected]>
Baseline-Refresh: 562d3c4956499a905dc93b27aa1ceaff09aec1c8 Co-authored-by: steipete <[email protected]>
|
Merged via squash.
|
…enclaw#201399) * test(gateway): prove queued steer withdrawal before replay * fix(gateway): replay queued steer cancellation consistently * fix(gateway): scope steer cancellation to the chat address * test(gateway): check revocation at the next request boundary Co-authored-by: steipete <[email protected]> * test(gateway): let admitted turns finish after a policy close Co-authored-by: steipete <[email protected]> --------- Co-authored-by: steipete <[email protected]>
Retain the publication transport exclusion from main while using the negotiated catalog capability for native clients. Integrating main also includes the queued-steer cancellation repair from #201399. Co-authored-by: jjjhenriksen <[email protected]> Co-authored-by: VACInc <[email protected]>
…on retry The submitted-input comparison discarded the pending row's disposition, and a matching RAM fingerprint could replay success before reading the row. Check the retained row before choosing a retry response so unconsumed cancellation cannot look delivered. Report queued work as in flight only with existing custody, without readmitting external retries. Source commit: 703c82d Source PR: #200533 Reference commit: 7edc997 Reference PR: #201399 Release adaptation: Hand-port only the read-only retry decision through the existing SQLite and actor-memory snapshots. Use the schema-42 consumed link and legacy Stop/dismissal flags instead of new end-cause columns. Do not port crash replay, new abort-marker metadata, cancellation reopening, migrations, or UI/protocol changes. Keep the exact graceful-replay admission bypass and leave consumed, transcript, and completion idempotence intact. Co-authored-by: RomneyDa <[email protected]>
…01399) * test(gateway): prove queued steer withdrawal before replay * fix(gateway): replay queued steer cancellation consistently * fix(gateway): scope steer cancellation to the chat address * test(gateway): check revocation at the next request boundary Co-authored-by: steipete <[email protected]> * test(gateway): let admitted turns finish after a policy close Co-authored-by: steipete <[email protected]> --------- Co-authored-by: steipete <[email protected]> (cherry picked from commit 7edc997) Release adaptation: use stable pending-input dispositions and finishPendingInput, preserving consumed/transcript precedence and the original wire contract. Companion audit: replay/FIFO proof is adapted; later access-policy, partial-text, and run-less Stop changes are separate, not prerequisites. Co-authored-by: RomneyDa <[email protected]>
Related: #200533, #176084, #201094
Work sessions
Linked for team reference; these sessions aren’t public.
What Problem This Solves
After a CLI caller successfully cancels a queued steer, resending its message ID can return a cached abort response or say the input was cancelled because it failed. The response depends on when the Gateway finishes writing the cancellation receipt.
User Impact
A withdrawn steer now reports the same cancellation on replay, including while the receipt is still being written. The original turn continues and the caller can send the message again with a new ID.
Why This Change Was Made
An exact
chat.aborttargeting an injecting chat input recordsuser-stopfor that chat. Replay checks the durable cancellation first, then the admitted cancellation for the same chat, ahead of the response cache. The separateuserInitiatedpresentation flag retains its existing meaning.After #201334, losing access rejects the next admission but does not cancel already-started work. The current baseline includes the stronger recovery regression from #201713 and the equivalent stale Stop correction from #201744. Both files are kept as-is from
main; the cancellation replay fix is unchanged.Evidence
in_flight. With the fix, replay reportsINVALID_REQUESTwithchat-input-cancelledanduser-stop, both before and after durable settlement. All six steer FIFO cases passed in hosted CI on the original fix.3480a783f1760, 80 focused tests and the isolated cross-device Stop test passed, as did targeted lint, formatting, and the Gateway root test typecheck. Independent review againstfd933a39c52813found no actionable P0–P2 defects. Required CI for this head is the landing gate.