Repository navigation
fix(ci): push floating tags as the Release App, and cover the move with real tests - #1509
Merged
Merged
Conversation
The shape pins asserted the steps existed and one of them asserted the defect itself (the App token embedded in the push URL). Replace that pin with the identity/ordering the fix requires, and add a behaviour suite that runs the move step's real bash against a throwaway file:// remote with gh stubbed from that same remote, covering create, move, skip, annotated peel and refusal. Refs: #1508
…ntials The App token was embedded in the push URL, but checkout's persisted extraheader outranks URL userinfo, so the push ran under the Actions identity that contents: read denies and the Tag ruleset does not bypass. Generate the token before checkout and check out with it; fetch and push via origin. Refs: #1508
This was referenced Aug 14, 2026
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
Third instance of the identity bug from #1503, this time in the
floating-tagsjob. The Release App token was embedded in the push URL while
actions/checkoutpersisted the default
GITHUB_TOKENashttp.<host>.extraheader— and theextraheader outranks URL userinfo, so the push authenticated as the Actions
identity, which the job denies (
contents: read) and the Tag ruleset does notbypass. The token the step went out of its way to plumb through was never used.
No released floating tag was ever wrong. The
git pushform arrived indevkit 1.7.0 (
e76c31da,Refs: #1377); the only two repos that setDEVKIT_FLOATING_TAGS—vig-os/commit-actionandvig-os/sync-issues-action—are both still on 1.6.0, where
move_tagusedgh apiand no checkoutcredentials were involved. devkit's own promote workflow has no floating-tags
job. The path had simply never executed anywhere, which is why nothing caught it.
Type of Change
fix-- Bug fixtest-- Adding or updating testsChanges Made
The fix (
assets/workspace/.github/workflows/promote-release.yml):Generate release app tokenmoves beforeCheckout repository, andcheckout takes
token: ${{ steps.release_app_token.outputs.token }}— so thecredentials git actually uses are the App's.
REMOTE_URLis gone; the shallow tag fetch and the force-push both useorigin. The fetch matters as much as the push: on a private consumer anunauthenticated fetch fails outright.
contents: readstays, with an inline comment saying why — grantingcontents: writewould "fix" a future 403 by moving tag pushes to the Actionsidentity, defeating the App-identity model the Tag ruleset depends on.
The tests. One existing pin,
test_move_tag_force_pushes_with_explicit_app_token,asserted the defect itself:
That is why #1377 looked done. It is replaced by pins on the ordering, the
checkout token, the absence of any URL userinfo in the job, and
contents: read.New
tests/test_floating_tag_move.pyruns the move step's real bash againsta throwaway
file://remote, withghstubbed by a shim that answers the RESTref reads from that same remote (so stub and fixture cannot drift):
pre-receivehook standing in for a ruleset denial) → jobfails with the
::error title=Floating tagannotation and its remediation::warning::, no failure; each level moves independentlyAn identity bug cannot be reproduced against a local remote (no auth), so
identity stays pinned structurally — but everything downstream of it is now
executed rather than grepped.
Changelog Entry
(Full entry in
CHANGELOG.mdunder## Unreleased→### Fixed.)Testing
just test,just test-bats,prek run --all-files)RED-before-GREEN. Against the unfixed workflow the three new shape pins failed,
and all 8 behaviour tests failed — informatively: the old script builds its
remote from
GITHUB_REPOSITORY, so it tried to reach the realgithub.com/vig-os/testrepoand died onAuthentication failedafter 130s ofretry backoff. After the fix the same suite runs against
originin 18s, 28passed.
Full local run:
prek run --all-filesclean;1466 passed, 3 skipped(the twoknown-environmental failures deselected — stale locally-built image vs. an edited
CHANGELOG.md, and a missingdbus-launch); full bats suite clean.Manual Testing Details
Evidence gathered while confirming the report, all on the 1.6.0 (REST) path:
vig-os/commit-actionrun30994674616
—
Moved floating tag v0 -> 0361e9aa…,v0.3 -> 0361e9aa…, green.vig-os/sync-issues-actionrun31186320919
—
v0moved, then exit 1 creatingv0.5(the promote-release: first-time floating minor/major tag creation fails (422 on POST /git/refs) after publish+merge #1157 denial);v0.5wascreated by hand afterwards per the step's own remediation message.
The extraheader precedence itself was reproduced outside CI against a private
repo with the credential helper disabled: valid token in the extraheader plus a
deliberately bogus token in the URL userinfo still authenticates, while the bogus
userinfo alone fails.
Checklist
docs/MIGRATION.md#first-release-floating-tagsdocuments the humanbootstrap for a repo whose promote workflow does not exist yet, which this
does not change
CHANGELOG.mdin the[Unreleased]sectionAdditional Notes
This unblocks an upgrade.
commit-actionandsync-issues-actioncannotsafely leave 1.6.0 until this ships: today their tag moves work and only the
first creation of a new level fails (#1157); on 1.7.0–1.9.x the push runs as
the wrong identity, so the moves would break too. With this fix, both cases go
through the App identity for the first time.
Whether #1377 actually fixed #1157 is now testable but still unproven in
production. The premise — the App is a bypass actor for
git pushwhere it isnot for
POST /git/refs— is unchanged and untested against a live ruleset,because the push never ran as the App. The first real confirmation will be the
next new floating level on one of those two repos after they adopt this.
Deliberately untouched. The
Cleanup git RC tagsjob still builds ax-access-token:URL for agit ls-remote(promote-release.yml:562, and thesame line in devkit's own copy). The token there is likewise ignored, but the
operation is a read that succeeds under either identity, and its ref deletions
go through
gh api -X DELETE, which usesGH_TOKENcorrectly. Dead weight, nota defect — out of scope here.
Refs: #1508