Skip to content

fix(goals): avoid attributing automatic interruptions to Stop - #198276

Merged
vincentkoc merged 1 commit into
mainfrom
fix/guest-runtime-terminal-20261113
Nov 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/guest-runtime-terminal-20261113

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

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

  • Added a producer-shaped RPC revocation case and retained generic interruption, queued-input isolation, stale-owner, restart and supersession coverage.
  • Independent validation: 66/66 tests across session-lifecycle-state.test.ts and operator-run-cancellation.test.ts; targeted typecheck, type-aware lint, formatting and whitespace checks passed.
  • Fresh independent review: no actionable P0–P2 findings. AutoReview (Claude fallback because local Codex was unavailable): scoped-clean across the complete change, with cancellation producer and normalization context.
  • Published tree is identical to the independently reviewed/tested tree. This is projection/persistence and cancellation-boundary proof, not a live user-interface or guest-session reproduction.

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:

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.

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Nov 13, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 13, 2026 13:17
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@vincentkoc
vincentkoc enabled auto-merge (squash) November 13, 2026 13:32
@clawsweeper

clawsweeper Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.”

  • Before: The paused goal says “Paused after Stop. Resume to continue.”
  • After: The paused goal says “Paused after an interruption. Resume to continue.”

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and correct by inspection; the supplied evidence does not meet the behavior-proof gate.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A goal can claim the user pressed Stop when access revocation interrupted the run automatically.
Reason: The maintainer-authored direction addresses misleading feedback without changing the established lifecycle contract.

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
Reviewed head: cee06d6a834b396f9779b7736a1c074bdcbde709

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Show a real Gateway automatically interrupting an active goal and displaying the neutral pause note, preferably with before/after screenshots and redacted diagnostics; a base-failing regression run is also not recorded.
Agent review details

How this fits together

Gateway 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]
Loading

Technical review

Best 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

  • Cancellation goal pause note changes intended behavior with a stated reason (85f9736: Pause unfinished goals after accepted Stop cancellation while preserving accounting, ownership guards, and explicit Resume.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 86d7963 adds src/config/sessions/session-run-lifecycle-projection.ts:437 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 86d7963b9099; files: src/config/sessions/session-run-lifecycle-projection.ts)

PR surface

Source 0, Tests +19. Total +19 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 1 22 3 +19
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 24 5 +19

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: The defect misattributes a pause cause but does not change cancellation, authorization, goal accounting, or Resume behavior.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: The defect misattributes a pause cause but does not change cancellation, authorization, goal accounting, or Resume behavior.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 13, 2026, 8:34 AM ET / 13:34 UTC.

@vincentkoc
vincentkoc disabled auto-merge November 13, 2026 13:37
@vincentkoc
vincentkoc merged commit 64fd44b into main Nov 13, 2026
206 of 210 checks passed
@vincentkoc
vincentkoc deleted the fix/guest-runtime-terminal-20261113 branch November 13, 2026 13:52
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

roboclaw-bot added a commit that referenced this pull request Nov 13, 2026
#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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant