fix(release): use explicit GitHub Release repository context - #176
Merged
Merged
Conversation
Teakowa
marked this pull request as ready for review
August 18, 2026 17:29
Teakowa
force-pushed
the
agent/fix-release-state-handling
branch
from
August 18, 2026 17:46
047956f to
44c051a
Compare
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.
Summary
gh releaseoperation explicitly target${GITHUB_REPOSITORY};Root cause
The failed
v0.2.5distribution job (32158864584 / 95784980760) rangh release view "${RELEASE_TAG}"fromupload-artifacts, a job that never checks out the repository. With no local.gitand no--repo, GitHub CLI cannot resolve a repository. The workflow redirected stderr to/dev/null, retried for a minute, and misreported that as a missing draft Release.A temporary PR-only diagnostic reproduced the exact condition on the current hosted runner:
The same job with
--repo "$GITHUB_REPOSITORY"immediately resolved the existing draft and returnedisDraft=true.The
v0.2.6failure (32160766803 / 95788845067) was a second bug introduced by #174:gh ... --jq .publishedAtrenders JSONnullas an empty string, so the guard compared""with the literal"null"and rejected a valid draft. Diagnostics confirmed bothv0.2.5andv0.2.6are valid drafts and are visible through both the workflow token and the dedicated token.Release contract
A published Release is never moved back to draft. This preserves the draft -> assets -> publish lifecycle required for immutable-release compatibility.
Retry behavior
re-run failed jobscan rerun the failed/dependent distribution jobs without recreating the Release Please release;--clobber;Validation
--repofailure reproduced in a PR-only diagnostic workflow;--repolookup succeeds against the realv0.2.5andv0.2.6drafts;publishedAtnull rendering reproduced (publishedAt=<>), proving the fix(release): ensure draft GitHub Release before distribution #174 guard was invalid;--repofor release commands;.github/workflows/release-please.ymland.github/workflows/release.yml; temporary diagnostics were removed;The next real patch release remains the final end-to-end production proof.