Skip to content

fix(github): pr readiness passes when review threads can't be read #797

Closed

Description

@dan-petty

Context & Rationale

pr check-readiness fails open in two places on release/v0.2.24:

  • Review threads. It treats a failed review-thread read as zero unresolved threads. commands/pr.py:1456-1459 prints a warning and carries on with an empty list, so a pull request can read as ready when its threads were never checked.
  • Commit statuses. It reads them from /status without pagination (commands/pr.py:1304-1325), so it sees only the first 30 contexts. It also ignores the combined state.

Two #665 fixes work but have no test: runs check failing when no metric applies, and an ambiguous run id being refused.

Scope & Deliverables

Strategic Alignment


Generated by Claude Code

Update 2026-10-08: refinement

The thread read still fails open (commands/pr.py:1736-1740); #769 delivered the statuses half.

  • A thread read that raises makes pr check-readiness exit 1 with a blocker naming the error.
  • ai runs check exits 1 on an empty comparison and on an ambiguous prefix (commands/ai_runs.py:670-671, :449).

Activity

  1. added
    type/bug
    scope/github
    priority/p2-medium
    on Oct 1, 2026
  2. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Consolidation (2026-10-03): the commit-statuses half of this item moves to #769. #769's shared check reader already reads statuses for its zero-runs rule, and the same /status read appears unpaginated in commands/pr.py:1321-1342 and github/pr_monitor.py:454. This item keeps two things: a failed review-thread read (commands/pr.py:1807-1809) blocks readiness and names its reason, and the two #665 tests. It lands first, on today's code, as #998's key question proposes. It becomes a sub-issue of #998.

  3. added this to the v0.2.36 milestone on Oct 14, 2026
  4. dan-petty commented on Oct 14, 2026

    @dan-petty
    OwnerAuthor

    Moved to v0.2.36: v0.2.36 started with fewer than its 16 items and was topped up to 16 from Ready items, critical fixes and P0 features first. (devops roadmap reprioritize)

  5. dan-petty commented on Oct 16, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1583, merged into release/v0.2.36 as e010fab.

    Closes #797

    23 file(s) changed.

    How it was verified

    Check runs at ff0c505:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Changed-Test Independence: pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • Analyze (actions): pass
    • Static Analysis: pass
    • Dependency Freshness: skipping
    • Service Image: skipping
    • DevContainer Image: skipping

    Acceptance Criteria of docs/agent/tasks/task-797-pr-readiness-thread-read-and-runs-check.md:

    • A thread read that raises makes pr check-readiness exit 1 with a blocker naming the error (tests/test_pr_cmd.py::TestPrCommands::test_check_readiness_fails_closed_when_review_threads_cannot_be_read).
    • ai runs check exits 1 on an empty comparison and on an ambiguous prefix (tests/test_run_comparison.py::test_cli_runs_check_fails_on_empty_comparison_and_ambiguous_prefix).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2-mediumscope/githubtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions