fix(release): preflight credentials and recover the orphaned v0.1.0 tag #8
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/release-credential-preflight"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
The first release run (task 496, after #7 merged) tagged the repo and then failed, leaving
v0.1.0with no release behind it — and no way to ever get one.What actually happened
REGISTRY_USER/REGISTRY_TOKENare not configured on this repo. The log shows them empty:But the tag push succeeded anyway:
actions/checkoutleaves anhttp.<host>.extraheadercredential in the local git config, sogit remote set-urlto a URL with empty credentials still authenticated through that leftover header. The release API call had no such fallback:So the run got exactly far enough to do the one thing that's hard to undo. Everything before it was correct — plan
v0.1.0, gates green (22 scripts, 3 patches),protocol=3,file_count=30, tarball built.Why it couldn't self-heal
The plan step treated any existing tag as "nothing to release". So every subsequent push to
mainwould seev0.1.0, setRELEASE=false, and stand down. The release would never appear, and re-running would never help. That's the more serious of the two bugs — the missing secret is a config gap, this was a design flaw that turned a transient failure permanent.The fixes
1. Credential preflight — before anything is built or pushed, gated on the run intending to publish so a
docs:/chore:-only merge still passes on a repo without secrets. Names the missing secrets and the scope they need, instead of failing at whichever step happens to use them first.2. Orphan-tag recovery — the plan step asks the API whether a release exists for the tag:
200404The
404branch deliberately overrides theRELEASE=falsethe bump logic just decided — with the tag already in place there are no releasable commits after it, which is exactly why the state was stuck.Supporting changes: the tag step reuses an existing tag rather than failing on
git tag, and a recovery run's changelog summarizes what the tag contains (previous-tag..this-tag) instead of the empty range after it.How it was tested
Extracted every
run:block and exercised each path — including against live repo state, not just synthetic fixtures:v0.1.0in this repo →release=true version=0.1.0 bump=none reuse_tag=true, with the warning, and the changelog correctly renders the 13feat:commits the tag contains.RunicGateway/link'sv0.3.0(real200from the API) →release=false, stands down.v0.1.0, unchanged.v0.3.0→200, servuo-pluginsv0.1.0→404.What you need to do
Set
REGISTRY_USER/REGISTRY_TOKENon this repo (Settings → Actions → Secrets), token scopedwrite:repository. Once they exist, the next push tomainfinishes the release the first run started —v0.1.0, from the same commit it already points at. No tag cleanup needed.If you'd rather start clean instead, delete the
v0.1.0tag and the next merge cuts it fresh; the recovery path just makes that unnecessary.Related
The same two defects are latent in the installer repo's copy of this engine — fixed in installer#2.
link'srelease.ymlhas the same orphan-tag trap but hasn't tripped it; worth a look separately.Checklist
AI-assisted contributions (required)
Claude Code (Claude Opus 5). Every change has been reviewed and is understood. AI-authored commits are marked with aCo-Authored-Bytrailer.License