fix: triage reported its own failures as work waiting for a maintainer - #187
Merged
Conversation
Running the command exactly as the README documents it, on a public repository,
with no token:
20 open pull request(s) read. 14 have something a maintainer checks by hand.
#10586 gci-fun-1 could not be read
#12046 feat/detect-nested-any-in-… could not be read
#12086 strict-void-return-fixer could not be read
...
With a token the same repository returns five rows. Nine of those fourteen were
not pull requests needing attention, they were GitHub refusing the request:
60 unauthenticated requests an hour, which one queue uses up.
Every failure became `notes: ["could not be read"]`, which is the same shape a
finding has. So an unreadable pull request was counted in the headline, sorted
among real findings, and the process exited 0. This repository states that it
fails closed rather than presenting a partial pass, and has an ANALYSIS
INCOMPLETE state for exactly this. The command people are told to run first was
the one place that ignored it.
Unreadable pull requests are now tracked separately from findings, reported on
their own line, excluded from the count, and the run exits non-zero. When
nothing could be read at all it says so on stderr rather than describing a queue
it never saw.
An exhausted quota now stops the loop instead of attempting every remaining pull
request, since they all fail identically, and the advice differs by cause: set
GH_TOKEN when unauthenticated, wait or lower --limit when it was the token's own
quota. The listing no longer claims to be "rate limiting this token" at somebody
who has not set one.
The listing also no longer retries an exhausted hourly quota. That backoff waits
20, 40 and 60 seconds, so an unauthenticated caller sat through two minutes of
silence before getting the error anyway. GitHub marks this case with
x-ratelimit-remaining: 0, which the secondary rate limit does not.
Tests: runTriageCli was never executed by the suite, which is why this shipped.
There is now an integration test file that runs it against stubbed GitHub calls.
Five of its cases fail against the previous code.
README, getting-started and docs/triage.md said a token was for private
repositories and higher limits. For this command it is required.
sjh9714
added a commit
that referenced
this pull request
Aug 6, 2026
… for its own failures (#189) npm still serves 0.10.1, where running the command this project tells people to run first, on a public repository, with no token, prints: 20 open pull request(s) read. 14 have something a maintainer checks by hand. #10586 gci-fun-1 could not be read ... and exits 0. Nine of those fourteen were GitHub refusing the request after 60 unauthenticated calls an hour, not pull requests needing attention. The fix merged in #187 and has not reached anybody. Also ships the README rewrite from #188: it leads with the check nothing else appears to make, and install drops from four options to one because three of them were doing nothing. Verified in the order the last release taught. `pnpm audit` with no severity filter was run before the tag, not after: 0.10.0 was tagged and then rejected by the release gate for two moderate advisories, which is how a tag ends up pointing at something that never shipped. Checked against the packed tarballs rather than the source tree, since the source has always worked and that is exactly what hid this: cold install into an empty directory reports 0.10.2 and triages a real repository. No workspace:* and no private runtime dependency; 190 KB and 92 KB compressed.
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.
What a first-time user actually got
Running the command exactly as the README documents it, on a public repository,
with no token:
With a token, the same repository returns five rows. Nine of those fourteen
were not pull requests needing attention. They were GitHub refusing the request:
60 unauthenticated requests an hour, which one queue uses up.
Why it happened
Every failure became
notes: ["could not be read"], which is the same shape afinding has. So an unreadable pull request was counted in the headline, sorted
among real findings, and the process exited
0.This repository states that it fails closed rather than presenting a partial
pass, and ships an
ANALYSIS INCOMPLETEstate for exactly this situation. Thecommand people are told to run first was the one place that ignored it.
What changed
their own line, excluded from the count, and the run exits non-zero.
description of a queue the tool never saw.
request, since they fail identically.
GH_TOKENwhen unauthenticated, wait orlower
--limitwhen it was the token's own quota. The listing no longer tellssomebody who has not set a token that GitHub is "rate limiting this token".
20, 40 and 60 seconds, so an unauthenticated caller sat through two minutes of
silence before getting the error anyway. GitHub marks this case with
x-ratelimit-remaining: 0; the secondary rate limit, which does recover andis still retried, does not.
Why the tests did not catch it
runTriageCliwas never executed by the suite. Every triage test was either apure function or an assertion about the source text, so all 90 passed while the
command's error handling was wrong.
There is now
packages/cli/test/triageRun.test.ts, which runs it againststubbed GitHub calls. Five of its seven cases fail against the previous
code, verified by stashing the source change and re-running:
Documentation
The README, getting started, and
docs/triage.mdall said a token was forprivate repositories and higher rate limits. For this command it is required,
and they now say so, including that a token with no scopes is enough.
Verification
pnpm build && pnpm test && pnpm typecheck && pnpm lint && pnpm format:check,all green. 461 tests, up from 453.