Repository navigation
fix: show stopped goals as paused - #191746
Conversation
Publish the Goal pause and Stop reason with the accepted terminal lifecycle patch. Preserve restart, supersession, yielded waiting, queued sibling ownership, and newer Goal fences. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 7f235a60-ab56-4aa2-951f-42c1a8c08ec4
|
🦞👀 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 changes before merge. What this changesThis PR pauses active Goals when their run is stopped and records a note directing the user to Resume. Example: Stop the active Goal “Finish the work” after it has used 12 tokens.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-authored PR fixes a current Goal-state inconsistency, but its added tests need a test-line budget repair before merge. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe session lifecycle reducer converts accepted run events into persisted session patches; Gateway publication then exposes the resulting Goal state to clients. flowchart LR
A[Operator Stop] --> B[Session cancellation owner]
B --> C[Terminal lifecycle event]
C --> D[Session lifecycle reducer]
D --> E[Session state writer]
E --> F[Gateway session publication]
F --> G[Goal controls]
Technical reviewBest possible solution: Keep the pause in the existing lifecycle writer and repair the focused regression suite’s budget and yielded-waiting fixture. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows that a killed run bypasses the Goal-pause transition; the PR also reports the intended base failures, but this read-only review ran no target code. Is this the best way to solve the issue? The production patch is the smallest complete fix: an accepted Stop must pause the active Goal in the same authoritative lifecycle write, preserving existing stale-event guards and continuation exclusions. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 31ad71a8addc. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +7, Tests +116, Docs +1. Total +124 across 4 files. Added test files: 1. View PR surface stats
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 3, 2026, 2:57 AM ET / 07:57 UTC. |
Reuse the existing lifecycle fixtures for Stop, continuation exclusions, stale ownership, and queued inputs. Cover the admitted Goal's own pre-execution cancellation separately from an unrelated queued sibling. Preserve the production pause logic and existing test-budget ceiling. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 3d75a22b-e3fa-494c-9bf5-00be2a6086c8
What Problem This Solves
Fixes an unfinished Goal remaining marked active after Stop has cancelled its pursuit.
User Impact
Stop now pauses an active Goal with the visible note “Paused after Stop. Resume to continue.” The objective, accounting, and history are preserved; Resume remains explicit. Existing blocked/completed Goals and restart, supersession, and yielded continuation behavior are unchanged.
Why This Change Was Made
The existing authoritative lifecycle writer includes the Goal pause in the accepted cancellation patch. Its session, writer, revision, and newer-Goal guards remain in force. An admitted Goal records its own run claim before execution, so its pre-run Stop is accepted while an unrelated queued sibling cannot pause the executing Goal. There is no new scheduler, state, configuration, permission, or notice owner.
Regression coverage reuses the existing lifecycle persistence fixtures instead of maintaining a duplicate standalone suite. The CI repair changes tests only; the reviewed production pause logic is unchanged.
Evidence
43bb559f841430368a4ae2bc1a213fc285d29ccc. Their coverage is now consolidated into the existing lifecycle suite, preserving Stop note/accounting, no implicit resume, continuation exclusions, and stale session/writer/revision/newer-Goal guards.lifecycleRunIdclaim. The selected two-file run passed 47 cases in 48.77 seconds local wall time; the lifecycle file took 35.26 seconds including cold worker preparation.sessions.abort/Resume flows, are reused because their production and public-flow test source is unchanged. Model execution is mocked; admission, cancellation, persistence, queue settlement, and Resume use production paths.satisfies SessionEntryto preserve its real required Goal property rather than widening it to optional.4617869c2c6b97ccaa0a3e49a503c31745e6e17efailedchecks-fast-baseline-ratchets(run41597877854, job125789945465): 6,421,942 test lines versus a 6,421,820 ceiling, with PR delta +116. That comparison base was already six lines over. The repair removes 117 test lines from that head and makes the overall PR test delta -1 against its original branch base, without changing the scalar, allocation records, or checker policy. Repaired-head CI remains to be verified; the old failure is not relabeled green.gpt-6.1-sol, P0–P2) reviewed the complete final test-only delta against the published head above, including the fixture typing correction, and completed scoped-clean with no actionable findings or meaningful coverage loss. The original production change also has a completed clean review. Reviewers did not execute checks; results above are lead-owned.Worked on by