Repository navigation
fix(qa): report cleanup failures truthfully - #119727
Conversation
Punchcard-Session: silver-valley-valley-dt
Punchcard-Session: silver-meadow-lantern-vx
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 4:30 PM ET / 20:30 UTC. ClawSweeper reviewWhat this changesThis PR makes QA Lab report cleanup failures in its final result, retains the cleanup error for infrastructure retry, and prevents nested suite runs from printing duplicate completion lines. Merge readinessKeep this focused QA Lab repair open for normal maintainer handling. Current main emits completion progress before cleanup, while the patch makes cleanup aggregation authoritative before the terminal result; no blocking patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherQA Lab’s standard, isolated, and runtime-parity suite owners start scenario resources, write artifacts, then clean resources up before reporting the run outcome. Their terminal result feeds CLI progress, retry classification, and the Lab runner status visible to QA operators. flowchart LR
A[QA suite request] --> B[Standard, isolated, or parity owner]
B --> C[Scenarios and artifacts]
C --> D[Canonical cleanup plan]
D --> E{Cleanup succeeds?}
E -->|Yes| F[One terminal completion]
E -->|No| G[Phase-labelled failure]
G --> H[Retry classification and Lab status]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +77, Tests +543. Total +620 across 9 files. View PR surface stats
Review metrics
Merge-risk options
Maintainer options:
Technical reviewBest possible solution: Keep cleanup failure aggregation and terminal publication at the suite owners, with one final completion signal only after all owned cleanup succeeds. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main emits completion progress before finally-owned cleanup in all three suite-owner shapes; a cleanup failure follows that signal. This read-only review did not execute the failure path. Is this the best way to solve the issue? Yes. Moving terminal reporting behind the existing canonical cleanup aggregation fixes the owner boundary directly and avoids downstream correction paths that would retain a false completion signal. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2db3431f4aa1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…cope * origin/main: fix(qa): report cleanup failures truthfully (openclaw#119727) fix: keep completed actions visible after settled finalization (openclaw#119726) fix(agents): rearm yielded requester wake (openclaw#119696) fix(diagnostics): preserve telemetry during service shutdown (openclaw#119705)
* fix(qa): report cleanup failures truthfully Punchcard-Session: silver-valley-valley-dt * fix(qa): satisfy cleanup runner static checks Punchcard-Session: silver-meadow-lantern-vx
Related: #119442
Related: #113974
What Problem This Solves
Fixes an issue where QA Lab could report a completed run before terminal cleanup finished, so a cleanup failure could leave operators with a false success signal. Cleanup-only network failures could also lose the error identity needed for infrastructure retry classification, while nested standard runs could emit duplicate completion lines under isolated or parity parents.
Why This Change Was Made
The QA Lab suite orchestrators owned both result publication and cleanup, but published terminal success inside the run body before their cleanup boundary completed. The canonical fix records phase-specific cleanup failures, preserves the original cleanup error as the
AggregateErrorcause when it is the only failure, and delays the terminal result/progress signal until owner cleanup succeeds.Standard nested runs now suppress their own completion line. Isolated and runtime-parity parents emit exactly one completion line, only after parent cleanup. This avoids duplicate terminal reporting without adding a parallel completion path.
Production LOC: +150/-74 (net +76), justified by the cleanup ownership boundary and truthful terminal-result contract. Test LOC: +560/-21 (net +539).
User Impact
QA Lab operators now get a truthful terminal outcome: scenario artifacts remain discoverable when cleanup fails, infrastructure retries retain the cleanup network cause, and successful standard, isolated, and parity runs each report completion exactly once after cleanup.
Evidence
node scripts/run-vitest.mjsacross the five focused QA Lab test files: 5 files passed, 102 tests passed../node_modules/.bin/oxfmt --checkacross all nine changed files: clean.git diff --check origin/main...HEAD: clean.Punchcard-Session: silver-valley-valley-dt