Repository navigation
fix(release): publish the release tag as a lightweight ref - #1374
Merged
Merged
Conversation
This was referenced Aug 7, 2026
Closed
Closed
c-vigo
added a commit
that referenced
this pull request
Aug 7, 2026
…#1382) ## 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 - [x] `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 #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 `tag_already_exists` skip (`if: ${{ !inputs.tag_already_exists }}`) is unchanged; - the create-race verification accepts a lost race **only** when the existing ref already resolves to the release commit (peeled `^{}` first, plain ref fallback, so pre-change annotated tags still resolve); - `TAG_PREFIX` composition (#1044): the created ref is `refs/tags/${TAG_PREFIX}${PUBLISH_VERSION}`; - **GH013 tombstone diagnosis** (#1319): the signature match is re-derived against the `POST /git/refs` error surface — the repository-rules 422 body says `Cannot create ref due to creations being restricted.` while the git-protocol shape stays `GH013 ... creations restricted`, so the grep is now `GH013|creations?( being)? restricted`. The shape test exercises the extracted pattern against both shapes and asserts the benign lost-race shape (`Reference already exists`) does NOT match. - 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 #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-#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 - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have updated the documentation accordingly - [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section - [x] My changes generate no new warnings or errors - [x] I have added tests that prove my fix is effective - [x] New and existing unit tests pass locally with my changes Closes #1378
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.
Description
Every release tag devkit publishes is an annotated tag object with an unsigned
tagger.
release.ymlcreated it withgit tag -aundervigOS Release Bot <[email protected]>and pushed it. Live evidence on tag1.6.0:The release commit is GitHub-verified; the tag pointing at it is not.
Signing that tag object is not reachable. It is written under the Release
GitHub App installation token, and an App has no registrable GPG/SSH key, so
no
git tag -svariant can ever render as Verified. Creating the objectserver-side with
POST /git/tagsdoes not help either — that Git Data routestores the payload verbatim and GitHub does not sign it, so the result is again
reason: "unsigned".So the fix is to stop creating a tag object at all.
Type of Change
fix-- Bug fixChanges Made
.github/workflows/release.ymlrelease tag step that POSTs
refs/tags/<version>atneeds.finalize.outputs.finalize_shaviagh api -X POST repos/{owner}/{repo}/git/refs, using the Release App tokenthe job already generates. A lightweight tag has no tagger and no
payload, so there is nothing left that can report
unsigned; the object theref resolves to is the GitHub-verified release commit.
finalize.outputs.tag_already_exists == 'true'; a candidate run stillfails when the RC tag already exists on origin (concurrent-publish
detection); a failed create is still accepted only when the remote ref
already resolves to the finalize SHA, and errors loudly on a mismatch.
solely to be the tagger — and with it the now-unreferenced
git-user-name/git-user-emailworkflow_dispatchinputs.prepare-release.yml, which actually writes commits, keeps its own.justfile.ghnever passed them.docs/RELEASE_CYCLE.md— the publish-job description no longer claims anannotated tag and records why.
tests/test_workflow_release_lightweight_tag.py— new workflow-shape test(committed RED first).
Checked and left alone, because they are already annotation-agnostic:
prepare-release.yml(existence check only),promote-release.yml(deletes RCtags by ref; devkit has no floating tags),
prepare-release-extension.yml(notag handling).
release.yml's owntag_already_existsprobe and the createfallback already peel
refs/tags/<v>^{}and fall back to the plain ref, so bothtag shapes resolve. No
git describeanywhere in the repo.SECURITY.mdneeded no change — it never claimed signed tags (it advertisescosign image signatures, SLSA provenance and SBOM attestation, all unaffected).
Out of scope
(
assets/workspace/.github/workflows/release-publish.yml) still runsgit tag -a, anddocs/MIGRATION.mddocuments peeling its annotated tags.Worth a follow-up; changing it here would drift every consumer for a fix that
is about devkit's own release chain.
separately in
vig-os/org-config; nothing in this PR depends on it.Changelog Entry
Testing
Manual Testing Details
uv run pytest tests/test_workflow_release_lightweight_tag.py— RED (4 failed)before the workflow change, GREEN (5 passed) after.
uv run pytest tests/ <CI ignore set> packages/vig-utils/tests— 909 passed.prek run --all-files— green (actionlint, shellcheck, yamllint,check-action-pins, sync-manifest all clean).
candidate publish is the acceptance test —
gh api repos/vig-os/devkit/git/refs/tags/<version> --jq '.object.type'mustreport
commit, nottag.Checklist
CHANGELOG.mdin the[Unreleased]sectionRefs: #1370