Repository navigation
fix(queue): keep system direct-command corrections as followups - #188769
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 SummaryThis 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. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR keeps browser corrections to system-owned parent commands as followups while preserving owner steering of scheduled and child executions. Example: An owner sends “Stop waiting and use the corrected approach” while a subagent completion command runs in the parent conversation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness⛔ Blocked before merge - 4 items remain Keep open: this focused repair addresses current-main misclassification, but its added test lines trigger a blocking budget check. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherGateway chat.send submits corrections to the session controller; reply-tool authority decides whether they join the active execution or retain separate followup custody. flowchart TD
A[Browser correction] --> B[Gateway chat send]
B --> C[Session controller]
C --> D[Reply authority classification]
D --> E[Compatible active execution]
D --> F[Followup queue]
E --> G[Model and tool execution]
Technical reviewBest possible solution: Keep the existing classifier repair and regression coverage, make the test delta budget-neutral, and establish the child-session authority boundary. Do we have a high-confidence way to reproduce the issue? Current main's broad provenance check includes completion reports, and the PR supplies a concrete before/after failing assertion; this review independently inspected the path without executing it. Is this the best way to solve the issue? The production change is the smallest complete repair: distinguish scheduled execution provenance and canonical child identity at the existing continuation owner while retaining normal compatibility checks for parent commands. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cf83a69f74ee. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete bypass was found, but newly eligible child-session guidance needs final-effect authority validation. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +4, Docs +5. Total +14 across 4 files. Added test files: 0. View PR surface stats
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 October 30, 2026, 6:37 PM ET / 22:37 UTC. |
…claw#188769) * fix(queue): keep system direct-command corrections as followups * test(queue): restore system direct-command followup contract * test(queue): keep steering coverage within test budget
Related: #188514
What Problem This Solves
Browser corrections to a system-owned direct command were incorrectly steered into that command instead of becoming followup input.
User Impact
System direct commands in a parent conversation retain followup behavior. Owners can still steer active loop/cron executions and visible child sessions, with live incoming authorization and the incumbent's existing execution permissions.
Why This Change Was Made
The owner-guidance exception used a broad native-input attribution helper that also matched completion reports. Qualify scheduled executions and canonical child sessions at the existing continuation boundary instead. The subagent fixture now uses real child identity and parent lineage without invented inter-session provenance; uncapped loop coverage prevents dependence on an optional tool-policy cap. Restore the original direct-command followup expectation, which #188624 changed to steering while this repair was being validated.
Production grows by five lines to distinguish these execution contracts. No new configuration, state, migration, or steering path is added.
Evidence
14e213feadc2and fails on15db8cc635ffwithexpected 'steered' to be 'followup'. The corrected child fixture also fails on unchanged main withCompatible requester input was dispatched as a separate turn.fs-safe0.26.14 versus the lockfile's 0.26.15); a frozen-lockfile install resolved it before the successful run.check:changed --staged --timed: 34 of 35 steps passed, including production types, affected Gateway type graphs, lint, formatting, database guards, import cycles, and all dead-code scans. The remaining test-type graph reports TS2559 atsrc/sessions/session-controller.message-join.test.ts:591in a pre-existing uncommitted local edit excluded from this PR. The same error reproduces with this production repair removed; the unrelated file is preserved. The final exact-head PR CI run verified the committed tree successfully.9db820e3174aand restoring the original system-command assertion, both direct-command cases passed again (213.63s Vitest / 235.30s wrapper). Codex autoreview of the complete final diff is scoped-clean through P2, with no actionable findings and successful final source verification.The first PR CI attempt (
41137345305, head98d292159e60) found four net added test lines above the existing ceiling. The fixture was consolidated without removing cases or assertions; net test growth is now zero and no budget/baseline changed. All 28 custody tests passed again (400.47s Vitest / 421.05s wrapper), and refreshed Codex autoreview remained scoped-clean through P2. A local staged full-tree ratchet scan was stopped after ten minutes without a result; the final exact-head CI run passed that check and every required gate.Final exact-head CI: run 41139718659 succeeded for
dcb6d912b1df4f978e52d1bdf6087662bfcf3bba, including all three PostgreSQL conformance shards. Required CI, security, and dependency gates passed; no inherited-failure exception was needed.