Skip to content

perf(release): shorten preflight and publication - #135367

Merged
steipete merged 4 commits into
mainfrom
codex/release-publish-performance
Sep 1, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/release-publish-performance

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Release preflight rebuilt the package after it had already prepared the exact release outputs. Core npm publication also waited behind ClawHub authorization and bootstrap work, even after its plugin npm dependencies were published. The requested Blacksmith sizes also delivered fewer resources than their labels: the 16-vCPU release preflight received four CPUs and 15.42 GiB, which selected the existing serial lint policy.

Why This Change Was Made

Reuse the prepared build through the existing release-pack flag, retaining the complete packaging lifecycle. Start core npm and pass its exact environment approval as soon as plugin npm succeeds, then let ClawHub authorization and bootstrap proceed alongside it. A successful approval no longer makes the parent wait for core runner allocation.

The parent still collects every required child result and keeps the GitHub release as a draft after a required failure. If core npm already succeeded, its registry evidence is preserved for recovery. One ClawHub runtime-state projection now drives both verifier arguments and truthful failure notes. Ordinary source packing still performs a clean build.

Request the 32-vCPU class for npm preflight, CI test types, five core type stripes, and runtime-topology checks. The live probe measured eight CPUs and 30.95 GiB for this label, clearing the eight-CPU/24-GiB parallel-check threshold. These are four runner selections covering up to eight existing job rows; no jobs or registrations are added. Backend/trust routing, hosted retries, explicit hosted preflight, worker budgets, permissions, and publication behavior are preserved. Comments and CI docs record the dated allocation evidence and require reassessment when the provider allocation changes.

The two source-launching CLI state-directory guard suites now use the existing isolated process-test owner. They were missing from its inventory and ran inside the shared CLI graph. This preserves their production deadline and assertions while giving full, focused, and CI runs the same execution policy.

User Impact

Release operators spend less time repacking prepared outputs and can make core npm available while ClawHub completes. This does not promise that the entire release finishes in seconds: validation, runner queues, required ClawHub completion, and Windows promotion can still determine total duration.

Evidence

  • Six-machine live capacity probe: Blacksmith requests 2/4/8/16/32 delivered 2/2/2/4/8 guest CPUs; the GitHub-hosted control delivered four. CPU topology, affinity, Node, and measured CPU concurrency agreed; guest cgroup quotas were unlimited. The exact provider-side cause remains unknown. This establishes the capacity workaround, not an end-to-end release speedup or billing equivalence.
  • Runner-selection regression checks failed on the previous labels. After the change, 244 tests passed, two skipped across CI workflow guards and npm release workflow guards; workflow lint, check:changed, formatting, and docs listing passed. Parsed workflow comparison found exactly four changed label scalars with all steps, permissions, timeouts, environments, matrix sizes, and concurrency limits preserved. Final scoped Codex Autoreview found no accepted P0 findings.
  • Real local paired measurement under directly verified pnpm 12.1.0, Node 24.19.0 and macOS arm64: prepared packing decreased from 93.91s to 8.04s (91.44%, 85.87s saved). Both complete declaration caches were restored in the control. The source tree, build identity and timestamp were fixed; both archives are 64,088,097 bytes with SHA-256 bebc1bd9bae7d31a18735dfb8f6b37b7054a4bf0ada9f71ca1ed21f00ebaf59b. Packaging restored the original source files. This measures the packing stage, not whole-release duration.
  • Executed the real prepack/postpack lifecycle and extracted workflow shell steps. Regression checks fail on the previous build and publication ordering; checks cover missing prepared assets, normal clean builds, failed approvals, queued runners, changed workflow identity, receipt/bootstrap failures, detached ClawHub, npm resume, and draft-before-native ordering.
  • Nonpublishing runs used frozen target 0965053fe6b9341776df147a6934b7485c60b5ca and tooling 8fc5024659a9915406aed0d5d0ad2f368c8557e4. Plugin npm packed and verified 88/88 packages in 7m52s. ClawHub packed 88/88 but only 55 downstream validations passed; 33 failed installing its CLI. The pair ran concurrently in 8m55s, not an all-green end-to-end result. Codex was excluded because the frozen dependency pin failed the current freshness gate; the initial 89-package attempts correctly failed.
  • Packaging and workflow owner tests, check:changed, Actionlint, and Zizmor passed. The test correction also passed check:changed under pinned pnpm 12.1.0. Codex Autoreview found no accepted P0 findings in either the implementation or the test correction. The fresh frozen-workflow core preflight succeeded in 1h 00m 21s total, with 53m 39s on the runner and 6m 41s before runner start. Source checks took 14m53s, test types 4m15s, architecture 2m09s, initial build 6m20s, and prepared packing 7m00s including a second build. Publication jobs were skipped. This is a baseline, not an end-to-end result for the patch.

Follow-up work identified by the dry run: reuse a verified ClawHub CLI runtime above the package matrix instead of installing it per package. One failed job could not download the pinned Carapace GitHub tarball; the exact underlying errors for the other 32 have not been inspected. The six-machine probe now confirms smaller guest allocations independently of OpenClaw, and the runner promotions compensate for that observed capacity. The underlying provider mapping remains unresolved. A full release preflight has not yet been timed with the combined changes. The CI SDK-diff report also installs dependencies before skipping non-dispatch work; moving that decision before setup is a separate follow-up. The existing plugin-boundary compile budget is an explicit 16-worker override and remains unchanged; its throughput and memory use should be measured separately from runner labels.

Production/tooling delta: +62 lines; tests and test support: +494; documentation and skills: +46. The runner-capacity change itself removes six net tooling lines and adds five net test lines. The added orchestration separates starting/approving core from collecting it after later failures, while removing the old serial core/bootstrap path.

CI follow-up: the initial protocol declaration error (TS7056) came from the unchanged base and was fixed upstream by merged #135360. A fresh CI run was triggered after that merge and after the test correction was pushed. The initial four packaging assertion failures were reproduced under pinned pnpm 12.1.0 with CI=true and repaired by capturing the real hook results before pnpm reporting; all 26 tests in that file now pass. The exact failure-reason, package-content, build-selection and source-restoration checks remain intact.

Landing validation: both new process-routing cases failed before the owner-list repair. Afterward, all four real Gateway/CLI cases passed, and 11 focused routing, exclusion, and CI-planner checks passed. Those planner checks preserve exactly-once coverage, five process jobs, existing worker limits, and admission budgets. The final check:changed typecheck/lint/guard plan, formatting, and diff check also passed. Fresh whole-PR Codex Autoreview found no accepted P0 findings.

The normal PR CI run also exposed an auth-login test type error introduced on its base. Main already contains the canonical fix in #135407; the final native CI run passed on a fresh merge-ref tree containing that fix. The successful earlier manual head run did not test that integrated tree and is not being used to disregard the native failure.

Release-owner decision: accept staged core npm publication. Core npm may finish before ClawHub authorization or its immutable receipt succeeds. If required ClawHub work later fails, the npm package remains published while the GitHub release stays draft and the failure plus registry evidence are retained for recovery. This is the intended partial-publication model. The final ClawSweeper review on the exact head found no introduced correctness or security defect; its Rank-up move is covered by this owner decision and the successful exact-head CI run.

A combined exact-head nonpublishing release run remains deferred because the parent publisher has no dry-run mode and dispatches publishing children. The tests execute its extracted shell phases with external effects modeled; the frozen runs and packing benchmark are not integrated exact-head publication evidence. The same-day capacity probe supports the temporary runner selection, with the documented reassessment trigger retained.

Final native CI for commit 28eeeba9d4390e3eade22a08e324eced51dd915b: run 33548665572 passed, including both formerly failing checks. The required openclaw/ci-gate is green.

Landed as 6a883dd6660. Post-merge cleanup is complete; review and merge evidence were retained.

@steipete
steipete requested a review from a team as a code owner September 1, 2026 16:54
@clawsweeper

clawsweeper Bot commented Sep 1, 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 scripts Repository scripts size: L maintainer Maintainer-authored PR labels Sep 1, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 3:29 PM ET / 19:29 UTC.

ClawSweeper review

What this changes

The PR reuses prepared release package outputs, starts and approves core npm publication after plugin npm succeeds while ClawHub work continues, increases selected CI runner requests, and routes two CLI state-directory suites through their isolated process project.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

No introduced correctness or security defect was found. This member-authored, maintainer-labeled release-automation change still needs release-owner acceptance of its deliberate partial-publication semantics and completion of exact-head CI before merge.

Priority: P2
Reviewed head: 28eeeba9d4390e3eade22a08e324eced51dd915b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has focused owner-boundary tests and preserves its release safeguards, with the remaining question being deliberate release policy rather than a demonstrated defect.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable to the member-authored PR proof gate. The PR body provides a real prepared-packaging measurement and modeled workflow-phase coverage, while the exact-head native CI run remains in progress.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to the member-authored PR proof gate. The PR body provides a real prepared-packaging measurement and modeled workflow-phase coverage, while the exact-head native CI run remains in progress.
Evidence reviewed 6 items Introduced release ordering: The new start phase waits for plugin npm, creates the draft, dispatches core npm, and approves only its npm-release environment before the ClawHub receipt phase.
Failure collection remains explicit: Completion treats failed ClawHub authorization or receipt as a failed release, cancels ClawHub children, still collects a core run already started, and leaves the release draft on required-child failure.
Approval boundary: The helper verifies the child SHA before and after approval and filters the new early approval to the named npm-release environment.
Findings None None.
Security None None.

How this fits together

The release publisher turns a validated release tag and preflight package into plugin, npm, ClawHub, Windows, and Android publication work, then records the final release evidence. CI runner selection and process-test routing determine how validation work is scheduled before a release can proceed.

flowchart LR
  A[Release tag and preflight] --> B[Plugin npm publication]
  B --> C[Core npm start and approval]
  A --> D[ClawHub authorization]
  C --> E[Collect child outcomes]
  D --> E
  E --> F[Draft release evidence]
  G[CI checks] --> H[Runner and process-test routing]
Loading

Decision needed

Question Recommendation
Should the release policy permit core npm publication to advance before ClawHub authorization and its immutable receipt have succeeded, accepting that a later required ClawHub failure can leave npm published while the GitHub release stays draft? Accept staged core publication: Accept the documented partial-publication recovery model and merge after exact-head CI is green.

Why: This is an intentional release-semantics tradeoff, not a mechanical defect: tests cover the resulting recovery state, but only the release owner can accept the partial-publication boundary.

Before merge

  • Resolve merge risk (P1) - A ClawHub authorization or receipt failure can now be discovered after core npm publication has begun or completed; the workflow retains a draft release and records the failure, but an immutable npm publication cannot be retracted.
  • Resolve merge risk (P1) - The supplied exact-head native CI run is still in progress, and the available test-merge ref is explicitly stale.
  • Complete next step (P2) - A release owner must decide whether the intentionally earlier core npm publication boundary is acceptable, then exact-head CI must complete; no narrow mechanical repair is indicated.
Agent review details

Security

None.

PR surface

Tests +494, Docs +46, Config +23, Other +39. Total +602 across 17 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 8 594 100 +494
Docs 3 53 7 +46
Config 3 156 133 +23
Generated 0 0 0 0
Other 3 61 22 +39
Total 17 864 262 +602

Review metrics

Metric Value Why it matters
Production versus test delta production/tooling +62 net; tests and test support +494 net; docs and skills +46 net The production growth implements release ordering and scoped approval while the larger test delta covers failure collection, packaging lifecycle, and workflow routing.

Merge-risk options

Maintainer options:

  1. Accept the staged publication boundary (recommended)
    Release owner confirms that an immutable core npm package may precede a later ClawHub receipt failure, with the parent release remaining draft and evidence retained.
  2. Restore the receipt barrier
    Keep core npm dispatch behind successful ClawHub authorization and receipt if atomic release progression is required.

Technical review

Best possible solution:

Land only after the release owner explicitly accepts the earlier immutable core npm publication boundary and exact-head CI is green; retain the existing SHA checks, environment-scoped approval, draft-on-failure behavior, and modeled failure coverage.

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

Not applicable: this is a release-automation change rather than a reported product defect; the relevant evidence is the modeled workflow success and failure coverage plus the supplied package measurement.

Is this the best way to solve the issue?

Unclear: the implementation preserves child-SHA verification, environment-scoped approval, and required-result collection, but only a release owner can determine whether earlier irreversible npm publication is the right policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: The PR changes release and CI automation with bounded but operationally important blast radius.
  • merge-risk: 🚨 automation: It reorders protected release child dispatch, environment approval, and required-result collection.
  • 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: Not applicable to the member-authored PR proof gate. The PR body provides a real prepared-packaging measurement and modeled workflow-phase coverage, while the exact-head native CI run remains in progress.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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.

  • Obtain release-owner confirmation of the partial-publication semantics and wait for exact-head CI to finish green.

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 (3 earlier review cycles)
  • reviewed 2026-09-01T17:01:14.807Z sha dd6f5e0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T17:26:48.928Z sha 6506363 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T18:33:12.687Z sha ae1a1ef :: needs maintainer review before merge. :: none

@steipete steipete changed the title fix(release): remove redundant builds and publication waits perf(release): shorten preflight and publication Sep 1, 2026
@steipete steipete self-assigned this Sep 1, 2026
@steipete
steipete merged commit 6a883dd into main Sep 1, 2026
211 checks passed
@steipete
steipete deleted the codex/release-publish-performance branch September 1, 2026 19:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
* perf(release): reuse prepared builds and overlap publication

* test(release): capture prepack hook output before pnpm reporting

* ci: request larger runners for release and type checks

* test(ci): isolate state-directory gateway process suites
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. scripts Repository scripts size: XL 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