Skip to content

perf(ci): use runtime-only builds for Node test prerequisites - #134294

Merged
steipete merged 1 commit into
mainfrom
codex/ci-runtime-build-profile-20260831
Aug 31, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ci-runtime-build-profile-20260831

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Node test shards currently rebuild plugin SDK declarations and Control UI before running tests that consume only the compiled CLI runtime. In the retained native run, SDK declarations alone consumed 149.4 seconds of a 236.1-second pretest build.

Use the existing qaRuntime build profile for these prerequisites. It keeps runtime JavaScript, plugin assets, private QA entry selection, build provenance, freshness stamps, and the build-before-workers ordering. The separate build-artifacts job continues to own SDK declaration and Control UI validation. Release/package builds are unchanged. No jobs, runners, configuration options, concurrency caps, timeouts, or tests are removed.

Validation: all 75 existing build-profile tests plus the changed workflow guard pass; the guard was observed failing before the command change. The full changed-file gate, canonical workflow checks, and scoped Codex review pass. Parsed-workflow comparison changes only the pretest command. Two cold local exact-head builds completed in 53.46 seconds (ordinary) and 47.41 seconds (private QA), starting with no dist trees. All five registered consumer files / 12 cases passed through their normal configs without a runtime rebuild. Both builds retained exact-head build-info and freshness stamps; runtime-postbuild owns provenance publication. Native CI/Testbox results remain required before landing; these local times are not directly comparable to the retained hosted baseline.

Runtime production LOC: 0. Workflow: 4 added / 5 removed. Documentation: 5 / 5. Existing test assertion: 1 / 1.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS maintainer Maintainer-authored PR labels Aug 31, 2026
@steipete
steipete marked this pull request as ready for review August 31, 2026 16:58
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 1:17 PM ET / 17:17 UTC.

ClawSweeper review

What this changes

The PR changes Node-test CI setup to use the existing runtime-only qaRuntime build profile, with matching CI documentation and workflow-guard expectations.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The prior build-info blocker is disproved: qaRuntime runs the runtime postbuild, which writes build provenance after the runtime completes. This is a useful, narrowly scoped CI optimization; keep it open for the remaining exact-head native CI/Testbox gate.

Priority: P2
Reviewed head: 1dbcdef071ab1b5ed02e0ecabba2bdab4d33e241

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The source contract and focused guards support the change, with exact-head native CI/Testbox remaining as the appropriate final automation proof.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored internal CI reliability change is outside the external-contributor proof gate; the supplied cold exact-head terminal runs are supplemental evidence for the changed build profile.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal CI reliability change is outside the external-contributor proof gate; the supplied cold exact-head terminal runs are supplemental evidence for the changed build profile.
Evidence reviewed 7 items Runtime profile contract: qaRuntime includes runtime compilation, plugin assets, runtime postbuild, build stamp, and runtime-postbuild stamp; it intentionally excludes only the UI and SDK-declaration steps.
Build-info producer: The runtime postbuild lists dist/build-info.json as an output and invokes writeBuildInfo only after runtime completion, so the profile does produce the metadata cited by the earlier review.
Consumer and planner boundary: The planner assigns pretest builds only to five named runtime consumers and selects private-qa ahead of ordinary runtime mode; its tests preserve that ownership for both full and compact plans.
Findings None None.
Security None None.

How this fits together

Node-test CI shards prepare compiled CLI artifacts before Vitest workers start. The chosen profile must supply runtime JavaScript, plugin assets, provenance, and freshness artifacts, while the dedicated artifact job retains UI and SDK declaration validation.

flowchart LR
  Matrix[Node test matrix] --> Prebuild[Pretest build step]
  Prebuild --> Profile[qaRuntime profile]
  Profile --> Runtime[CLI runtime and plugin assets]
  Runtime --> Metadata[Build provenance and freshness stamps]
  Metadata --> Shards[Vitest test shards]
  ArtifactJob[Artifact validation job] --> Validation[Control UI and SDK declarations]
Loading

Before merge

  • Resolve merge risk (P1) - This changes the CI pretest command; the local cold-run evidence is strong, but exact-head native CI/Testbox still needs to confirm the hosted shard matrix has no untracked dependency on the broader profile.
  • Complete next step (P2) - The prior actionable finding is resolved; this maintainer-authored automation change now needs only the normal exact-head CI/Testbox merge gate.
Agent review details

Security

None.

PR surface

Tests 0, Docs 0, Config -1. Total -1 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 1 0
Docs 1 5 5 0
Config 1 4 5 -1
Generated 0 0 0 0
Other 0 0 0 0
Total 3 10 11 -1

Review metrics

Metric Value Why it matters
Production versus test delta production +0, tests +0; workflow +4/-5; documentation +5/-5; existing guard +1/-1 The patch changes only CI orchestration, its documented contract, and one existing assertion; it adds no product runtime code.

Merge-risk options

Maintainer options:

  1. Finish exact-head CI validation (recommended)
    Retain the smaller profile and merge after native CI/Testbox verifies the selected Node-test shards against the exact head.

Technical review

Best possible solution:

Merge the runtime-only profile after exact-head native CI/Testbox confirms the selected Node shards retain their runtime artifacts and freshness checks; no additional provenance writer is needed.

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

Not applicable: this is a CI optimization, not an end-user bug report. The relevant contract is source-reproducible through the build-profile, consumer-planner, and workflow-guard evidence.

Is this the best way to solve the issue?

Yes. Reusing the existing runtime-focused profile preserves one canonical build path for runtime consumers while leaving UI and SDK declaration validation with its dedicated job.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • 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 MEMBER-authored internal CI reliability change is outside the external-contributor proof gate; the supplied cold exact-head terminal runs are supplemental evidence for the changed build profile.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded CI optimization whose failure mode affects test automation rather than the user runtime.
  • merge-risk: 🚨 automation: Changing the pretest build profile can break hosted Node-test shards if their artifact prerequisites are incomplete.
  • 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 MEMBER-authored internal CI reliability change is outside the external-contributor proof gate; the supplied cold exact-head terminal runs are supplemental evidence for the changed build profile.

Evidence

What I checked:

  • Runtime profile contract: qaRuntime includes runtime compilation, plugin assets, runtime postbuild, build stamp, and runtime-postbuild stamp; it intentionally excludes only the UI and SDK-declaration steps. (scripts/build-all.mts:313, 1dbcdef071ab)
  • Build-info producer: The runtime postbuild lists dist/build-info.json as an output and invokes writeBuildInfo only after runtime completion, so the profile does produce the metadata cited by the earlier review. (scripts/runtime-postbuild.mts:740, 1dbcdef071ab)
  • Consumer and planner boundary: The planner assigns pretest builds only to five named runtime consumers and selects private-qa ahead of ordinary runtime mode; its tests preserve that ownership for both full and compact plans. (scripts/lib/vitest-build-prerequisites.mts:16, 1dbcdef071ab)
  • Workflow guard: The changed guard verifies the pretest command, private-QA environment selection, and ordering before the shard runner; independent build-profile tests already assert the qaRuntime step list and static-asset ordering. (test/scripts/ci-workflow-guards.test.ts:9496, 1dbcdef071ab)
  • Current-main comparison: Current main still uses the broader pretest command, so the optimization is not already implemented or superseded. (.github/workflows/ci.yml:3054, c62251f552c6)
  • Area history: Recent profile and CI optimization work includes the merged build-profile change, providing routing context but not an introduction claim for this PR. (scripts/build-all.mts:313, ba108ad66f74)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Let the exact-head native CI/Testbox validation complete for the changed workflow path.

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-08-31T17:06:55.494Z sha 1dbcdef :: needs changes before merge. :: [P1] Use a profile that writes build-info for runtime consumers

@steipete

Copy link
Copy Markdown
Contributor Author

The provenance finding is disproved by the existing postbuild owner and a clean exact-head reproduction. qaRuntime runs runtime-postbuild, and runRuntimePostBuild calls writeBuildInfo after completing the runtime. The later standalone write-build-info step repeats that publication; omitting it does not omit the artifact.

At head 1dbcdef071ab1b5ed02e0ecabba2bdab4d33e241, two isolated checkouts started without dist or dist-runtime. pnpm build qaRuntime completed in 53.46 seconds with ordinary selection and 47.41 seconds with private QA selected. Both produced dist/build-info.json, .buildstamp, and .runtime-postbuildstamp with the exact head. The unchanged registered consumers then passed: active-memory and concurrent-streams (2 cases), update dry-run state (8), support export (1), and private-QA suite lifecycle (1). Their normal prerequisite wrappers verified freshness; neither rebuilt or synchronized runtime artifacts after workers started.

The requested workflow/build-profile guards also pass (76 cases), as do the full changed-file and canonical workflow gates. I am retaining qaRuntime: adding another provenance writer is unnecessary given the owner and cold-run proof above. This addresses both rank-up requests without changing the profile. Native exact-head CI/Testbox completion remains the landing gate; these local timings are not a claim that whole CI is below five minutes.

@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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 31, 2026
@steipete
steipete merged commit f8ea0ce into main Aug 31, 2026
243 checks passed
@steipete
steipete deleted the codex/ci-runtime-build-profile-20260831 branch August 31, 2026 17:27
@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

docs Improvements or additions to documentation 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. 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