Skip to content

source-control/babysit-prs: pr_queue_snapshot.py silently drops a PR from the listing (and the N-PR(s) count) when its reviews-fetch call errors, instead of degrading gracefully #574

Description

@kyle-sexton

lane: babysit

Triggering example: cycle 2 of a 2026-07-19 babysit session. First snapshot this cycle returned 8 PRs (#377, #489, #561, #563, #564, #567, #568, #569). After dispatching 5 fix workers, I re-ran the snapshot to close out the cycle:

python pr_queue_snapshot.py --queue --author @me --owners kyle-sexton,melodic-software --state-dir <dir> --write-state

Output: Babysit PR snapshot: 4 PR(s), cadence=active, with an Errors: block naming 4 PRs (#377, #489, #563, #567) whose gh api repos/.../pulls/<N>/reviews?per_page=100 --paginate --slurp call hit a transient GitHub 503. All 4 of those PRs are then completely absent from the listing below — not shown with degraded/partial data, not counted in the N PR(s) total, just gone. I confirmed independently via gh pr list --state open --author kyle-sexton that all 8 PRs were still open at the time; #489/#563/#567 had just been pushed to by my own workers minutes earlier, so they were very much live and actionable.

Observed vs expected: observed — a transient per-PR API error on one field (the reviews list) silently removes the entire PR from the queue snapshot's output and count, with only a terse top-of-output Errors: line as the only trace, easy to miss if you don't count PRs by hand against gh pr list. Expected — a PR whose reviews-fetch errors should still appear in the listing (using whatever other data succeeded, e.g. from the earlier successful fetch this same cycle), flagged as degraded/partial-data with the specific missing field noted, so an operator/orchestrator relying on the snapshot's PR count and body doesn't silently lose visibility into an actionable PR because of an unrelated, transient upstream 503. In an unattended loop with less careful cross-checking than this cycle had, this could mean a PR sits ignored indefinitely purely because it happened to hit a 503 on the reviews call at snapshot time.

Category: bug (silent data loss / incomplete degrade-on-error behavior in pr_queue_snapshot.py).

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions