Skip to content

Release recovery is blocked by unrelated branches retaining the published version #22

Closed

Description

@kcsfelty

The live v0.2.3 recovery exercise stopped in the tokenless build job before either publish or persist-provenance could run.

Failure:

AssertionError: Package version 0.2.3 already exists at abace680192e with different artifact inputs; bump the version

Cause:

  • scripts/artifact-provenance.mjs implements assertVersionIsUnambiguous() with git log --all -- package.json.
  • Dependabot opened PR build(deps-dev): bump typescript from 5.9.3 to 7.0.2 #10 from abace680192e after the release. That branch correctly retains package version 0.2.3 while changing TypeScript/package-lock inputs.
  • A fresh release runner fetches that remote branch, so --all treats an unrelated, unmerged dependency branch as historical reuse of the released version.
  • This prevents the workflow from reaching its exact-registry recovery validator and no-clobber asset recovery logic.

Impact:

  • Initial v0.2.3 publication and provenance persistence succeeded.
  • The failed recovery attempt stopped before credentials or immutable assets were touched.
  • Release workflow reruns can be broken by any ordinary post-release branch that has not yet bumped the next version.

Required fix:

Scope version-history ambiguity to authoritative release history, not every fetched branch. On a release runner, compare the candidate against the release tag/HEAD ancestry and relevant immutable release tags. Preserve detection of a version reused on main or across release tags, but ignore unrelated PR/dependency branch heads.

Add a regression with:

  1. released/tagged 0.2.3 on main;
  2. unrelated branch from that commit changing a package input without changing version;
  3. recovery rerun at the original tag succeeds and reaches exact registry recovery;
  4. genuine version reuse on authoritative history still fails.

Evidence: release run 29864644780, failed rerun job 88751610317, Dependabot PR #10.

Activity

  1. kcsfelty commented on Jul 21, 2026

    @kcsfelty
    ContributorAuthor

    Additional accepted scope: npm trusted publishing is now configured for gnolith/workshop, workflow .github/workflows/release.yml, environment npm. npm publishing access disallows tokens and the temporary GitHub NPM_BOOTSTRAP_TOKEN environment secret has been deleted.

    The fix PR must therefore also:

    • remove every bootstrap-token, secret, npmrc-token, and NODE_AUTH_TOKEN path;
    • make the absent-version branch publish directly through OIDC in the isolated id-token: write job;
    • keep the publish job free of checkout and repository/package script execution;
    • add structural guard assertions for OIDC-only publishing and zero npm credential references;
    • update release documentation accurately.

    No package version or package artifact input may change, and the immutable release must not be rerun.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions