Skip to content

fix: v0.3.4 bump-consumers says what it did - #10

Merged
fatherlinux merged 2 commits into
mainfrom
fix/bump-consumers-says-what-it-did
Nov 4, 2026
Merged

fatherlinux merged 2 commits into
mainfrom
fix/bump-consumers-says-what-it-did

Conversation

@fatherlinux

Copy link
Copy Markdown
Member

Closes the verification half of RT#1553.

bump-consumers printed nothing when it had nothing to bump and nothing when gh pr create was refused. Those two look identical from outside the job, which is how the missing pull_requests: write on the crunchtools-ci App survived v0.3.0 through v0.3.2 looking green.

The permission is now present on the crunchtools installation:

crunchtools-ci perms={"contents":"write","metadata":"read","pull_requests":"write"}

but it has never actually been exercised — when v0.3.3 released, trentina already pinned v0.3.3 by hand, so the job had nothing to do and said nothing. This release gives it something to do: trentina pins v0.3.3, so a bump PR should appear in trentina without anyone opening it. That is RT#1553's done-when.

🤖 Generated with Claude Code

https://claude.ai/code/session_01R7Y1jg2DfucoFv7VrzzwVR

The job printed nothing when it had nothing to bump and nothing when it
could not open a pull request, so the two were indistinguishable from the
outside. That is how RT#1553 survived two releases: the crunchtools-ci App
had no `pull_requests: write`, every `gh pr create` was refused, and the
job still read as green and quiet.

It now always ends with a count -- repos pinning python-sdlc, bumped,
already current, failed -- and says so on stderr if no repo pins it at all,
which would mean the discovery itself had broken. The per-repo survey moved
into its own function to keep main() under the complexity gate.

The permission is now granted on the crunchtools installation, so this
release doubles as the first live test of the pull-request path: trentina
pins v0.3.3 and should receive a bump PR nobody opened by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jg2DfucoFv7VrzzwVR
@fatherlinux
fatherlinux enabled auto-merge November 4, 2026 20:58

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatehouse found 2 issues (1 medium, 1 low)

Full review.

4 finding(s) dropped: their evidence is not in the diff.

Comment thread scripts/bump_consumers.py Outdated
f"{len(current) + len(stale)} repo(s) pin python-sdlc: "
f"{did} to {args.version}, {len(current)} already there, {len(failed)} failed"
)
if not current and not stale:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MEDIUM (Bug Hunter): If every repository lookup fails, current and stale are both empty, so the script claims no repository pins python-sdlc even though it could not determine that. This can mislead users despite the separate failure count.

Suggestion: Only print the no-pins message when there were no lookup failures, or change the message to indicate that no pins were found among successfully read repositories.

Evidence:

if not current and not stale:
        print("no repo pins python-sdlc; nothing was bumped", file=sys.stderr)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 5c345f9 — the message is now suppressed when any lookup failed, so a fleet-wide rate limit can no longer produce a confident claim about pins nobody read.

Comment thread scripts/bump_consumers.py Outdated
continue
current, stale, failed = survey(repos, args.version)
opened = []
for repo in [] if args.dry_run else stale:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW (General Review): The conditional expression uses an empty list to suppress iteration during dry runs. This makes the control flow less explicit than a normal conditional and can obscure that dry runs intentionally skip bumping.

Suggestion: Use an explicit if not args.dry_run: around the loop over stale.

Evidence:

for repo in [] if args.dry_run else stale:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 5c345f9 — now an explicit if not args.dry_run: around the loop.

Both findings were right. "No repo pins python-sdlc" is only knowable when
every repo was actually read, so it is now suppressed when any lookup
failed -- otherwise a fleet-wide rate limit would print a confident claim
about pins nobody looked at. And the dry-run skip is an explicit
`if not args.dry_run:` rather than iterating an empty list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jg2DfucoFv7VrzzwVR

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatehouse found no issues.

Reviewed 1 commit since 89f7dec (incremental).

@fatherlinux
fatherlinux merged commit 1282361 into main Nov 4, 2026
15 checks passed
@fatherlinux
fatherlinux deleted the fix/bump-consumers-says-what-it-did branch November 4, 2026 21:31
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