Repository navigation
perf(deploy): reuse the package store and fetch only frozen source - #170283
Merged
Merged
Conversation
Contributor
|
🦞👀 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. |
steipete
marked this pull request as ready for review
October 12, 2026 21:56
steipete
added a commit
that referenced
this pull request
Oct 12, 2026
Keep compiler and plugin bundlers serial, join independent UI and runtime finalization, and preserve every build check. Replace per-file fsync with a failed-closed filesystem barrier before durable publication, and avoid resealing validated releases. Related: #170283.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 13, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 13, 2026
…170363) Keep compiler and plugin bundlers serial, join independent UI and runtime finalization, and preserve every build check. Replace per-file fsync with a failed-closed filesystem barrier before durable publication, and avoid resealing validated releases. Related: openclaw#170283.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Every controller deployment cloned and indexed the complete Git history, then discarded its freshly populated package store. This added minutes of repeat preparation work.
User Impact
Measured full preparation fell from 356.0s to 229.6s with a cold store, and 217.1s with the retained store (1.64× faster, 39% less wall time). This improves off-path preparation; it does not deploy this controller, restart a Gateway, or change cutover/recovery behavior.
Why This Change Was Made
Fetch only the frozen commit from the already verified official mirror. Full-history ancestry admission stays in the mirror; each sealed release retains a standalone shallow Git database with no alternates. Keep pnpm's content-addressed store, explicitly require clone-or-copy imports and integrity verification, and remove the per-candidate cache lifecycle. Staging requests reflinks where supported. Build and validation steps, sealing, and manifest provenance stay intact; no built artifacts or check results are reused across commits.
Production code is 8 lines smaller. pnpm owns store integrity, format, and pruning; the controller README documents that lifecycle and idle-owner pruning.
Measurements
The actual publisher functions from the parent and this PR built identical source
46f4d308d2a1f292542a13980e6a344823a3877e, using real Git, pnpm, build, manifest validation, sealing, and publication. The three runs used synthetic paths, an unprivileged build account, separate release roots, and one retained package store for the two after runs. No production state, Gateway, or cutover was used. The timing includes upstream fetch through sealed publication, cleanup, and compile-cache prewarm. Initial mirror provisioning is excluded, as the controller already maintains its mirror.The builds used Node 26.8.2 and the pinned pnpm 12.9.0. All commands ran inside the authorized Linux sandbox under
systemd-run --scope --quiet -p AllowedCPUs=64-127 -p MemoryMax=64G nice -n 10 ionice -c3. All three publishers exited 0; the sandbox was removed after collecting the measurements.The retained-store install reused all 1,606 packages and downloaded none. Release
.gitsize fell from 8,053,123,329 to 186,151,492 bytes. The baseline build itself spent 39.2s in tsdown, 15.2s in UI build, 9.47s in the CLI bootstrap check, and 5.90s in external plugin builds.The two-minute target was missed. In the retained-store run, fresh builds and durable sealing alone took 182.5s. Their behavior is preserved; copy/seal time did not materially improve. These are single before/cold/warm measurements under the same resource limits, not latency percentiles or a live activation measurement.
Evidence
pnpm exec node --test .agents/skills/update-team-server/controller/prepare-release.test.mjs .agents/skills/update-team-server/controller/mirror-budget.test.mjs: 12 passed, 0 skipped, 9.43s total; the publisher case took 8.75s. These controller tests use the repository's standalone Node test runner and are intentionally outside default Vitest projects.