Skip to content

improve(ci): cut QA smoke build overhead - #118111

Merged
steipete merged 1 commit into
mainfrom
codex/test-performance-qa-build
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-performance-qa-build

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Every QA smoke profile currently spends 202–213 seconds building a full publish-shape package before rebuilding the runtime needed by the smoke harness. The same four profiles repeat that work independently, so it adds roughly three minutes to the CI critical path and about twelve minutes of aggregate runner time.

Why This Change Was Made

Restore the runtime-only package sequence while preserving the package-safety repair from #113821: build the public QA runtime and UI, create and strictly validate the tarball with --skip-build, then overlay private QA runtime artifacts into the source checkout only after the public tarball is sealed. Private QA never enters the package, and the smoke profiles still receive both the validated package and the private source runtime they need. Test partitions, sharding, and scenario coverage are unchanged.

User Impact

No product behavior changes. Pull request and main CI should reach QA smoke results roughly 2.6–2.8 minutes sooner, removing the QA job as the ceiling for the broader test-performance work.

Evidence

  • Clean CI baseline 30757987976: the four Build QA smoke runtime steps took 202–213 seconds each.
  • Historical pre-regression CI 30174863503: the runtime-only package sequence completed in 18–19 seconds and all four profiles passed, including the package-consuming plugin lifecycle scenario.
  • Exact local sequence on the current base:
    • public qaRuntime: 13.08s
    • Control UI build and validation: 4.88s
    • strict --skip-build package creation and import-graph check: 17.38s
    • private QA runtime overlay: 11.97s
    • total: 47.31s, an estimated 155–166s saved per profile against current CI
  • check-openclaw-package-tarball: passed, including the complete dist import graph.
  • Tarball inspection: no private QA extension, Plugin SDK, or runtime JavaScript artifacts; the post-package source overlay contains the expected qa-lab, qa-channel, and QA Plugin SDK files.
  • node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts --reporter=verbose: 96 passed, 1 platform-gated skip.
  • actionlint .github/workflows/ci.yml, targeted formatting, and git diff --check: clean.
  • Codex autoreview: no accepted/actionable findings.

The fresh QA worktree intentionally had no private dependency install, and approved remote backends were unavailable. The exact build/package proof therefore ran in an already-hydrated worktree at the same base SHA; hosted CI is the broad Linux and four-profile gate.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 2:27 PM ET / 18:27 UTC.

ClawSweeper review

What this changes

The PR changes QA smoke CI to build and validate the public package before overlaying private QA runtime artifacts, avoiding a repeated full package build in each smoke profile.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for normal maintainer review. The patch preserves the public-package/private-QA boundary, has a focused workflow guard, and already has one passing QA smoke profile; the remaining three smoke profiles are the material merge gate. The maintainer label also requires explicit maintainer handling rather than automated cleanup.

Priority: P3
Reviewed head: d98c90fa61bcee0030b3f1707d6474e51faea6df

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, contract-aligned CI optimization with concrete package-boundary proof and a passing smoke profile; remaining matrix completion is the only material confidence reducer.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body documents an after-fix package/tarball validation sequence and the supplied checks show QA Smoke CI profile 1/4 passing; the remaining profiles are merge-gate evidence, not missing contributor proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body documents an after-fix package/tarball validation sequence and the supplied checks show QA Smoke CI profile 1/4 passing; the remaining profiles are merge-gate evidence, not missing contributor proof.
Evidence reviewed 6 items Current main still has the costly sequence: Current main invokes the package builder first, which performs the full package-artifact build, then separately runs the QA runtime and UI builds. The PR is therefore still necessary rather than already implemented on main.
Public package boundary is explicit: The package builder deliberately removes OPENCLAW_BUILD_PRIVATE_QA from its build environment, so the PR's public build and sealed tarball remain free of private QA entrypoints before the later source-checkout overlay.
QA runtime profile is a bounded overlay build: The qaRuntime build profile produces the runtime and plugin assets needed by QA without the package-only declaration and metadata steps; the PR runs it once without private QA before sealing, then once with private QA after sealing.
Findings None None.
Security None None.

How this fits together

QA smoke CI builds an npm-style public OpenClaw package for package-consuming scenarios, then prepares private QA-only runtime artifacts in the checkout for the smoke harness. The package tarball and the private runtime are consumed together by each of four parallel smoke profiles.

flowchart LR
  A[QA smoke profile] --> B[Build public runtime]
  B --> C[Build Control UI]
  C --> D[Seal and validate public package]
  D --> E[Overlay private QA runtime]
  E --> F[Run smoke scenarios]
  D --> G[Package-consuming checks]
Loading

Before merge

  • Resolve merge risk (P1) - This changes the CI package/build sequence; wait for all four QA smoke profiles to complete successfully before merging, because only profile 1/4 has completed in the supplied check state.
  • Complete next step (P2) - The patch has no discrete repair finding, but the protected maintainer label and unfinished smoke matrix require an explicit maintainer merge decision after CI completes.
Agent review details

Security

None.

PR surface

Tests +11, Config +3. Total +14 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 16 5 +11
Docs 0 0 0 0
Config 1 6 3 +3
Generated 0 0 0 0
Other 0 0 0 0
Total 2 22 8 +14

Review metrics

Metric Value Why it matters
QA smoke build sequence 1 full package build removed per profile; 2 runtime builds retained The change is intentionally a CI critical-path optimization while preserving the public-package and private-QA separation.

Merge-risk options

Maintainer options:

  1. Wait for complete smoke proof (recommended)
    Pause merge until QA Smoke CI profiles 2/4 through 4/4 finish green on this head, confirming the reordered package and private-runtime sequence across the full scenario partition.
  2. Pause on package-consumer failure
    If a remaining profile fails to load the package or QA runtime, keep the PR open and repair the specific build-boundary regression rather than accepting a faster but incomplete smoke setup.

Technical review

Best possible solution:

Land the reordered sequence only after the complete four-profile QA smoke matrix confirms that package-consuming scenarios still receive the sealed public tarball while source-only QA scenarios receive the post-package private overlay.

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

Not applicable as a user bug reproduction: the relevant proof is the CI artifact sequence. The PR supplies a completed package/tarball path and QA Smoke CI profile 1/4 success, with the rest of the matrix still running.

Is this the best way to solve the issue?

Yes. Building public artifacts before sealing the tarball and applying the private QA overlay afterward matches the package builder's explicit private-entrypoint exclusion, avoids duplicating the full package build, and keeps the safety boundary testable.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a low-risk internal CI performance improvement with no claimed product behavior change.
  • add merge-risk: 🚨 automation: The PR changes the workflow ordering that prepares artifacts for four QA smoke jobs, so an incorrect sequence could break CI-only package or harness execution after merge.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body documents an after-fix package/tarball validation sequence and the supplied checks show QA Smoke CI profile 1/4 passing; the remaining profiles are merge-gate evidence, not missing contributor proof.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body documents an after-fix package/tarball validation sequence and the supplied checks show QA Smoke CI profile 1/4 passing; the remaining profiles are merge-gate evidence, not missing contributor proof.

Label justifications:

  • P3: This is a low-risk internal CI performance improvement with no claimed product behavior change.
  • merge-risk: 🚨 automation: The PR changes the workflow ordering that prepares artifacts for four QA smoke jobs, so an incorrect sequence could break CI-only package or harness execution after merge.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body documents an after-fix package/tarball validation sequence and the supplied checks show QA Smoke CI profile 1/4 passing; the remaining profiles are merge-gate evidence, not missing contributor proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body documents an after-fix package/tarball validation sequence and the supplied checks show QA Smoke CI profile 1/4 passing; the remaining profiles are merge-gate evidence, not missing contributor proof.

Evidence

What I checked:

  • Current main still has the costly sequence: Current main invokes the package builder first, which performs the full package-artifact build, then separately runs the QA runtime and UI builds. The PR is therefore still necessary rather than already implemented on main. (.github/workflows/ci.yml:1759, d02101d7ceb6)
  • Public package boundary is explicit: The package builder deliberately removes OPENCLAW_BUILD_PRIVATE_QA from its build environment, so the PR's public build and sealed tarball remain free of private QA entrypoints before the later source-checkout overlay. (scripts/package-openclaw-for-docker.mjs:29, d02101d7ceb6)
  • QA runtime profile is a bounded overlay build: The qaRuntime build profile produces the runtime and plugin assets needed by QA without the package-only declaration and metadata steps; the PR runs it once without private QA before sealing, then once with private QA after sealing. (scripts/build-all.mjs:303, d02101d7ceb6)
  • Patch enforces the intended order: The workflow first builds public runtime and UI, runs package creation with --skip-build, then overlays the private QA runtime; the paired guard test asserts both build occurrences and their ordering. (.github/workflows/ci.yml:1763, d98c90fa61bc)
  • Workflow invariant provenance: Blame ties the current smoke-package sequence and its original guard expectations to the recent workflow revision, so the relevant owner path is recent and not an abandoned legacy branch. (.github/workflows/ci.yml:1761, 19aad4ac2a40)
  • Observed after-fix behavior: The provided PR evidence reports the exact package sequence and tarball import-graph check passing, and the GitHub check context shows QA Smoke CI profile 1/4 completed successfully; profiles 2–4 remain in progress. (.github/workflows/ci.yml:1759, d98c90fa61bc)

Likely related people:

  • steipete: Peter Steinberger authored the current smoke-workflow revision identified by blame, the proposed optimization commit, and the related merged package-safety repair. (role: recent workflow and package-boundary contributor; confidence: high; commits: 19aad4ac2a40, d98c90fa61bc, d5a374070794; files: .github/workflows/ci.yml, test/scripts/ci-workflow-guards.test.ts, scripts/package-openclaw-for-docker.mjs)

Rank-up moves

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

  • Wait for the remaining QA Smoke CI profiles to complete successfully before merge.

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 steipete self-assigned this Aug 2, 2026
@steipete
steipete merged commit 9236fb8 into main Aug 2, 2026
119 of 127 checks passed
@steipete
steipete deleted the codex/test-performance-qa-build branch August 2, 2026 18:35
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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