fix: emit commit_authors in commit order, not set order - #13
Draft
gkrimer wants to merge 1 commit into
Draft
Conversation
#11 removed `sorted()` so authors would "appear in same order as the commits", but `commit_authors` stayed a `set`, so `",".join(...)` emits hash order -- which Python randomizes per process. The stated intent was never achieved: ❯ for seed in 0 1 2 3; do PYTHONHASHSEED=$seed python order_check.py; done --- PYTHONHASHSEED=0 --- new (list): gkrimer,celinefb,instrumentl707,gsinkin-instrumentl old (set): celinefb,instrumentl707,gsinkin-instrumentl,gkrimer --- PYTHONHASHSEED=1 --- new (list): gkrimer,celinefb,instrumentl707,gsinkin-instrumentl old (set): gkrimer,instrumentl707,gsinkin-instrumentl,celinefb --- PYTHONHASHSEED=3 --- new (list): gkrimer,celinefb,instrumentl707,gsinkin-instrumentl old (set): gkrimer,instrumentl707,celinefb,gsinkin-instrumentl Extracts the GitHub lookup into `github_logins`, which returns a list ordered by `author_to_sha` insertion (i.e. commit order, newest first) and drops duplicate logins while keeping the first position -- distinct author emails can map to one GitHub account. - create_tag.py: `commit_authors` set -> ordered list via `github_logins` - create_tag.py: drop write-only `change_authors`, dead since #10 - action.yml: `commit_authors` description said "first page", stale since #10 removed the paginated lookup; now documents the ordering contract - create_tag_test.py: 4 tests over order, dedupe, lookup failure, unlinked email Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gkrimer
force-pushed
the
fix/commit-authors-order
branch
from
July 28, 2026 15:26
b6c2169 to
cb38b08
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
#11 removed
sorted()so authors would "appear in same order as the commits" — butcommit_authorsstayed aset, so",".join(...)emits hash order, which Python randomizes per process. The intent was never achieved:Extracts the GitHub lookup into
github_logins, returning a list ordered byauthor_to_shainsertion — i.e. commit order, newest first, sinceenumerate_changeswalksrev-list. Duplicate logins are dropped keeping the first position, because distinct author emails can map to one GitHub account.create_tag.py:commit_authorsset → ordered list viagithub_loginscreate_tag.py: drop write-onlychange_authors, dead since #10 — assigned and.add()ed, never read, so ruff's F841 doesn't fire on itaction.yml: thecommit_authorsdescription said "first page of author usernames", stale since fix: separate deploying actor from commit authors #10 replacedcomp.commits.get_page(0)with per-authorget_commit; now documents the ordering contract insteadcreate_tag_test.py: 4 tests over order, dedupe, lookup failure, unlinked emailBlast radius
commit_authorshas exactly two consumers, both inauto-deploy-to-gke.yml: the Cloud Deploy releasedescription, and thegithub-author-namesannotation. Greppinginstrumentl,gke-scripts, andterraform-gcpfinds nothing reading that annotation back, so this is a determinism/readability fix, not a semantic one. No consumer changes needed.Test plan
ruff check/ruff format --check/pyright/pytest(13 tests) /./smoke-test.shpass locallyPYTHONHASHSEEDvalues (above); oldsetis notgithub-author-namesannotation lists authors newest-commit-first🤖 Generated with Claude Code