Repository navigation
Description
Context & Rationale
#707 made classifying a pull request's checks deep: one BUCKET_CLASSIFIER_MAP whose tests need no patches. Reading the checks is still written three times (github/check_verdict.py:251, github/pr_monitor.py:405, commands/pr.py:1274), with three error behaviours: an unread_reason, [] and RuntimeError. pr_monitor turns a failed check-runs read into "no checks", where #707 required an unread read to block. The seam is runner: Any = run_gh at the argv level, so tests script side_effect lists in call order (tests/test_pr_check_verdict.py:223-249).
Scope & Deliverables
- Deliverable: one module reads a pull request's checks and returns the fail-closed summary that
pr wait, the monitor and readiness consume. An unread read blocks in all three. - Constraint: the feat(github): fail-closed pr check verdicts from one bucket classifier #707 classifier table and its parity test stay as they are.
Strategic Alignment
- Milestone: Backlog (no release)
- Design: none
- Depends on: none
Amendment (2026-10-01 assessment)
- Context:
_failing_check_runs(commands/pr.py:1328-1355) returns no failing and no pending items when the head SHA has no check runs and no statuses, so readiness passes.- This can happen after a push made with
GITHUB_TOKEN. The repo has 0 Actions secrets, soupdate-prs.ymlfalls back to that token: on PR fix(k8s): integrate monitoring telemetry and fix dashboard metrics (#825) #828, 8675ec1 and 700385d have 0 check runs, while d259b97 got runs.
- Deliverable: When a head SHA has zero check runs and zero statuses, the shared reader reports it as pending ('no checks reported'). This applies to
pr wait, the monitor and readiness alike. - Acceptance criteria: A scripted read that returns zero runs and zero statuses yields a pending verdict naming 'no checks reported' in all three consumers.
- Constraint: The feat(github): fail-closed pr check verdicts from one bucket classifier #707 classifier table and its parity test stay as they are.
Consolidated from #797 (commit-statuses half)
Problem (added). Commit statuses are read without pagination in two places, commands/pr.py:1321-1342 (_fetch_commit_statuses_payload, called at :1359) and github/pr_monitor.py:454. So only the first 30 contexts are seen, and the combined state is ignored. They belong to the read this item unifies: the amendment above already reads statuses for its zero-runs rule.
Acceptance criteria (added).
- The shared reader reads commit statuses in full (paginated), or it uses the combined
state. A scripted test covers a head with more than 30 contexts and one failing context past the first page. The result blocks inpr wait, the monitor and readiness. - A statuses read that cannot be read blocks and names the reason (
unread_reason), the same way an unread check-runs read does.
Notes. #797 keeps its review-threads half and the two #665 tests, and lands first on today's code, as #998's key question proposes. This item and #797 become sub-issues of #998 (one readiness verdict), together with #806. The v0.2.28 placement and P1 are unchanged.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 2, 2026
Grooming (2026-10-02): Priority p2-medium → p1-high.
pr check-readinessandpr checks/waitpass a head with zero check runs, which was observed on PR #828 after GITHUB_TOKEN pushes. That is a fail-open merge gate.Placed in v0.2.28, one of its slots held for P1 work that surfaced after it was planned. Value High, effort Medium. Ready.
Checked against the code at the release/v0.2.25 tip.
refactor(github): read a pull request's checks once, fail-closed, for…
feat(release): v0.2.28 (#1283)