Skip to content

[FEATURE] Guarantee a fresh dist/ bundle on every tagged release (CI dist-check + release-extension verification) #59

Closed

Description

@c-vigo

Description

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 after finalize_sha is computed and before release-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:

  1. 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).
  2. 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

Impact

Backward compatible; pure additive CI. Blocks the first release through the devkit pipeline until done (correctness gap).

Activity

  1. added
    enhancement
    on Jul 14, 2026
  2. added a commit that references this issue on Jul 14, 2026
    19d688d
  3. c-vigo commented on Jul 14, 2026

    @c-vigo
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions