You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Guarantee a fresh dist/ bundle on every tagged release (CI dist-check + release-extension verification) #59
Make it impossible to tag a release whose committed dist/index.js is stale relative to src/.
Problem Statement
The devkit release pipeline tags finalize_sha — a commit containing whatever dist/ happened to be on the release branch:
release-core.yml runs just sync (:593) and just test (:596), but never just bundle; nothing rebuilds dist/ at release time.
The extension hook (release-extension.yml) runs afterfinalize_sha is computed and beforerelease-publish tags that SHA, so it cannot add a bundle commit that would be included in the tag.
Nothing in CI or pre-commit verifies dist/ freshness today (.pre-commit-config.yaml explicitly excludes dist/).
Since consumers execute dist/index.js directly (action.yml → main: dist/index.js), a forgotten just bundle ships silently: tests pass against src/, the tag ships yesterday's bundle.
Proposed Solution
Two mechanisms, both drift-free with respect to the devkit scaffold:
CI freshness gate — new consumer-owned workflow .github/workflows/dist-check.yml (separate file, so no edits to the scaffold-managed ci.yml): on pull_request to dev, release/**, main run npm ci && npm run bundle && git diff --exit-code dist/. Every commit that can reach a tag then has a fresh bundle by construction. Wire it as a required status check ([TASK] Align branch/tag rulesets with devkit and enable immutable releases #60).
Release-time verification — replace the default no-op in release-extension.yml (the designed project extension point) with a job that checks out inputs.finalize_sha, rebuilds, and diffs dist/. A stale bundle fails the extension job, which triggers the existing rollback in release.yml. Read-only verification, consistent with the hook's contents: read contract.
Alternatives Considered
Committing the bundle during finalize (edit release-core.yml): requires local drift in a scaffold-managed workflow and re-patching on every devkit upgrade.
Pre-commit hook running ncc: slow on every commit; CI gate gives the same guarantee where it matters.
Implemented by #69, merged to dev (19d688d). Both gates live: Dist Check passed on its own PR (1m07s) and is now a required status check on dev/release/*/main (#60). Bonus finding: dev's committed bundle was in fact stale (pre-bump undici) — rebuilt in 6476012. Follow-up for the dist/src/** cruft: #70.
Activity
ci(dist): gate PRs and releases on a fresh dist/ bundle (#69)
c-vigo commentedon Jul 14, 2026
Implemented by #69, merged to dev (19d688d). Both gates live: Dist Check passed on its own PR (1m07s) and is now a required status check on dev/release/*/main (#60). Bonus finding: dev's committed bundle was in fact stale (pre-bump undici) — rebuilt in 6476012. Follow-up for the dist/src/** cruft: #70.
ci(dist): scope Dist Check to release/** and main PRs (#72)
build(dist): untrack dist/src byproducts and gate the whole dist/ tree (
ci: add temporary Dist Check bootstrap stub (#86)
chore: release 0.3.0 (#78)
ci: remove the Dist Check bootstrap stub (#93)