Repository navigation
test(qa): preserve task cancellation across process replacement - #147382
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. Reviewed September 13, 2026, 4:36 PM ET / 20:36 UTC. ClawSweeper reviewWhat this changesAdds QA tests verifying that explicitly cancelled background tasks remain cancelled after graceful Gateway replacement or process loss, without heartbeat assistance or unexpected output. Merge readiness✅ Ready for maintainer review Keep open: the cancellation cases add distinct coverage beyond the merged restart-recovery test, and no actionable patch defect was found. The MEMBER-authored, maintainer-labeled PR is also protected from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherQA Lab launches an isolated Gateway with a synthetic provider and test channel. These tests send work through the plugin interface, cancel it through the Gateway API, and observe persisted task state and delivery after replacing the process. flowchart TD
A[Test channel request] --> B[Isolated Gateway]
B --> C[Running background task]
D[Task cancellation request] --> C
C --> E[Persisted cancelled state]
E --> F[Replacement Gateway]
F --> G[Unchanged task identity]
F --> H[No new provider work or replies]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +273. Total +273 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain cancellation coverage alongside interrupted-task recovery coverage, using the existing isolated Gateway fixture and lifecycle owner. Do we have a high-confidence way to reproduce the issue? Not applicable: this is coverage for an existing cancellation contract, not a reported current failure; the scenarios were inspected but not executed during this read-only review. Is this the best way to solve the issue? Yes: extending the existing process fixture tests cancellation through the registered API and observes persistent state and downstream traffic without adding production seams. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2386efc05c94. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…1-prep * commit '912ae8d96e5964dfdcdf419b79613fb941cdf0a8': (350 commits) fix: keep workspace preparation responsive during cleanup (openclaw#147358) docs: alphabetize donors and sponsors and add Red Hat logo (openclaw#147302) fix(plugins): retain update authority through doctor effects (openclaw#144316) refactor(qa): share Multipass mount retry lifecycle (openclaw#147084) fix(memory): emit one JSON result for command failures (openclaw#147366) improve(plugins): speed up cold metadata loading (openclaw#147411) fix(sessions): avoid duplicate work after waited child replies (openclaw#147394) fix(agents): retain outstanding child results in parent context (openclaw#112623) test: preserve native workflow loader selection (openclaw#147403) fix: reduce repeated work while polling session pull requests (openclaw#147373) test(qa): preserve task cancellation across process replacement (openclaw#147382) fix: prevent sidebar refresh storms during session activity (openclaw#147400) refactor: simplify skills CLI formatting (openclaw#147368) fix: prevent Git checkout certificate failures behind egress proxy (openclaw#147410) fix(qa): stop live threads after their process leader exits (openclaw#147386) refactor(release): share agent turn retry lifecycle (openclaw#147076) fix(ui): keep uploaded images aligned with their prompts (openclaw#147389) fix(fs): guard skill reads and bound worker bundle staging (openclaw#147336) fix(ci): restore Linux service ownership fixtures (openclaw#147398) fix(plugins): preserve manifest permissions when building plugins (openclaw#147393) ...
Summary
Add two isolated real-Gateway cancellation/restart checks to the existing QA-lab subagent fixture:
tasks.cancel, then gracefully replace the Gateway.Heartbeat is explicitly disabled in effective configuration on every boot and checked against scheduled jobs and observed provider requests.
What the tests verify
This is test-only. No product, schema, default configuration, or operator service change.
Evidence and limits
Both replacement cases pass against the final test source. The independent P0–P2 review is clean after fixing traffic-observation and custody assertions; required changed-code checks pass. A final null-safe assertion typing adjustment preserves the same runtime checks.
These are local source-based embedded-runtime/qa-channel proofs with a synthetic provider. They do not establish native/remote executor behavior, installed-package compatibility, or the separate accepted-but-unfinished parent handoff path. The broader orchestration reliability work remains open. This extends the heartbeat-disabled process proof already landed in #147313.