Repository navigation
Description
Parent
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
ghanswers the batched query alias by alias, withrateLimit, and reports an item it can't resolve. - With no kept answer, or one older than 5 minutes,
statusreads 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.daysfrom 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 --jsongives each row's GitHub facts and their time, and the age of the Inbox's answer. - No
ghcall writes anything. - Tested through the
thirdshiftbinary with the fakegh, 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.
Activity
Merge pull request #1220 from JacobStephens2/issue-1194
JacobStephens2 commentedon Oct 24, 2026
Closed by #1220, merged into issue-919 by a thirdshift Ticket run with Self-merge.