Skip to content

fix(workflows): move floating tags via git push with explicit App token - #1379

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1377-floating-tag-push
Aug 7, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1377-floating-tag-push

Conversation

@c-vigo

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

Copy link
Copy Markdown
Contributor

Summary

The floating-tags job in the scaffolded promote-release.yml created brand-new
floating levels via POST /git/refs — the one ref-mutation path where GitHub
does not honor the Release App's Integration ruleset bypass for the
creation rule. The first release of every new <prefix>X / <prefix>X.Y
level therefore died with the opaque Reference does not exist (HTTP 422) and
no rule-suite entry at all, despite the App holding an always bypass on the
whole Tag ruleset (hit live on commit-action 0.3.1 and sync-issues-action
0.5.0).

move_tag() now mutates floating tags via
git push --force "${TARGET_SHA}:refs/tags/${name}" — the exact path
release-publish.yml already uses to create the release tags, empirically
proven to be bypassed — with the App installation token plumbed explicitly
into the push URL (https://x-access-token:${GH_TOKEN}@github.com/...).
Checkout's persisted credentials are deliberately not relied on: those are the
default github.token, which has no bypass. Create and move collapse into one
branch-free path.

Preserved from #1157/#1158

  • Idempotence: the gh api GET + skip-when-already-at-target guard stays,
    so re-runs are safe.
  • Loud failure: the ::error annotation + docs/MIGRATION.md
    #first-release-floating-tags fallback stays for pushes that fail for other
    reasons; its wording is updated now that the "grant a creation bypass"
    remediation is moot (the bypass already exists — the REST create path simply
    ignores it) and points at verifying the ruleset bypass list and the
    RELEASE_APP_CLIENT_ID / RELEASE_APP_PRIVATE_KEY secrets instead.
  • The trap is documented in-script: a comment explains why push is used
    instead of POST /git/refs, so the REST path is not reintroduced.

Changes

  • assets/workspace/.github/workflows/promote-release.yml — push-based
    move_tag(), explicit-token remote URL, and a git fetch of the release tag
    so the peeled commit object is available locally to push (the checkout is a
    shallow clone of the workflow head, which need not contain it).
  • tests/test_floating_tags.py — new shape tests pin the push path, the
    explicit token, the absence of REST ref mutation, the surviving idempotence
    guard, and the updated annotation (TDD: committed failing first).
  • docs/MIGRATION.md — the promote-release: first-time floating minor/major tag creation fails (422 on POST /git/refs) after publish+merge #1157 steady-state note now describes the REST
    bypass asymmetry, scopes the one-off remediation to pre-fix devkit versions,
    and recommends upgrading.
  • CHANGELOG.md (+ synced workspace mirror) — Fixed entry under Unreleased.

Verification

Out of scope, per the issue: reporting the POST /git/refs bypass asymmetry
upstream, the optional org-config exempt-mode hardening, and shrinking the
MIGRATION.md runbook to a historical note.

Closes #1377

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