Repository navigation
fix(ci): avoid repeated discovery during changed-test planning - #174069
Conversation
Carry the invocation-owned changed-target plan into Vitest run-spec creation and reuse its skipped-path facts for empty-selection diagnostics. Standalone run-spec callers retain their existing target discovery. This reduces changed-target planning from two calls to one for normal changed runs and from three calls to one for empty changed runs, without changing the selected target multiset or process isolation.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR reuses one changed-test selection for execution planning and empty-selection diagnostics. Example: Run pnpm test:changed with no changed paths.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: it removes verified duplicate planning work that remains on current main, and the reviewed diff introduces no actionable correctness defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe repository test CLI turns Git changes into owned Vitest targets, execution specifications, and diagnostics before launching test processes. flowchart TD
A[Test CLI arguments] --> B[Git changed paths]
B --> C[Changed target plan]
C --> D[Vitest run specifications]
C --> E[Empty selection diagnostics]
D --> F[Test process scheduler]
Technical reviewBest possible solution: Reuse the invocation-owned plan while preserving standalone discovery, target coverage, broad fallback, and scheduler behavior. Do we have a high-confidence way to reproduce the issue? Current-main source shows two discovery calls for precise changed runs and a third for empty selections; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch fixes redundant work at its existing owner without adding a cache or changing selection policy, and correctly distinguishes omitted, null, and empty prepared selections. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6e73bd9d532c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +80, Other +2. Total +82 across 4 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 5:55 AM ET / 09:55 UTC. |
|
Merged via squash.
|
* commit 'ac03ca0b6d26a7dc55d0d262e40d2549631b1ea7': (25 commits) fix: apply shared plugin model policy to decisions (#156621) perf: shortlist transcript relevance scores before metadata reads (#174058) fix: strip standalone trailing NO_REPLY from replies (#171990) fix(ci): avoid repeated discovery during changed-test planning (#174069) fix(sqlite): preserve transaction outcomes when warnings throw (#157151) fix(ai): native video handoff to chat-completions providers + preflight video cost (#170920) fix(litellm): image generation fails when the backend returns image URLs (#173508) test(memory,gateway,infra,subagents): remove low-value tests (batch d152) (#174034) perf(memory): bound derived worker snapshot and pricing retention (#174067) fix(test): reduce eager imports during test startup (#174056) refactor(codex): share lifecycle preflight fixtures (#174062) test(gateway,matrix,agents,ui): remove low-value tests (batch d150) (#174025) perf(infra): batch usage refresh maintenance (#174050) fix(gateway): revert cold session list worker regression (#174052) refactor(config): consolidate browser meeting configuration (#173947) fix(cron): keep global-session deliveries on the selected agent (#173855) test(compaction): assert structured stale-writer failure (#174064) fix(cli): local terminal chat sends model requests without the configured proxy (#173530) test(ui): restore bootstrap preference locale after each case (#174065) fix: download session files through the development proxy (#173973) ...
…law#174069) Carry the invocation-owned changed-target plan into Vitest run-spec creation and reuse its skipped-path facts for empty-selection diagnostics. Standalone run-spec callers retain their existing target discovery. This reduces changed-target planning from two calls to one for normal changed runs and from three calls to one for empty changed runs, without changing the selected target multiset or process isolation.
What Problem This Solves
Changed-test commands repeat Git discovery and target selection before starting tests, including a third pass when the selection is empty.
User Impact
Internal test-runner maintenance: each invocation reuses its selected targets and diagnostics. Test coverage, fallback behavior, watch mode, and isolated test execution stay the same. No elapsed-time improvement has been measured.
Why This Change Was Made
The command already owns the changed-target plan, so it passes those prepared facts into run-spec creation and empty-selection diagnostics. Standalone run-spec callers continue to resolve their own selection. The production delta is +9 lines to carry this invocation-owned fact; test coverage adds 73 lines.
Release-note context: internal CI/test-planner efficiency only; CHANGELOG.md remains release-owned.
Evidence
Exact-head CI passed for a6e20d2: https://github.com/openclaw/openclaw/actions/runs/38881863437 (attempt 1; 45 successful jobs, 28 intentional skips, no failures).
ClawSweeper reviewed this unchanged head with no findings and no before-merge actions: #174069 (comment). The review lists no Rank-up moves. Its proof limitation remains explicit: no shipped-CLI trace or failing-base/passing-head replay was captured; the accepted proof is source review plus both actual hosted regression suites and enforced CI. No elapsed-time claim is made.