Skip to content

fix(test): keep Control UI changed tests in UI lane - #126197

Merged
steipete merged 1 commit into
mainfrom
steipete/keen-mahavira-557c99
Aug 19, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/keen-mahavira-557c99

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where pnpm test:changed on a Control UI-only diff could execute Control UI tests under the unit Vitest configuration when the diff also changed a root UI file such as ui/index.html. That produced widespread false failures and zero-test collections, hiding the useful changed-test signal.

Why This Change Was Made

The changed-test planner already admits every ui/** path, so the project classifier now assigns that same complete tree to the Control UI owner while preserving the earlier E2E and isolated-test classifications. A mixed root/source regression protects the full command boundary.

User Impact

There is no product runtime change. Contributors can rely on Control UI-only diffs staying in the Control UI Vitest lanes instead of spuriously starting the unit lane.

Evidence

  • Before: a diff containing ui/index.html, ui/src/components/markdown.test.ts, and ui/src/pages/agents/memory/dreaming.test.ts started the unit and UI configs; 39 suites failed, including 97/97 markdown tests and 1/45 dreaming tests.
  • After: the same mixed diff starts tooling, UI, and UI-isolated only; all selected tests pass and no unit shard starts.
  • node scripts/run-vitest.mjs ui/src/components/markdown.test.ts ui/src/pages/agents/memory/dreaming.test.ts — 142/142 passed.
  • node scripts/run-vitest.mjs test/scripts/test-projects.test.ts test/scripts/run-vitest.test.ts — 375/375 passed.
  • node scripts/check-changed.mjs -- scripts/test-projects.test-support.mts test/scripts/test-projects.test.ts — passed.
  • Fresh autoreview — no actionable findings.

AI-assisted; implementation, root cause, and proof reviewed by the maintainer.

@clawsweeper

clawsweeper Bot commented Aug 19, 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 19, 2026 05:18
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 19, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The initial exact review run expired its review lease while stuck for 45 minutes installing optional live-proof terminal tools. That run was cancelled after the lease expired; please review the unchanged head again.

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 2:18 AM ET / 06:18 UTC.

ClawSweeper review

What this changes

The PR sends root Control UI paths such as ui/index.html to the Control UI Vitest lanes and adds a regression test for mixed root and source changes.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this maintainer-labeled PR open for normal exact-head CI and human merge handling. The focused classifier repair is correct and has no actionable review finding.

Likely related people: steipete (high confidence) and vincentkoc (medium confidence) from changed-test routing history.

Priority: P2
Reviewed head: bf163b6bd638d43750cee78695219bdb7d9ff785

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-proven harness repair with meaningful regression coverage; only exact-head refresh remains.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned, test-only harness repair includes concrete before/after terminal results in the PR body; the external contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned, test-only harness repair includes concrete before/after terminal results in the PR body; the external contributor proof gate does not apply.
Evidence reviewed 6 items Current-main defect: Current main still classifies only ui/src as UI, so a root path such as ui/index.html falls through to the default project.
Owner-boundary repair: The branch broadens the UI owner to ui/** only after the existing E2E and isolated-test classifications, preserving their precedence.
End-to-end planner contract: A root file expands to its directory test glob, UI grouping adds matching isolated tests, and the runner passes the plan through its include-file contract to the Vitest project.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs test/scripts/test-projects.test.ts

Result: FAIL (failed) — execution before step 1 run: live-proof package manager pnpm is unavailable after its official installer (curl -fsSL https://get.pnpm.io/install.sh | sh -): command failed without output

live-proof package manager pnpm is unavailable after its official installer (curl -fsSL https://get.pnpm.io/install.sh | sh -): command failed without output

Assertions:

  • FAIL expect_output: Test Files

How this fits together

The changed-test planner turns a Git diff into Vitest project plans used by pnpm test:changed. This classifier decides whether a Control UI change enters the UI projects or the general unit project before the runner writes the project include list.

flowchart LR
A[Changed Git paths] --> B[Changed-test planner]
B --> C[Path classifier]
C --> D{Control UI path}
D -->|UI root or source| E[UI test project]
E --> F[Isolated UI project]
D -->|Other path| G[Owning test project]
Loading

Before merge

  • Resolve merge risk (P1) - The branch is behind current main and exact-head CI is incomplete; because this changes automated test selection, refresh the merge base and rerun the focused planner proof before landing.
Agent review details

Security

None.

PR surface

Tests +13, Other 0. Total +13 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 13 0 +13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 2 14 1 +13

Review metrics

Metric Value Why it matters
Production versus test delta production +0, test support 0 net (1 replacement), tests +13 The fix changes one test-planner ownership predicate and adds focused command-boundary coverage without product-runtime growth.

Merge-risk options

Maintainer options:

  1. Refresh the exact branch head (recommended)
    Rebase or refresh against current main and rerun the focused changed-test planner check so CI routing is proven on the mergeable head.

Technical review

Best possible solution:

Rebase or otherwise refresh this small owner-boundary repair onto current main, then land it once exact-head validation confirms UI-root diffs select only the UI and UI-isolated projects.

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

Yes: current main's ui/src-only classifier can be driven with a changed-path list containing ui/index.html plus UI tests, producing a default unit plan; the branch regression covers that exact planner boundary.

Is this the best way to solve the issue?

Yes: aligning the classifier's UI ownership with the planner's existing ui/** admission is the narrowest fix, while retaining the earlier E2E and isolated-test ownership decisions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a source-proven changed-test routing bug with limited contributor and CI blast radius.
  • add merge-risk: 🚨 automation: The patch changes automated Vitest project selection for every changed Control UI root path.
  • 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-owned, test-only harness repair includes concrete before/after terminal results in the PR body; the external contributor proof gate does not apply.

Label justifications:

  • P2: This is a source-proven changed-test routing bug with limited contributor and CI blast radius.
  • merge-risk: 🚨 automation: The patch changes automated Vitest project selection for every changed Control UI root path.
  • 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-owned, test-only harness repair includes concrete before/after terminal results in the PR body; the external contributor proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the canonical changed-test route refactor and a later owning-shard repair that both touch this classifier and its routing tests. (role: test-planner feature contributor; confidence: high; commits: 2fcb47ad1e69, 94c28e093d69; files: scripts/test-projects.test-support.mts, test/scripts/test-projects.test.ts)
  • vincentkoc: Recent routing and CI-coverage fixes changed the same planner and test suite. (role: adjacent changed-routing contributor; confidence: medium; commits: c702bf27961a, 13322b2adc8d; files: scripts/test-projects.test-support.mts, test/scripts/test-projects.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh against current main and rerun the focused changed-test planner command on the exact merge head.

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 exact head bf163b6bd638d43750cee78695219bdb7d9ff785:

  • node scripts/run-vitest.mjs test/scripts/test-projects.test.ts test/scripts/run-vitest.test.ts — 375/375 passed.
  • node scripts/run-vitest.mjs ui/src/components/markdown.test.ts ui/src/pages/agents/memory/dreaming.test.ts — 142/142 passed.
  • node scripts/check-changed.mjs -- scripts/test-projects.test-support.mts test/scripts/test-projects.test.ts — passed, including formatting, script/root-test typechecks, and lint/guards.
  • git diff --check origin/main...HEAD — passed.
  • Exact-head CI run https://github.com/openclaw/openclaw/actions/runs/32218926830 completed successfully; required openclaw/ci-gate passed.
  • Production/tooling LOC: +1/-1, net 0. Tests: +13/-0.
  • Fresh autoreview found no accepted/actionable findings. ClawSweeper found no actionable review finding and confirmed the owner-boundary fix.

ClawSweeper's optional rank-up move to refresh against newer main is skipped: this single commit was already rebased once onto the fetched origin/main, the exact rebased head passed the focused proof and required CI, GitHub reports it mergeable, and repository landing policy treats non-conflicting behind-main drift as advisory.

Proof gap: no packaged/live product proof was run because this is a deterministic test-planner repair with no product runtime behavior or package surface.

@steipete
steipete merged commit 1d2e914 into main Aug 19, 2026
112 of 119 checks passed
@steipete
steipete deleted the steipete/keen-mahavira-557c99 branch August 19, 2026 06:38
@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 merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS 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