Skip to content

improve(ci): avoid duplicate package builds - #252

Merged
vincentkoc merged 1 commit into
mainfrom
improve/ci-prepack-build-20261102
Nov 2, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
improve/ci-prepack-build-20261102

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

CI compiles the same clean package twice immediately before verifying its installed artifact.

User Impact

No application behavior changes. CI avoids redundant compilation while retaining clean package emission and installed-package smoke coverage on Node 22, 24 and 26.

Why This Change Was Made

The existing smoke helper runs real npm pack, whose unchanged prepack script runs pnpm run build and cleans/recompiles dist. Remove only the preceding identical pnpm build commands from two workflow declarations, covering three Linux jobs. Keep native typecheck, lint, format, test/coverage, Windows, security, packaging, permissions and concurrency unchanged. No new dependency, runtime pin, cache or local command policy.

Evidence

  • Frozen current main: 79c1495f20d33b68ca4439dfa9dfef18ed7a460e; product head: f3505124159b5bfbb5ad6605f95e1e400b3cb441.
  • Existing exact-base native CI https://github.com/openclaw/clawpatch/actions/runs/40585371185 passes, with standalone build steps taking about two seconds in each affected job. Those historical step timings are motivation, not new candidate performance proof.
  • Exact-version Oxfmt 0.74 checks, YAML scope/lifecycle assertions, whitespace and public-data checks pass locally without project dependencies.
  • Actual isolated proof https://github.com/openclaw/clawpatch/actions/runs/41481966649 passes against the exact base/head above. Baseline/candidate cold package pipelines: 6.619/6.959 s (runner noise, not a cold gain); restored fresh workspaces with exact store hits: 10.311/8.905 s. Three interleaved hot pairs: 10.510/8.723, 10.145/8.695, 10.229/8.668 s; paired savings 1.787/1.450/1.560 s.
  • Every sample starts without dist, runs the real package smoke and produces the same 255 emitted files and SHA-256 ec83d0c3e55b46bcd7a54ce4a63ed3dbac634d1fa3d7cbf595b30c32b0ff6f43. Both pipelines reject invalid TypeScript and failing prepack hooks. No skip/stub replaces the installed CLI assertions.
  • Provisioning is unchanged. Proof cold jobs total 43/45 s with pnpm setup 9/4 s, Node setup 4/5 s and cache save 2/1 s; restored store restore is 1 s each. Restored candidate proof also runs all hot repetitions and controls, so its 96 s total is not comparable to the 45 s baseline proof job. Native baseline/candidate job totals are not paired; no workflow-critical-path speedup is claimed. The modest repeated command saving across three jobs costs no new production setup or maintenance surface.
  • Fresh native CI https://github.com/openclaw/clawpatch/actions/runs/41481465973 passes all four Linux/runtime/Windows jobs. Independent exact-commit P0–P2 review is clean, including adjacent npm/prepack lifecycle semantics. ClawSweeper acknowledgment is present; it is not represented as a bot endorsement. Ready-state CodeQL and final live head/check/review checks remain mandatory before landing.
  • Rollback: restore the two explicit workflow build lines. Package scripts and smoke assertions are unchanged.

@clawsweeper

clawsweeper Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vincentkoc
vincentkoc marked this pull request as ready for review November 2, 2026 16:33
@vincentkoc
vincentkoc requested a review from a team as a code owner November 2, 2026 16:33
@vincentkoc
vincentkoc merged commit 8b8a21d into main Nov 2, 2026
12 of 13 checks passed
@vincentkoc
vincentkoc deleted the improve/ci-prepack-build-20261102 branch November 2, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant