Repository navigation
ci(dist): gate PRs and releases on a fresh dist/ bundle - #69
Merged
Merged
Conversation
The committed dist/index.js on dev was built against an older undici than the current lockfile (the 6.23.0 -> 6.27.0 bump). Rebuild with ncc so the shipped artifact matches src/ and the dependency tree before the freshness gate lands. Refs: #59
Consumers run dist/index.js directly, so a forgotten 'just bundle' ships a stale artifact while tests still pass against src/. Add a consumer-owned dist-check workflow that rebuilds the bundle on every PR to dev/release/main and fails when the committed dist/index.js drifts, and replace the release-extension no-op with the same verification against finalize_sha so a stale bundle rolls the release back before the tag is cut. Both verify dist/index.js only: it is the sole runtime artifact and is build-location independent, unlike the path-dependent tsc declaration byproducts under dist/src/. Toolchain setup mirrors ci.yml (resolve-toolchain + setup-devkit-toolchain) so the rebuild uses the pinned dev-shell Node. Refs: #59
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.
Closes #59.
Two commits:
build(dist): rebuild bundle— dev's committed bundle was stale (built before the undici 6.27.0 bump), which is exactly the drift this issue targets. Rebuilt with the pinned dev-shell toolchain; reviewer-verified reproducible (independent rebuild produces zero diff).dist-check.yml(PRs todev/release/**/main): rebuild with the devkit toolchain, fail if the committeddist/index.jsdiffers. Job nameDist Checkis contractual (required check, [TASK] Align branch/tag rulesets with devkit and enable immutable releases #60).release-extension.ymlno-op replaced with release-time verification ofinputs.finalize_sha— a stale bundle fails theextensionjob and triggers release.yml's existing rollback.workflow_callinputs contract unchanged.Deviation from the issue text, deliberate: the gate diffs
dist/index.js(the sole runtime artifact, build-location independent) rather thandist/— the tree also carries 32 accidentally-committed tsc byproducts whose.d.ts.mapfiles embed absolute paths and would make a whole-tree diff permanently red in CI. Cleanup of that cruft is a separate follow-up.Negative test: injected marker into
dist/index.js→ gate exits 1; restored → 0. This PR also exercises the positive path via its ownDist Checkrun.