Skip to content

Let the release tagger push, and stop hiding git's reason - #266

Merged
drevendev merged 1 commit into
masterfrom
policy/release-tag-push
Sep 7, 2026
Merged

drevendev merged 1 commit into
masterfrom
policy/release-tag-push

Conversation

@drevendev

Copy link
Copy Markdown
Owner

Closes #265

Goal

Let the release tagger push the tag it cuts, and report git's own error when it cannot.

Evidence

First live run, on the merge of #259:

release-tag: v0.0.0 (M0, digest 7323469a3507b253)
subprocess.CalledProcessError: Command '['git', 'push', 'origin', 'v0.0.0']'
returned non-zero exit status 128

actions/checkout leaves an http.extraheader carrying GITHUB_TOKEN; the workflow
declares permissions: {} on purpose, so that credential can do nothing, and it wins
over the app token in the remote URL. CalledProcessError does not carry stderr, so
git's one-line reason never reached the log.

Scope — every changed path

  • .github/workflows/release-tag.yml — persist-credentials: false on checkout.
  • scripts/release_tag.py — _git raises with git's stderr.
  • docs/zendev/schemes.json — scheme/3 records in_force_from 2026-09-07T18:04:02Z
    and commit 39cca61d, the merge of Give the ACCEPTOR sole ownership of the verdict #257.

Non-goals

Widening the job's permissions. It still declares permissions: {} and acts only
through the MACHINE app token.

Acceptance criteria

  • The tagger pushes v0.0.0 and creates its release on a rerun.
  • A failing git command reports git's own stderr.
  • Filling in scheme/3's commit does not change its digest.

Verification

python -m unittest discover -s scripts/tests   →  Ran 395 tests … OK

Digest before and after the schemes.json edit: f388453edf68 both times — the
property in_force_from and commit were excluded from the digest to provide.

🤖 Generated with Claude Code

The first live run cut v0.0.0 correctly and died on the push with exit 128 and no
explanation. Two defects, one of which hid the other.

actions/checkout leaves an http.extraheader carrying GITHUB_TOKEN, and that header
wins over a token placed in the remote URL. This workflow declares permissions: {} on
purpose, so that token can do nothing. persist-credentials: false removes the header
and lets the MACHINE app token in the URL be the only credential.

CalledProcessError's message does not include stderr, so the one line of git output
naming the cause never reached the log; the failure was diagnosable only by reasoning
about the workflow. _git now raises with git's own words.

scheme/3 also records the commit and time it came into force, now that #257 has
merged. Neither field is a descriptive key, so the digest is unchanged and the records
already written under this scheme stay under it — which is the property those keys
were excluded from the digest to give.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@drevendev
drevendev merged commit 32017e6 into master Sep 7, 2026
6 checks passed
@drevendev
drevendev deleted the policy/release-tag-push branch September 7, 2026 21:17
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.

The release tagger cuts a tag it cannot push, and hides git's reason

1 participant