Skip to content

refactor(qa): share CLI test temporary workspace cleanup - #118496

Merged
steipete merged 3 commits into
mainfrom
codex/cleanup50k-qa-tests-20260802-205341
Sep 24, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/cleanup50k-qa-tests-20260802-205341

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The QA CLI runtime tests still manage nine temporary-directory lifecycles directly, duplicating the workspace owner already used by neighboring QA Lab tests.

User Impact

No product behavior changes. Fixture directories use the existing QA Lab cleanup owner, reducing repeated teardown code and retaining ownership when fixture construction or assertions fail. No performance improvement is claimed.

Why This Change Was Made

Move the remaining creation sites to createTempDirHarness and await cleanup in the existing teardown after restoring spies and environment state. Keep the deliberate summary-file deletion, every assertion and scenario payload, current summary/parity helpers, and all 21 Bun-safe exit-code restorations. This is the useful remainder of the original PR; main has already absorbed its broader fixture consolidation.

Evidence

  • One test file, +30/-40 lines; no production or helper changes and no new tests. Static comparison preserves all 130 declaration starts, 202 assertion starts, 86 exit-code-bearing lines, 21 priorExitCode ?? 0 restorations, and nine fixture prefixes.
  • Fresh independent review completed clean. The reviewed test and helper bytes remain unchanged after integrating the canonical source-capture cleanup from main.
  • Isolated Linux Testbox verified source 25c6031281b93ba350d14ac7f1effc684e55c58d / tree ebeba84d5dbe87be7f5fcf387125569364f68b06. The complete file passed 163/163 on Node 24.19.0 and 163/163 on the repository-pinned Bun fork, with matching case inventories and zero skips. Both pinned Bun archive/executable checksums passed.
  • Full one-path changed checks passed: formatting, plugin boundaries, guards, extension test types, all dead-export scans and targeted lint. The native command exited 0; the lease was stopped after report collection.
  • Measured command walls with the canonical wrapper and --maxWorkers=1: Node 53.49s; Bun 42.78s. Actual file test time was 5.011s / 4.718s; cold transforms and imports account for the longer walls. This existing suite covers real CLI calls, filesystem reports and error handling with mocked external execution. No cases or per-test process boots were added, and these measurements are validation cost, not a performance comparison.

The existing Bun pin emitted a directory-mismatch diagnostic after the test summary. Inspection of the exact pinned resolver and the unchanged absolute --tsconfig-override caller shows it logs this after a successful absolute-path fallback. The warning is retained and no runtime-version change or clean-runtime claim is made here.

The local disk-usage observer reported an allocation-measurement error near final staging cleanup, so its controller result remains failed. The native validation itself exited 0; separately downloaded JSON reports, check logs and unchanged source verify the passing tests/checks. Staging removal was confirmed. The observer error was not hidden or used to rerun tests.

Exact-head PR CI passed (37 successful jobs; 20 scope-appropriate skips). The changed-file job ran all 163 cases; its reported individual case times sum to 5.886 seconds. CI did not emit a file-duration row, so that sum is not a suite or command wall time. Fresh automated review completed on this head with no actionable findings. Its reviewer could not access the separately downloaded Testbox reports; the maintainer inspected those reports and raw check logs. The Testbox lease job was stopped after collection, and ordinary exact-head CI independently passed.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 11:42 AM ET / 15:42 UTC (Revision 8).

ClawSweeper review

What this changes

QA Lab’s CLI runtime tests create temporary directories through the existing workspace helper and clean them up after each test.

Merge readiness

✅ Ready for maintainer review

Current main and the latest release still contain the direct fixture cleanup this PR addresses. The focused patch has no identified correctness or security blocker; its maintainer label also rules out automatic closure.

Priority: P3
Reviewed head: 25c6031281b93ba350d14ac7f1effc684e55c58d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused cleanup has fitting cross-runtime test evidence and no identified patch defect.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The external-contributor proof gate does not apply to this maintainer-owned, test-only PR. Its body reports exact-head Node and Bun runs of the QA CLI suite, covering fixture creation, report reads, and teardown; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this maintainer-owned, test-only PR. Its body reports exact-head Node and Bun runs of the QA CLI suite, covering fixture creation, report reads, and teardown; no stored-data contract changes.
Evidence reviewed 8 items Introduced change: The pinned merge-base-to-head diff replaces direct temporary-directory creation and removal in one CLI test file with the existing QA Lab helper and after-test cleanup.
Existing cleanup owner: The QA Lab helper records each workspace and cleans up its recorded directories; neighboring QA Lab tests already use it.
Current-main check: The fetched main revision still creates and removes the CLI test’s temporary directories directly, so the focused remainder has not landed.
Findings None None.
Security None None.

How this fits together

QA Lab’s CLI runtime tests call plugin commands using temporary fixture directories and mocked external runners. The commands write reports and summaries that the tests inspect before teardown.

flowchart LR
  A[Test cases] --> B[Temporary workspace helper]
  B --> C[QA CLI commands]
  C --> D[Report and summary files]
  D --> E[Assertions]
  E --> F[After-test cleanup]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -10. Total -10 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 30 40 -10
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 30 40 -10

Review metrics

None.

Technical review

Best possible solution:

Keep QA Lab fixture ownership in its established helper while preserving the CLI suite’s assertions and exit-code restoration.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is test-fixture cleanup. Current-main source confirms that the direct directory lifecycle sites remain.

Is this the best way to solve the issue?

Yes. The patch reuses the established QA Lab workspace helper without changing the CLI scenarios or their assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5c13ecfcbf19.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a focused test-fixture cleanup with no user-visible product change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this maintainer-owned, test-only PR. Its body reports exact-head Node and Bun runs of the QA CLI suite, covering fixture creation, report reads, and teardown; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-08-03T05:15:53.791Z sha 0d2abdf :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-05T04:07:45.780Z sha 0d2abdf :: needs real behavior proof before merge. :: none
  • reviewed August 6, 2026, 1:42 AM ET / 05:42 UTC sha unknown :: needs maintainer review before merge. :: none
  • reviewed August 21, 2026, 5:26 PM ET / 21:26 UTC sha unknown :: needs maintainer review before merge. :: none
  • reviewed 2026-08-21T21:26:52.418Z sha 0d2abdf :: needs maintainer review before merge. :: none
  • reviewed 2026-09-05T03:38:14.772Z sha 0d2abdf :: blocked before merge. :: none
  • reviewed 2026-09-24T15:29:55.167Z sha 25c6031 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Aug 21, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Sep 7, 2026
@steipete steipete self-assigned this Sep 24, 2026
@steipete steipete changed the title refactor(qa): consolidate CLI runtime test fixtures refactor(qa): share CLI test temporary workspace cleanup Sep 24, 2026
@steipete
steipete merged commit 057a032 into main Sep 24, 2026
133 of 135 checks passed
@steipete
steipete deleted the codex/cleanup50k-qa-tests-20260802-205341 branch September 24, 2026 15:57
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '9a1a6f7db9783d0b8abaf918bfe12978ea745b57': (26 commits)
  fix(maintainer): restore cold PR worktree provisioning (#157394)
  feat(ios): establish native Cloudflare Access sign-in sessions (#146996)
  fix: restore the Gateway after interrupted Doctor maintenance (#156854)
  refactor(line): retire the Express webhook adapter (#157369)
  refactor(cron): consolidate unavailable delivery targets (#157393)
  ci: apply Go memory defaults to architecture checks
  fix(cli): preserve the first PowerShell completion test failure (#157267)
  refactor(agents): consolidate transcript-tail model selection (#157382)
  fix(release): honor frozen validation contracts (#157034)
  fix(perf): use settled Kova terminal CPU accounting (#157029)
  chore(windows): verify packaged repair worker lifecycle (#157047)
  refactor(logging): share memory pressure threshold selection (#157164)
  fix(release): verify bundled fs-safe native bindings (#157027)
  perf(skills): skip warm prompt search when minimum cannot fit (#157343)
  fix(ui): avoid retaining detached tooltip anchors (#157226)
  perf(ci): reuse compiler state and shorten guard and UI tests (#157265)
  perf(ui): preserve model caches on unrelated metadata updates (#157254)
  chore: remove the tracked PR-body artifact and ignore .artifacts (#157296)
  refactor: consolidate duplicate MCP lifecycle tests (#157360)
  test(qa): consolidate CLI runtime fixtures (#118496)
  ...
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant