Repository navigation
fix(goals): avoid attributing automatic interruptions to Stop - #198276
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 replaces Stop-specific goal pause wording with a cause-neutral interruption message. Example: Access is revoked while a run pursues the goal “Finish the work.”
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a source-confirmed attribution error with a minimal change, and no introduced correctness defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway cancellation publishes lifecycle events that the session projection converts into persisted goal status and notes displayed by clients. flowchart LR
A[User Stop] --> C[Gateway cancellation]
B[Access revocation] --> C
C --> D[Lifecycle event]
D --> E[Session goal projection]
E --> F[Stored goal note]
F --> G[Client display]
Technical reviewBest possible solution: Keep cause-neutral wording in the existing lifecycle projection without adding cancellation state or migrating historical notes. Do we have a high-confidence way to reproduce the issue? Source traces automatic revocation through RPC cancellation into the Stop-specific note on current main; no target code was executed during this review. Is this the best way to solve the issue? Cause-neutral wording is the smallest complete fix because the existing lifecycle event does not identify a human initiator. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8ae9d35bd53b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +19. Total +19 across 2 files. 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:
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 13, 2026, 8:34 AM ET / 13:34 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
#198276 intentionally made Goal cancellation notes cause-neutral because an RPC cancellation can also come from authority revocation. Update the shared Stop/resume integration expectation missed by that change; retain the exact note and all pause, abort, resume-once, replay, and transcript assertions. The old #198208 observer case passes in job 131944723588; its two Goal failures report this note mismatch instead. Runtime replay remains pending in a prepared checkout; formatting, syntax lint and P0-P2 autoreview pass. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]>
…law#198336) openclaw#198276 intentionally made Goal cancellation notes cause-neutral because an RPC cancellation can also come from authority revocation. Update the shared Stop/resume integration expectation missed by that change; retain the exact note and all pause, abort, resume-once, replay, and transcript assertions. The old openclaw#198208 observer case passes in job 131944723588; its two Goal failures report this note mismatch instead. Runtime replay remains pending in a prepared checkout; formatting, syntax lint and P0-P2 autoreview pass. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes goals incorrectly saying “Paused after Stop” when a run was interrupted automatically, including cancellation caused by revoked access.
User Impact
Paused goals describe an interruption without falsely attributing it to a user pressing Stop. Cancellation, access checks, frozen timers and explicit Resume behavior are unchanged.
Why This Change Was Made
Explicit Stop and automatic authority revocation can publish the same RPC cancellation event. The goal projection cannot infer a human initiator from that event, so it now uses cause-neutral wording. No new state or authorization mechanism is introduced.
Evidence
session-lifecycle-state.test.tsandoperator-run-cancellation.test.ts; targeted typecheck, type-aware lint, formatting and whitespace checks passed.This change does not fix the cause of any interruption or restore revoked access. Existing saved pause notes are not migrated.
CI qualification
Focused writer tests (47/47) and independent lifecycle/operator-cancellation tests (66/66), targeted typechecking, type-aware lint, formatting and whitespace checks passed. Before the correction, neutral-note expectations failed on the own pre-run RPC and RPC cancellation cases while 45 other lifecycle cases passed. The published tree is identical to that reviewed and tested tree.
Exact-head CI run 43432470365 has two identified inherited failures:
eslint(no-shadow)inui/src/e2e/session-context-breakdown.e2e.test.ts:19; main's eb1a592fc062 introduces the import shadowed by the existing parameter.home-readonly.real-gateway.e2e.test.ts:45times out at 120000ms, matching completed main run 43425732822/job 131887280121.Both failing input files are unchanged from the CI merge's main parent. This does not claim full CI success or a live Gateway/UI reproduction. Hosted review found no actionable defects in the exact head; its live-proof limitation remains explicit.