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.
|
Thanks for this. I reproduced the base behavior and checked it against this PR. With a head that has no checks, base exits 7 after 60, 120, 240 and 300 s retries and then a Two notes. The retry sequence in the description. The description says retries happen at 60, 120 and 240 s and then stop. On base I saw a fourth retry at 300 s, then the blocker, because the default The error budget under #592 also edits |
|
Hey @AlexNegrescu26, thanks for running both sides against a real |
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, 240 and 300 s (the default--max-query-errorsis 5), then aBLOCKER: status-query failures=5line and exit 7; never a status. 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. This is a behaviour change beyond the no-checks case: a transientghfailure during--status-onlynow ends the run at once (exit 7 with the failure named) rather than retrying for minutes. For a one-shot table that is the intended trade; callers that want retries keep using polling mode. 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).Overlap: #592 (configurable review bots) also edits
policy.ts;git merge-treereports a conflict in that file only, the other four files merge cleanly. Whichever lands second needs a small rebase.