Skip to content

refactor(test): remove obsolete runner facades - #124159

Merged
steipete merged 1 commit into
mainfrom
test/remove-obsolete-test-runner-facades
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/remove-obsolete-test-runner-facades

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Removes obsolete test-runner surfaces that no longer represented the repository's actual execution model: an always-empty extension-channels Vitest project, a single-plan argument builder after routing became multi-plan, a delegated-run wrapper used only by its own test seam, and two test-only runner options.

These paths made the test infrastructure look more complex and more configurable than production actually is.

Why This Change Was Made

Tests now exercise createVitestRunSpecs, the canonical multi-plan production boundary. Channel extensions remain owned by their dedicated split projects, and project-ownership coverage still proves every normal test has exactly one full-suite owner.

The real run-vitest entrypoint continues to compose spawnTestProjectsRunner with the shared process-group completion owner. Its process-group primitives and watchdog behavior remain directly covered without preserving an alternate runner-path wrapper.

User Impact

No product behavior changes. Maintainers get a smaller test-routing surface with one canonical planning and delegation path.

Evidence

  • Scoped Vitest config, project ownership, test-project routing, run-vitest, and process-group owners: 6 files, 605 tests passed.
  • The coreTests, scripts, testRoot, and tooling changed gate passed through the documented trusted-source local fallback because no Crabbox/Testbox provider was ready. Typechecks, formatting, lint, dead-export scans, wrapper-shadowing, plugin boundaries, and temp-creation checks passed.
  • git diff --check passed.
  • Fresh structured autoreview reported no accepted/actionable findings on the final branch.

Production tooling delta: +7/-62, net -55. Tests/test support: +9/-128, net -119. Total: +16/-190, net -174. No behavior, docs, config contract, schema, protocol, dependency, or changelog change.

AI-assisted: yes.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 15, 2026 11:39
@steipete steipete self-assigned this Aug 15, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Aug 15, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 7:45 AM ET / 11:45 UTC.

ClawSweeper review

What this changes

The PR removes obsolete Vitest routing, delegation, and empty channel-shard facades so test commands use the canonical multi-plan runner path.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking correctness or security findings. This protected maintainer-authored cleanup removes test-only seams while preserving the canonical multi-plan routing and process-group completion paths.

Priority: P3
Reviewed head: 981428e0eb32777f1f4b9d862f6d6034251bedc5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative cleanup with retained owner-boundary coverage and no source-level blocking finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only cleanup has no user-visible behavior requiring contributor real-world proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only cleanup has no user-visible behavior requiring contributor real-world proof.
Evidence reviewed 6 items Canonical runner path retained: The real runner delegates explicit targets through spawnTestProjectsRunner and finishes through its own signal/exit owner; the PR removes only the unused wrapper around that path.
Channel ownership remains explicit: Changed extension paths first resolve to dedicated channel shards, while channel test files continue to route to the channels owner; the removed extension-channels project is not a remaining routing target.
Temporary include-file lifecycle remains owned: Generated include lists use unique OS-temp paths and the test-projects entrypoint removes each path in a finally block after the plan completes.
Findings None None.
Security None None.

How this fits together

OpenClaw’s test tooling maps requested targets to scoped Vitest plans, then launches those plans with shared process-group cleanup. This refactor simplifies that internal routing layer without changing product runtime behavior.

flowchart LR
  A[Test command] --> B[Test-target routing]
  B --> C[Vitest run plans]
  C --> D[Shared process-group runner]
  D --> E[Scoped test projects]
Loading

Before merge

  • Complete next step (P2) - This protected maintainer-authored PR needs normal exact-head CI and maintainer handling, not a repair-worker handoff.
Agent review details

Security

None.

PR surface

Tests -119, Other -55. Total -174 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 7 9 128 -119
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 7 62 -55
Total 9 16 190 -174

Review metrics

Metric Value Why it matters
Production versus test LOC production tooling +7/-62; tests/test support +9/-128 The net-negative cleanup removes test-only runner surface rather than adding a parallel execution path.

Stored data model

Persistent data-model change detected: serialized state: test/scripts/run-vitest.test.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Land one canonical test-plan and process-cleanup path after exact-head CI completes, leaving no test-only wrapper or empty project behind.

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

Not applicable: this PR removes internal test-tooling facades rather than fixing a user-facing failure.

Is this the best way to solve the issue?

Yes. The tests now exercise the multi-plan production boundary directly, while the actual runner retains its existing process-group completion owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0134c781cd1f.

Labels

Label changes:

  • add P3: This is bounded internal test-tooling cleanup with no product behavior, configuration, or protocol change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only cleanup has no user-visible behavior requiring contributor real-world proof.

Label justifications:

  • P3: This is bounded internal test-tooling cleanup with no product behavior, configuration, or protocol change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only cleanup has no user-visible behavior requiring contributor real-world proof.

Evidence

What I checked:

  • Canonical runner path retained: The real runner delegates explicit targets through spawnTestProjectsRunner and finishes through its own signal/exit owner; the PR removes only the unused wrapper around that path. (scripts/run-vitest.mts:1310, 981428e0eb32)
  • Channel ownership remains explicit: Changed extension paths first resolve to dedicated channel shards, while channel test files continue to route to the channels owner; the removed extension-channels project is not a remaining routing target. (scripts/test-projects.test-support.mts:3294, 981428e0eb32)
  • Temporary include-file lifecycle remains owned: Generated include lists use unique OS-temp paths and the test-projects entrypoint removes each path in a finally block after the plan completes. (scripts/test-projects.mts:91, 981428e0eb32)
  • Removed symbols have no remaining callers: A precise PR-head search found no references to the removed channel config, channel include exports, delegation wrapper, or single-plan argument builder. (scripts/lib/test-projects-delegation.mts:32, 981428e0eb32)
  • Feature history: The current runner seam and routing owner trace through recent test-tooling commits by steipete; blame attributes the refactor lines to this PR head and the retained process cleanup to its immediate predecessor. (scripts/lib/test-projects-delegation.mts:32, f4871eb86b43)
  • Current-main comparison: Current main has no additional changes on the nine touched paths relative to the PR base, so the review compared the branch against the same current routing behavior. (0134c781cd1f)

Likely related people:

  • steipete: Recent history and blame connect this contributor to both the retained runner seam and the submitted cleanup. (role: recent area contributor; confidence: high; commits: 981428e0eb32, f4871eb86b43, c70aee247e83; files: scripts/lib/test-projects-delegation.mts, scripts/test-projects.test-support.mts, test/vitest/vitest.extension-channels.config.ts)

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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 981428e0eb32777f1f4b9d862f6d6034251bedc5:

Production tooling delta: +7/-62, net -55. Tests/test support: +9/-128, net -119. Total: +16/-190, net -174. No behavior, docs, config contract, schema, protocol, dependency, or changelog change.

@steipete
steipete merged commit 1610771 into main Aug 15, 2026
250 of 253 checks passed
@steipete
steipete deleted the test/remove-obsolete-test-runner-facades branch August 15, 2026 11:47
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. scripts Repository scripts size: M 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