Repository navigation
Description
The committed bundle dist/index.js on dev is stale again, for the third
time and for exactly the reason #130
described. Rather than land another one-off rebuild commit, move the rebuild
into the release pipeline's designated mutating extension point so it stops
recurring.
Current state
src/, action.yml and README.md are byte-identical to v0.3.2, but five
lock-file-maintenance PRs (#139, #143, #146, #148, #152) moved runtime
transitive dependencies that ncc inlines into the shipped bundle:
| package | v0.3.2 | dev |
|---|---|---|
@octokit/core |
7.0.7 | 7.0.8 |
@octokit/request |
10.0.13 | 10.0.16 |
@octokit/endpoint |
11.0.4 | 11.0.5 |
@octokit/request-error |
7.1.1 | 7.1.2 |
@octokit/graphql |
9.0.4 | 9.0.5 |
content-type (via @octokit/request) |
2.0.0 | 3.0.0 |
@vercel/ncc also moved 0.44.1 -> 0.45.0 (#142), so the bundler itself
differs. A clean just sync && just bundle from the current lock produces a
bundle that differs from the committed one (1 295 769 -> 1 295 957 bytes,
different SHA-256, one fewer webpack chunk as content-type 3.x is inlined
differently). npm audit is clean on both the old and the new lock, so this is
not a security fix — but it is a real change to the only artifact consumers of a
released tag execute.
Why it keeps happening
The enforcement we have is read-only. release-extension.yml's verify-dist
job rebuilds at finalize and fails the release, telling a human to go run
just bundle — a gate with no actuator. dist-check.yml is deliberately scoped
to pull requests into release/** and main, because gating dev made every
Renovate runtime-dep bump fail (#71), and nothing rebundles after lock-file
maintenance. So every release cycle inherits a stale bundle and needs a manual
rebuild PR before it can be cut.
Proposal
prepare-release-extension.yml is a devkit-seeded no-op whose own header names
this use case verbatim: "Replace this file to prepare the release branch before
the PR opens (e.g. rebuild + commit a generated artifact)." It is
consumer-owned, so it survives re-scaffolds. The wiring in prepare-release.yml
already suits:
extensionneeds[validate, prepare]— runs afterrelease/X.Y.Zexists and
has been fast-forwarded onto the changelog-freeze commit.secrets: inherit— it can mint the COMMIT_APP token and push to the
write-protected release branch, the same bypass the freeze commit uses.open-prneedsextension— the release PR opens after the rebuild, so
Dist Checksees a fresh bundle on its first run and the PR diff shows the
real shipped-artifact change.rollbackneedsextension— a failed rebuild deletes the release branch,
which erases the extension's commit. No new rollback machinery.
Replace the no-op with a job that resolves the toolchain from .vig-os (as
release-extension.yml does — toolchain inputs are not part of the
workflow_call contract), runs just sync && just bundle, and commits dist/
to the release branch only when it actually changed.
This turns the pipeline into build-then-verify: the extension produces the
bundle at prepare time, and verify-dist stays untouched at finalize as a
genuine backstop rather than the only gate. dev stays ungated, preserving the
#71 property.
Acceptance criteria
-
prepare-release-extension.ymlrebuilds the bundle onrelease/X.Y.Zand
commits it when it differs; no-ops cleanly when it does not. -
dry_runis honored — rebuild and report, never write. - The commit is authored through
vig-os/commit-actionat its last released
tag (not the un-rebuilt localdist/), matching how the changelog freeze
commits. - The commit message passes this repo's own
validate-commit-rangegate. -
release-extension.ymlis unchanged and still verifies at finalize. -
dist-check.ymltriggers are unchanged —devstays ungated.
Implementation notes
- Commit type:
.vig-osleavesDEVKIT_REFS_POLICYempty, which resolves to
chore-optional— every type butchorerequires aRefs:line. A bot
rebuild has no issue to reference, so the commit must bechore(dist): ...,
matching the existingchore: freeze changelog for release X.Y.Z. A
build(dist):subject would fail the gate. just syncalready resolves tonpm cifor a Node repo
(justfile.project:65).- A bugfix PR landing on
release/X.Y.Zafter prepare can still restale the
bundle. That is covered:Dist Checktriggers on pull requests into
release/**, andverify-distremains the final net. release-core.yml's finalize pushes (changelog date stamp,
synthesize-bot-changelog, the sync-issues commit) touch no source or lock
file, so a bundle built at prepare time is still fresh at finalize.- Accepted consequence:
dev'sdist/stays stale between releases, refreshed
whensync-main-to-devbrings the release commit back. That is already true
today, and consumers run tags rather thandevSHAs.
Related
- Recurrence of build(dist): committed bundle is stale — undici 6.27.0 -> 6.28.0 never rebundled #130; same root cause, structural fix rather than another
one-off rebuild. - Unblocks the pending v0.3.3 cut, which currently fails both
Dist Checkon
the release PR andverify-distat finalize.
Activity
c-vigo commentedon Sep 7, 2026
Re-verified against the branch base after #156 merged (
01f5cd7), which added one more lock-file-maintenance PR to the window:undicimoves6.28.0->6.28.1on top of the octokit /content-typeset in the description, so the runtime window is six lock-maintenance PRs (build(npm): lock file maintenance #139, build(npm): lock file maintenance #143, build(npm): lock file maintenance #146, build(npm): lock file maintenance #148, build(npm): lock file maintenance #152, build(npm): lock file maintenance #156), not five.@actions/core3.0.1and@actions/github9.1.1remain unchanged.npm auditis still clean on the current lock, with and without dev dependencies; the test suite is 84/84 green against it.Nothing about the proposal changes — the window just grew by one PR, which is exactly the recurrence this issue is about.
ci(release): rebuild the ncc bundle in prepare-release-extension.yml
docs(changelog): drop the hand-written #138 entry superseded by synth…
ci(release): rebuild the ncc bundle in prepare-release-extension.yml (#…
c-vigo commentedon Sep 7, 2026
Delivered in #158 (merged to
devasc14c608) and exercised for the first time by the 0.3.3 cut — run 34099538885.Acceptance criteria, against that run:
release/X.Y.Z—Rebuild dist bundledetected drift and pushed36d22ce(chore(dist): rebuild bundle for release 0.3.3), GitHub-verified, authored bycommit-action-bot[bot].dist/index.jsalone (473 insertions / 346 deletions). Nodist/src/byproducts leaked in, so thegit statusdrift read did its job (release-core finalize commits the whole dist/ (force-includes gitignored tsc emit), re-tracking dist/src + *.tsbuildinfo every release devkit#1159 / chore(dist): untrack the gitignored dist/src byproducts left by the v0.3.0 finalize commit #134).dry_runhonored —Report dry-run outcomewas skipped on this non-dry run; the write step is gated on the same input.vig-os/[email protected], not the stale local bundle.Commit Messagesgreen on the release PR chore: release 0.3.3 #159, confirmingchore(dist):clearschore-optional.release-extension.ymlanddist-check.ymluntouched —devstays ungated.The point of the exercise:
Dist Checkpasses on release PR #159. Before this change that gate would have failed on the stale bundle, and the cut would have needed a hand-written rebuild PR first — which is what happened at #130 and was accruing again here.Changelog synthesis also came out clean: no duplicate
#138entry (removed in the same PR), and the#### Dependenciesblock covers all six lock-maintenance PRs, all four devkit adoptions, and every dev-dep bump at its net delta.chore: release 0.3.3 (#159)