Skip to content

fix(workflows): publish the scaffold release tag as a lightweight ref - #1382

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1378-scaffold-lightweight-tag
Aug 7, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1378-scaffold-lightweight-tag

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Every repo devkit scaffolds published its X.Y.Z release tag through
assets/workspace/.github/workflows/release-publish.yml, which ran
git config user.* + git tag -a + git push under a GitHub App identity —
an annotated tag object whose tagger reports
verification.reason: "unsigned" permanently. The reasoning from #1370
transfers unchanged: an App has no registrable GPG/SSH key, and
POST /git/tags is not signed server-side either, so the only fix is to not
create a tag object at all. The scaffold was also internally inconsistent:
promote-release.yml already creates the floating tags (vX, vX.Y) as
lightweight refs (#1045/#1157), leaving only the version tag — the one users
pin and audit — unsigned.

Type of Change

  • fix -- Bug fix

Changes Made

  • assets/workspace/.github/workflows/release-publish.yml
    • "Configure git" + "Create and push tag" are replaced by a single
      Create release tag step mirroring devkit's own release.yml from
      PR fix(release): publish the release tag as a lightweight ref #1374: gh api -X POST repos/{owner}/{repo}/git/refs writes
      refs/tags/<prefix><version> straight at inputs.finalize_sha, using the
      same resolved auth token (secrets.token or the Release App token).
    • Behaviours carried over, per the issue's acceptance criteria:
    • The dead git_user_name / git_user_email workflow_call inputs are
      removed.
  • assets/workspace/.github/workflows/release.yml — the two identity
    pass-throughs in the publish call are removed. The git-user-name /
    git-user-email workflow_dispatch inputs stay, as the issue requires:
    the rollback job still checks out the release branch and writes with that
    identity (the asymmetry with fix(release): publish the release tag as a lightweight ref #1374).
  • assets/workspace/.github/workflows/promote-release.yml — the "creates an
    ANNOTATED tag" comment is corrected; the object.type == "tag" peel itself
    stays as backward compatibility for tags published by older scaffolds.
  • docs/MIGRATION.md — same treatment for the first-release floating-tags
    runbook (~L1028): claim corrected, peel snippet kept (it handles both
    shapes).
  • tests/test_workflow_release_publish_lightweight_tag.py — new workflow-shape
    test mirroring tests/test_workflow_release_lightweight_tag.py for the
    scaffold (committed RED first).
  • tests/test_release_tombstone_detection.py — tag-side tests re-pointed at
    the Create release tag step and upgraded to execute the extracted grep
    pattern against the observed error shapes instead of asserting substrings.

Out of scope

  • The optional persist-credentials cleanup from the issue is deliberately
    not bundled: after this change the publish job still runs
    git ls-remote origin for the create-race verification, which needs the
    persisted checkout credential on private consumer repos — the credential is
    not dead. Same situation in devkit's own release.yml post-fix(release): publish the release tag as a lightweight ref #1374. If it is
    to be dropped, the verification must move to gh api first; that is its own
    change.
  • Existing annotated consumer tags are left as they are (forward-fix policy;
    immutable releases lock them anyway). The change reaches consumers on their
    next devkit-upgrade / re-scaffold; until then scaffold-drift flags them.

Changelog Entry

Added under ## Unreleased → ### Security, directly after the sibling #1370
entry (mirrored into assets/workspace/.devcontainer/CHANGELOG.md by
sync-manifest).

Testing

  • uv run pytest tests/test_workflow_release_publish_lightweight_tag.py tests/test_release_tombstone_detection.py
    — RED before the workflow change (10 failed / 3 passed), GREEN after
    (13 passed).
  • Full lightweight suite (CI test-project scope + packages/vig-utils/tests):
    950 passed.
  • Full bats suite: 575 ok; the 9 githooks.bats IN_CONTAINER-guard failures
    are environmental (the runner shell exports IN_NIX_SHELL, which the guard
    sanctions) — all 12 pass with env -u IN_NIX_SHELL bats tests/bats/githooks.bats.
    The rendered-template actionlint tests passed.
  • just precommit (prek run --all-files) — fully green.
  • The live path is only provable on a real release: acceptance is
    gh api repos/vig-os/devkit-smoke-test/git/refs/tags/<tag> --jq '.object.type'
    reporting commit, not tag, on the next smoke-test release.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • I have updated CHANGELOG.md in the [Unreleased] section
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes

Closes #1378

@c-vigo c-vigo added this to the 1.7.0 milestone Aug 7, 2026
@c-vigo
c-vigo merged commit c883683 into dev Aug 7, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1378-scaffold-lightweight-tag branch August 7, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant