Skip to content

fix(ci): keep changed tests when selecting their consumers - #148946

Merged
vincentkoc merged 2 commits into
mainfrom
fix/ci-changed-test-self-coverage-20260915
Sep 15, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/ci-changed-test-self-coverage-20260915

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Closes #148945

What Problem This Solves

Fixes precise test selection omitting a changed tooling test when other tests import or reference it.

User Impact

CI and local changed-test runs retain the changed test as well as its automatically discovered consumers. There is no runtime product change or measured speedup claim.

Why This Change Was Made

The shared tooling resolver supplies both aggregate and mixed-input selection. Keep an otherwise routable changed test when it has no explicit owner, before deduplicating it with discovered consumers. Explicit owners, live/generated exclusions, and fallback rules remain unchanged.

This is independent of the pending paired Docker/isolated CI-group change; it does not change group configuration or preparation policy.

Evidence

  • Before the fix, both standalone and mixed-input regression cases omit the changed test; the non-test and explicit-owner controls pass.
  • After the fix, all five focused cases pass, including duplicate input/reader handling and live exclusion.
  • Full test/scripts/test-projects.test.ts: 735 passed.
  • Script and test-root typechecks, scoped lint, formatting, script erasability, and git diff --check passed. The test-root check required materializing a tracked Linux JSON fixture omitted by the sparse checkout; no fixture contents changed.
  • Independent canonical review completed with no actionable P0-P2 findings.
  • The original base failed the core TypeScript graph guard with 84 matching diagnostic lines. That separate prerequisite is now adopted on main through improve: speed up session search for restricted operators #148826 in 0cd944c: state/logging no longer includes the secrets tests, while agents/tools retains both patterns. The earlier tracking PR fix(ci): assign secrets tests to one shard #148933 remains a separate owner operation.
  • Refreshed onto verified main 151a13a3e7be326ceef5efa43f11a0f42b38c851 for that demonstrated baseline failure. The graph boundary guard now passes. The two reviewed file contents, dependency contracts, and test wrapper remain unchanged, so the original 735-test and canonical-review evidence is retained rather than represented as a new full run. The actual PR delta remains two files.
  • Exact-head hosted CI passed for 7e4d01e51121be272630994078225379f3bd8c01: https://github.com/openclaw/openclaw/actions/runs/34951116661.
  • No Docker/private-QA workload, live provider, or full FRV run was executed.

@vincentkoc vincentkoc self-assigned this Sep 15, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 5:16 AM ET / 09:16 UTC (Revision 2).

ClawSweeper review

What this changes

Preserves changed tooling tests alongside their discovered consumers in CI and local test selection, with regression coverage for standalone and mixed inputs.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main and v2026.9.4 retain the reported omission. The previous graph prerequisite is now merged, and the reviewed files are unchanged. No actionable correctness or security findings remain.

Priority: P2
Reviewed head: 7e4d01e51121be272630994078225379f3bd8c01

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with useful regression coverage and no remaining actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored internal tooling PR is exempt from the external-contributor proof gate; its reported resolver regressions exercise both selection routes, and no authority-bearing behavior changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored internal tooling PR is exempt from the external-contributor proof gate; its reported resolver regressions exercise both selection routes, and no authority-bearing behavior changes.
Evidence reviewed 8 items Shared owner repairs both selection routes: The added condition retains only routable test files without direct owners. Both aggregate tooling selection and mixed-input precise selection call this resolver; existing deduplication, explicit ownership, deleted-test filtering, and live-test exclusion remain intact.
Current main still needs the repair: The fetched main implementation collects consumer targets without retaining the changed test. A nonempty consumer result bypasses the later self-selection fallback.
Latest release retains the omission: The v2026.9.4 source has the same consumer-only target construction. The release was inspected through GitHub after its tag object was unavailable locally.
Findings None None.
Security None None.

How this fits together

OpenClaw’s test selector converts changed repository paths into targeted test runs. Its shared tooling resolver combines explicit test ownership with discovered consumers before the runner executes the selected tests.

flowchart TD
  A[Changed repository paths] --> B[Exclude deleted tests]
  B --> C[Shared tooling resolver]
  C --> D[Explicit owners or discovered consumers]
  C --> E[Retain eligible changed test]
  D --> F[Deduplicate selected targets]
  E --> F
  F --> G[Targeted test runner]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +59. Total +59 across 2 files.

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

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #148945
Summary: This PR is the implementation candidate for the paired test-selection bug; the graph partition work is distinct.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep self-selection and consumer discovery together in the shared resolver while preserving explicit ownership and existing exclusions.

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

Yes, from source: an unowned tooling test with discovered consumers produces a nonempty mapping that bypasses self-selection on current main. The supplied regression cases cover both routes; this read-only review did not execute them.

Is this the best way to solve the issue?

Yes. The small shared-owner repair covers both callers without duplicating policy or changing explicit test ownership.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0eff93e4be62.

Labels

Label justifications:

  • P2: Repairs a bounded test-selection coverage defect affecting CI and local developer validation.
  • 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: The MEMBER-authored internal tooling PR is exempt from the external-contributor proof gate; its reported resolver regressions exercise both selection routes, and no authority-bearing behavior changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shakkernerd: 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 (1 earlier review cycle)
  • reviewed 2026-09-15T09:03:56.836Z sha 3d0cb7b :: needs changes before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 15, 2026 09:11
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc merged commit baf188f into main Sep 15, 2026
125 of 127 checks passed
@vincentkoc
vincentkoc deleted the fix/ci-changed-test-self-coverage-20260915 branch September 15, 2026 09:29
@vincentkoc

Copy link
Copy Markdown
Member 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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

[Bug]: Changed tooling tests are omitted when consumers are selected

1 participant