Skip to content

Ready for review learns from GitHub #1194

Closed

Description

@JacobStephens2

Parent

#919

What to build

This is the first slice of the Inbox reading GitHub (ADR 0023; Spec Q1.3, Q2.3 to Q2.5, Q3.3).

thirdshift status looks up some rows' pull requests in one batched GraphQL query, split only if it must be:

  • every row in Ready for review;
  • every row that left Ready for review, while it's in Done or Resolved.

The query asks for each pull request's state and its merge or close time, and for the query's own rateLimit. status keeps the answer in one file per machine and reuses it while it's under 5 minutes old. When the answer is missing or older, status reads GitHub first.

A ready Command leaves Ready for review once its pull request is merged or closed, saying "pull request merged" or "pull request closed". Resolved holds it for inbox.days from GitHub's merge or close time. A pull request reopened while its row is in Done or Resolved brings the row back. From History on, a row keeps what GitHub last showed and isn't read again.

Some ready rows are ones GitHub can't speak for:

  • a row with no pull request;
  • a row with no Command record;
  • a row not read yet;
  • a row whose pull request GitHub can't resolve.

Those still leave by #1083's exits. Any other ready row's age no longer moves it (Q2.5).

An item GitHub can't resolve doesn't fail the rest of the read. The reads never write to GitHub. status --json gives each row what GitHub last showed and when, and how old the Inbox's answer is.

Acceptance criteria

  • The fake gh answers the batched query alias by alias, with rateLimit, and reports an item it can't resolve.
  • With no kept answer, or one older than 5 minutes, status reads GitHub. With a fresher one, it doesn't.
  • A merged pull request takes its row out of Ready for review, saying "pull request merged", into Resolved for inbox.days from the merge time. A closed one says "pull request closed".
  • A dispatched Ticket run's ready row is judged by its own pull request.
  • A ready row whose pull request is open stays, however old it is.
  • A ready row with no pull request, no record or an unresolvable pull request still ages out by The Inbox's Ready for review keeps Commands whose pull request was merged, forever #1083's rule.
  • A pull request reopened while its row is in Done or Resolved brings the row back to Ready for review. A History row isn't looked up.
  • Rows whose pull requests merged weeks ago go straight to History when first read, instead of filling Resolved.
  • status --json gives each row's GitHub facts and their time, and the age of the Inbox's answer.
  • No gh call writes anything.
  • Tested through the thirdshift binary with the fake gh, with ages set by fixture timestamps and by the kept answer's file time.
  • The hand-written site pages and the domain-to-code index say what changed.

Blocked by

Activity

  1. added
    ready-for-agent
    on Oct 23, 2026
  2. added a commit that references this issue on Oct 24, 2026
  3. JacobStephens2 commented on Oct 24, 2026

    @JacobStephens2
    OwnerAuthor

    Closed by #1220, merged into issue-919 by a thirdshift Ticket run with Self-merge.

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

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions