Repository navigation
Conversation
…tead of retrying for minutes On a PR in a repository with no CI or check apps, resolveChecks throws a retryable ChecksUnavailable when both gh pr checks and the GraphQL rollup are empty, and --status-only went through pollUntilTerminal with the full --max-query-errors budget. The result was RETRY lines at 60/120/240 s and no status at all, which stalls babysit's check mode. - readSnapshot gains noChecks: "report" | "retry". With "report" an empty check set becomes a new ci-none state (source "none", no checks, merge assessment still read); the default keeps today's retry, because a freshly pushed head has no checks yet either and polling must not call it ready. - runSimple passes "report" for --status-only and clamps maxQueryErrors to 1 for that mode, so a status read ends on the first query error instead of sleeping through the backoff schedule. - --pretty renders ci-none as "no checks reported"; --status-only help says it reads GitHub once. Tests: readSnapshot report/retry, CLI --status-only on a no-checks head (JSON and --pretty), first-error exit, and polling still emitting RETRY. bun test 74/74, tsc clean, harness tree regenerated. Fixes cursor#750.
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.
Fixes #750.
Problem
On a PR in a repository with no CI or check apps,
watch-pr --status-onlynever prints a status.resolveChecksthrows a retryableChecksUnavailablewhen bothgh pr checksand the GraphQL rollup come back empty,readSnapshothas no state for that case, andrunSimplesends--status-onlythroughpollUntilTerminalwith the full--max-query-errorsbudget. So the caller seesRETRY: GitHub status query failed; retrying in 60sat 60, 120 and 240 s and then nothing. Babysit's check mode calls--status-onlyand expects one status line, so the check stalls for minutes.Change
readSnapshotgainsnoChecks: "report" | "retry". With"report"an empty check set becomes a newci-noneCI state (source: "none", no checks, merge assessment still read so the GitHub-side verdict is kept). The default keeps today's retry: a freshly pushed head has no checks yet either, and polling must not call it ready.runSimplepasses"report"only for--status-only, and clampsmaxQueryErrorsto 1 for that mode, so a status read ends on the first query error instead of sleeping through the backoff schedule. Polling mode is unchanged.--prettyrendersci-noneasno checks reported; the--status-onlyhelp text says it reads GitHub once.This follows the shape of the two downstream fixes linked in the issue (MaxFabian25/pstack-harness-adaptations #2 and #5), folded into one change against this tree.
ci-noneis not reachable fromclassifyPr/ stack decisions, since only--status-onlyproduces it; the exhaustiveswitchinrender.tscovers it.Tests
policy.test.ts:readSnapshotwithnoChecks: "report"yieldsci-nonewith a merge assessment; the default still raises a retryablechecks-unavailableerror.cli.test.ts:--status-onlyon a no-checks head prints oneSTATUSverdict withci-none(JSON and--pretty);--status-onlyends on the first query error without sleeping; plain polling on the same head still emitsRETRYand sleeps.bun test: 74 pass / 0 fail.tsc --strictclean.generate-pstack-harness-trees.mjs --checkup to date. No overlap with #746 (git merge-treeclean).