fix(queen): export_push read the wrong field, and took 0 of 348 branches - #4608
Merged
Merged
Conversation
The secret landed today and the workflow proved it works on its first run:
waiting: 348 branch(es); taking 0 (base origin/master)
348 waiting, 0 taken. The filter read `entry["ahead"]`; the route sends
`commits` (queen-export.ts: waiting.push({ issue, branch, commits: ahead, ... })).
A name that is not there defaults to zero, and zero is what the filter drops,
so every branch was discarded before anything was fetched.
The credential was never the last blocker. The field name was, and it had been
wrong since the day this script was written - invisible because without the
secret the run never got past the listing.
THE SELF-TEST DID NOT CATCH IT, and that is the part worth keeping. Its
fixtures were written from the same wrong assumption as the reader: both said
`ahead`, so they agreed with each other and disagreed with production. A test
whose fixtures come from the same hand as the code under test is checking a
guess against itself, not against the thing it stands in for.
So the fixtures are rewritten with the route's own names, and two cases are
added: `ahead` is still accepted - a later route change must not become a
second silent zero - and an entry carrying neither name means nothing to take
rather than something.
Closes #4607
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
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.
The secret landed today and the workflow proved it works on its very first run:
348 waiting, 0 taken. The filter read
entry["ahead"]; the route sendscommits—queen-export.ts:waiting.push({ issue, branch, commits: ahead, files, head }). A name that is not there defaults to zero, and zero is what the filter drops, so every branch was discarded before anything was fetched.The credential was never the last blocker. The field name was, and it had been wrong since the day this script was written — invisible, because without the secret the run never got past the listing.
The self-test did not catch it, and that is the part worth keeping
Its fixtures were written from the same wrong assumption as the reader:
([{"branch": "queen-2", "ahead": 1}, ...], 10, ["queen-1", "queen-2"], "oldest issue first")Both said
ahead, so they agreed with each other and disagreed with production. A test whose fixtures come from the same hand as the code under test is checking a guess against itself, not against the thing it stands in for.Fix
Read
commits; keep acceptingaheadas a fallback so a later route change cannot become a second silent zero. Fixtures rewritten with the route's own names, plus two cases: the old name still works, and an entry carrying neither name means nothing to take rather than something.python3 tools/queen/export_push.py --self-test— PASS.Closes #4607
🤖 Generated with Claude Code