Skip to content

fix(ci): avoid a redundant runtime build in repair tests - #195288

Merged
vincentkoc merged 3 commits into
mainfrom
perf/ci-paid-job-packing-20261108
Nov 8, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
perf/ci-paid-job-packing-20261108

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Selected update-repair tests force a complete runtime build even though their real subprocess worker is already supplied by the test runner.

User Impact

CI avoids one redundant runtime build whenever these repair tests are selected without another packaged-runtime consumer. All repair, rollback, isolation, and required boundary coverage remains. No product behavior changes.

Why This Change Was Made

Reuse the existing worker materialization helper for the synthetic installed package instead of importing the repository dist worker. Remove only this test file from runtime-build prerequisites. Mixed selections still prepare the runtime when another test needs it.

Evidence

  • The routing regression fails on the base: repair-only selection incorrectly requests runtime. The fixed routing file passed all 112 cases; after simplifying the new regression, its repair-only and mixed repair/recovery assertions pass again. Mixed selection still requests the runtime.
  • All 46 existing repair cases pass with dist/infra/update-candidate-state.worker.js absent before and after execution. The real inspection subprocess and restored-generation assertions remain in use.
  • Recorded CI job 128770701461 spent 85.2 seconds preparing qaRuntime. Exact-input replay at base 141890196ac07d6c7d86d77fbf998ea2b04875b3, using the same bun-all policy, changes runtime-build jobs from one to zero. It preserves all 26 direct targets, grouped selections, mandatory boundary coverage, and seven Node jobs. Normal packing redistributes three targets.
  • The 85.2-second removal is projected from existing CI evidence; new end-to-end runtime and billing savings are not yet measured. Local correctness-run times are not a matched performance comparison.
  • Focused CLI-update and tooling TypeScript checks, lint, formatting, and diff checks pass.
  • Independent local autoreview of the original three-file change is scoped-clean at P0–P2. Full local ClawSweeper review of 1418901..8857ebd found no functional or security defect; its test-budget finding is fixed by simplifying the regression. The ratchet now passes: 6,579,870 lines against a 6,579,871 ceiling, with no new allocation or relaxed baseline.
  • PR CI exposed a synthetic packing fixture coupled to the process inventory. Adjusting its mocked CLI duration from 136 to 130 seconds preserves its intended affordable-bin scenario and every budget, overflow, isolation, and complete-coverage assertion. The full 160-case planner file passes (51.33 seconds); focused reproduction and independent review pass.

@clawsweeper

clawsweeper Bot commented Nov 8, 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 self-assigned this Nov 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes scripts Repository scripts size: XS labels Nov 8, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 8, 2026 15:56
@vincentkoc
vincentkoc enabled auto-merge (squash) November 8, 2026 16:04
@vincentkoc
vincentkoc disabled auto-merge November 8, 2026 16:09
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 8, 2026
@vincentkoc
vincentkoc merged commit f1c5af0 into main Nov 8, 2026
133 of 134 checks passed
@vincentkoc
vincentkoc deleted the perf/ci-paid-job-packing-20261108 branch November 8, 2026 16:26
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR reuses the existing worker fixture helper so selected repair tests no longer require a complete runtime build.

Example: CI selects src/cli/update-cli/update-command-post-update-repair.test.ts.

  • Before: The selection requests a runtime build to supply its candidate-state worker.
  • After: The fixture uses the runner-supplied worker; adding post-update recovery tests still requests the runtime.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-supported with passing current-head CI; performance evidence establishes projected build-count savings rather than measured workflow or billing improvement.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored tooling PR is outside the ordinary contributor proof gate; its body reports repair cases passing without the dist worker and a planner replay eliminating the redundant build, supported by current-head CI.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: CI performs a complete runtime build for selected repair tests even though the runner already supplies their worker.
Reason: The maintainer-authored direction removes unnecessary work through an existing owner while retaining the relevant test boundaries.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR removes a verified redundant build dependency while preserving repair coverage; no actionable correctness or security defect was found.

Priority: P3
Reviewed head: b202778513824fa8402058a777b9dfab1564a2f4

Before merge

None.

Findings

None.

Agent review details

How this fits together

The test prerequisite planner turns selected test files into build requirements, while the repair fixture supplies a candidate-package entrypoint for the real inspection subprocess.

flowchart TD
  A[Selected test files] --> B[Build prerequisite planner]
  B --> C[Runtime preparation when required]
  B --> D[Vitest runner]
  D --> E[Existing worker materializer]
  E --> F[Candidate package fixture]
  F --> G[Inspection subprocess and rollback assertions]
Loading

Technical review

Best possible solution:

Reuse the existing worker materializer and remove only the repair suite’s redundant runtime prerequisite while retaining mixed-selection and rollback coverage.

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

Source inspection establishes the redundant dependency: main explicitly requests runtime preparation for this suite, whose old fixture imports the repository dist worker; no reproduction was executed during this read-only review.

Is this the best way to solve the issue?

The smallest complete fix uses the existing worker owner, removes the obsolete prerequisite, and protects both repair-only and mixed selections without adding machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 13769ac805bb.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 818f1c7 adds test/scripts/ci-node-test-plan.test.ts:822 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 818f1c72db8b; files: test/scripts/ci-node-test-plan.test.ts)
  • Vincent Koc: Raw commit 0a2bbda adds scripts/lib/vitest-build-prerequisites.mts:285 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0a2bbda9c8b9; files: scripts/lib/vitest-build-prerequisites.mts)

PR surface

Tests +4, Other -1. Total +3 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 12 8 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 4 12 9 +3

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is a focused CI efficiency improvement with no shipped product behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused CI efficiency improvement with no shipped product behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 8, 2026, 11:25 AM ET / 16:25 UTC.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
…5288)

* fix(ci): avoid a redundant runtime build in repair tests

* test(ci): keep repair prerequisite coverage within budget

* test(ci): retain affordable CLI packing coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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