Repository navigation
fix(workflows): publish the scaffold release tag as a lightweight ref - #1382
Merged
Merged
Conversation
Closed
6 tasks
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 repo devkit scaffolds published its
X.Y.Zrelease tag throughassets/workspace/.github/workflows/release-publish.yml, which rangit config user.*+git tag -a+git pushunder a GitHub App identity —an annotated tag object whose tagger reports
verification.reason: "unsigned"permanently. The reasoning from #1370transfers unchanged: an App has no registrable GPG/SSH key, and
POST /git/tagsis not signed server-side either, so the only fix is to notcreate a tag object at all. The scaffold was also internally inconsistent:
promote-release.ymlalready creates the floating tags (vX,vX.Y) aslightweight refs (#1045/#1157), leaving only the version tag — the one users
pin and audit — unsigned.
Type of Change
fix-- Bug fixChanges Made
assets/workspace/.github/workflows/release-publish.ymlCreate release tag step mirroring devkit's own
release.ymlfromPR fix(release): publish the release tag as a lightweight ref #1374:
gh api -X POST repos/{owner}/{repo}/git/refswritesrefs/tags/<prefix><version>straight atinputs.finalize_sha, using thesame resolved auth token (
secrets.tokenor the Release App token).tag_already_existsskip (if: ${{ !inputs.tag_already_exists }})is unchanged;
existing ref already resolves to the release commit (peeled
^{}first,plain ref fallback, so pre-change annotated tags still resolve);
TAG_PREFIXcomposition ([FEATURE] Per-repo release tag prefix (DEVKIT_TAG_PREFIX) for Action-publishing consumers #1044): the created ref isrefs/tags/${TAG_PREFIX}${PUBLISH_VERSION};against the
POST /git/refserror surface — the repository-rules 422body says
Cannot create ref due to creations being restricted.whilethe git-protocol shape stays
GH013 ... creations restricted, so thegrep is now
GH013|creations?( being)? restricted. The shape testexercises the extracted pattern against both shapes and asserts the
benign lost-race shape (
Reference already exists) does NOT match.git_user_name/git_user_emailworkflow_callinputs areremoved.
assets/workspace/.github/workflows/release.yml— the two identitypass-throughs in the
publishcall are removed. Thegit-user-name/git-user-emailworkflow_dispatchinputs 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 anANNOTATED tag" comment is corrected; the
object.type == "tag"peel itselfstays as backward compatibility for tags published by older scaffolds.
docs/MIGRATION.md— same treatment for the first-release floating-tagsrunbook (~L1028): claim corrected, peel snippet kept (it handles both
shapes).
tests/test_workflow_release_publish_lightweight_tag.py— new workflow-shapetest mirroring
tests/test_workflow_release_lightweight_tag.pyfor thescaffold (committed RED first).
tests/test_release_tombstone_detection.py— tag-side tests re-pointed atthe Create release tag step and upgraded to execute the extracted grep
pattern against the observed error shapes instead of asserting substrings.
Out of scope
persist-credentialscleanup from the issue is deliberatelynot bundled: after this change the publish job still runs
git ls-remote originfor the create-race verification, which needs thepersisted checkout credential on private consumer repos — the credential is
not dead. Same situation in devkit's own
release.ymlpost-fix(release): publish the release tag as a lightweight ref #1374. If it isto be dropped, the verification must move to
gh apifirst; that is its ownchange.
immutable releases lock them anyway). The change reaches consumers on their
next
devkit-upgrade/ re-scaffold; until thenscaffold-driftflags them.Changelog Entry
Added under
## Unreleased→### Security, directly after the sibling #1370entry (mirrored into
assets/workspace/.devcontainer/CHANGELOG.mdbysync-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).
test-projectscope +packages/vig-utils/tests):950 passed.
githooks.batsIN_CONTAINER-guard failuresare environmental (the runner shell exports
IN_NIX_SHELL, which the guardsanctions) — 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.gh api repos/vig-os/devkit-smoke-test/git/refs/tags/<tag> --jq '.object.type'reporting
commit, nottag, on the next smoke-test release.Checklist
CHANGELOG.mdin the[Unreleased]sectionCloses #1378