Skip to content

watch-pr treats a repo with no CI as a retryable error and never settles #296

Done

Description

@joethong

Version: seen on 1.21.0; the same code is in 1.16.0. macOS, Claude Code parent.

What happens. On a repository with no CI (no workflows, no status checks), watch-pr cannot tell "no checks exist" from "checks could not be read". resolveChecks in skills/poteto-mode/scripts/watch-pr/github.ts throws ChecksUnavailable when both the gh pr checks fast path and the GraphQL rollup are empty, and that error is retryable: true.

  • watch-pr --status-only --max-query-errors 1 on such a PR exits 7 with BLOCKER status-query checks-unavailable "no checks reported".
  • With the default error budget it retries forever (backoff 60, 120, 240 s seen), so an Autopilot owner waiting on it never gets a settled state. Our owners fell back to gh pr view.

Repro. A private repo with no .github/workflows and no branch protection checks; open any PR; run watch-pr on it.

Expected. A PR whose head commit has no check runs and no statuses at all is "no checks", a settled state (green for merge-readiness purposes, or at least reported once), not a retryable query error. A real read failure (non-zero gh exit, GraphQL error) should stay retryable.

Suggested fix. In resolveChecks, when the fast path exits 0 with an empty list and the GraphQL rollup returns no contexts for the head commit, return an empty CheckRead (or a distinct no-checks source) instead of throwing.

Activity

  1. ericlitman commented on Dec 1, 2026

    @ericlitman
    Owner

    Opened PR #314: #314

  2. ericlitman commented on Dec 1, 2026

    @ericlitman
    Owner

    #296: watch-pr treats a repo with no CI as a retryable error and never settles

    Merged in PR #314 (a362079f, head 98a89f81).

    • Treat a PR head whose GraphQL statusCheckRollup is null (zero check runs and zero commit statuses) as a settled empty check set (✅ no checks immediately in --status-only; confirmed with one re-read in watch mode) while keeping real read errors retryable: done differently for live proof — unit tests (watch-pr/github.test.ts, watch-pr/policy.test.ts) cover the null-rollup state machine, and the installed 1.22.0 ~/.agents/skills/poteto-mode/scripts/watch-pr/watch-pr --owner octocat --repo Hello-World --pr 11832 --status-only --pretty ran live on studio1 and exited 0 printing | [#11832](https://github.com/octocat/Hello-World/pull/11832) | ✅ no checks | ✅ | ✅ |. Reader correction (Replace the README Mermaid diagram with a designed hero image #9): The PR fix(watch-pr): keep runtime deps outside plugin cache and settle on repos with no CI #314 live gate (comment 7313616155) ran only watch-pr --help and the startup hook, not the no-CI path, and Eric never ruled on the 13:49Z question asking whether the local octocat/Hello-World#11832 run plus unit tests substitutes for a live-gate case (that question was dropped from the later consolidated question list). Parent position: the live installed 1.22.0 run against octocat/Hello-World#11832 now directly proves --status-only on a real no-CI PR, so no deferred proof is filed; watch-mode re-read stays unit-tested only.

    Full checked closeout record: projects/open-pstack/records/2026-12-01-batch-293/closeout.md (Open Pstack v1.22.0).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions