Repository navigation
Description
From the #919 grilling. The decision record is
docs/grill-with-docs/919-dismiss-and-github-state.md: see its Settled list. ADR 0023 records why the Inbox reads GitHub. Question numbers such as Q2.3 refer to that record.
Problem Statement
You open the Console, and Needs you is full of work you've already finished. The issue's own example was a Failed row for thirdshift#88, "PR … is merged, not open", still in Needs you 43 hours after PR #789 merged and the issue closed. Ready for review is no better: you open a row's pull request, merge it on GitHub, and the row stays.
- The Inbox reads only the machine. It never learns that the Day shift acted on GitHub (Spec: see, follow and Stop a machine's Commands from the CLI #711 Q37). A pull request merged by hand stays in Ready for review, and a failure whose issue closed stays in Needs you until it ages out.
- Most of what waits is already done. On 2026-10-23, GitHub showed 36 of the 58 rows in the two machines' Needs you and Ready for review finished. 13 of them had failed with "PR … is merged, not open".
- You can't clear a row yourself. A billing failure you've fixed, or a Ticket run you've decided to leave, sits in Needs you for a week. All that time it counts in the tab title, the urgent icon and browser notifications.
- Ready for review never empties. The Inbox's Ready for review keeps Commands whose pull request was merged, forever #1083 (PR Age ready Commands out of Ready for review like ended Needs you rows #1180) gives it Needs you's age limit and later-Command exit, and lands first (Q1.1).
Solution
Needs you and Ready for review work like a mail inbox (Q2.5): a row stays until it's dealt with, not until it's old. A row is dealt with when:
- GitHub shows it finished. Each machine's Console reads GitHub once a minute and keeps the answer, which
thirdshift statusshares (ADR 0023).- An ended row leaves Needs you once its issue is closed or its pull request merged. For an Architect run or Security run, the issue and pull request are those of the Spec run or Ticket run it dispatched.
- A Triage row also leaves once
needs-triageis off its issue, and a Finding once none of its findings still waits. - A ready Command leaves Ready for review once its pull request is merged or closed.
- A later Command starts on its issue, as today.
- Someone gives it a Dismissal, with
thirdshift dismissor with one click in the Console's Command details. Any row in either group can be dismissed, live ones included. A Dismissal changes nothing else, and it can be taken back.
Age clears only rows GitHub can't speak for. A row that leaves goes where it would be without the problem and says why it left. It stays in Resolved for inbox.days after it was dealt with.
User Stories
Dismissal:
- As the Day shift, I want to dismiss a row in Needs you that asks nothing more of me, such as a billing failure I've fixed, so that Needs you shows only what still needs me.
- As the Day shift, I want to dismiss a row in Ready for review, so that a pull request I've settled some other way stops waiting on me.
- As the Day shift, I want to dismiss a live Silent or Slow row too (Q1.2), so that I decide what Needs you shows while the Ticket run keeps going.
- As the Day shift, I want a dismissed Silent Ticket run to keep running, with its row in Working still saying "silent 12 min", so that dismissing never stops work. Stop still does that.
- As the Day shift, I want dismissing a row that stands for many failures with the same cause to dismiss every Command it stands for (Q2.2), so that one click clears chart35's 48 billing failures.
- As the Day shift, I want a later failure with the same cause to start the row again, counting only the new failures, so that a cause that's still failing is news.
- As the Day shift, I want a dismissed row to come back when it turns into a kind it wasn't (Q2.1), so that something new gets a new look. Examples: a Slow Ticket run that goes Silent; a live Command that dies, fails or ends ready; a failed Security run whose findings still wait, which comes back as a Finding.
- As the Day shift, I want each kind to count once for the whole row, so that a long Spec run I dismissed while Silent doesn't come back at every silence.
- As the Day shift, I want a dismissal to hold whatever GitHub does, so that reopening an issue doesn't bring back a row I dismissed.
- As the Day shift, I want to take a dismissal back (Q2.6), so that a misclick doesn't hide a problem for good.
- As the Day shift, I want a row I take back to go where GitHub's facts and the other rules put it, so that a row whose pull request merged in the meantime doesn't return to Ready for review.
- As the Day shift, I want a dismissal never to change the Command, its Ticket runs, its issue, its labels, its Claim or its pull request, and never to write to GitHub, so that it only tidies my Inbox.
- As the Day shift, I want the Activity log to record each dismissal and each one taken back, naming who and whether from the CLI or the Console, so that I can see who cleared what.
- As the Day shift, I want a Dismiss button in a row's Command details, beside Stop, that works with one click and no confirming page (Q3.6), so that clearing a row is quick, since Undo is right there.
- As the Day shift, I want a dismissed row's Command details to offer Undo, so that I can take a dismissal back where I made it.
- As the Day shift, I want Command details to show
thirdshift dismiss …beside Dismiss andthirdshift dismiss … --undobeside Undo, so that I know the CLI equivalent. - As the Day shift, I want any signed-in Console account to be able to dismiss, as any can Stop, behind the same session and CSRF checks, so that whoever watches the factory can tidy it.
- As an agent, I want
thirdshift dismiss <command> [--undo] [--json], naming a Command asstopandshowdo, so that the CLI can do everything the Console does (ADR 0016). - As an agent, I want
dismissto refuse, saying why, a row outside Needs you and Ready for review, a row with no Command record, and an undo of a row that isn't dismissed, so that a wrong name never does something unexpected. - As the Day shift, I want to dismiss one row at a time (Q3.9), so that no "dismiss all" hides a new problem among old ones.
- As the Day shift, I want a row that comes back to Needs you to notify me like a new one, so that I hear about it.
GitHub:
- As the Day shift, I want a ready Command to leave Ready for review once its pull request is merged or closed on GitHub, so that I don't have to tell the Console what I did on GitHub.
- As the Day shift, I want an ended row to leave Needs you once GitHub shows its issue closed or its pull request merged, so that a Ticket run whose pull request I merged while it ran leaves by itself.
- As the Day shift, I want an Architect run's or Security run's row judged by the Spec run or Ticket run it dispatched (Q2.3), so that a finished plan or fix takes its row out.
- As the Day shift, I want a Triage row to leave once its issue no longer has
needs-triage, so that answering the triage question clears it. - As the Day shift, I want a Finding row to leave once none of its findings still waits for triage (Q2.8), so that the Inbox agrees with the glossary's Security finding.
- As the Day shift, I want a failed Ticket run whose pull request I closed unmerged to stay in Needs you while its issue is still claimed, so that I remember to relabel or close the issue.
- As the Day shift, I want a Silent or Slow row to stay, whatever GitHub shows, until its Ticket run ends (Q3.5), so that a Ticket run still spending time on finished work stays in view while Stop is a click away.
- As the Day shift, I want GitHub's latest state to count while a row is in Needs you, Ready for review, Done or Resolved (Q2.3, Q3.3), so that reopening an issue soon after closing it brings its row back.
- As the Day shift, I want a row whose issue or pull request GitHub shows open to wait however old it is (Q2.5), so that I can trust the Inbox to be complete.
- As the Day shift, I want rows GitHub can't speak for to still leave by age after
inbox.days, so that they don't wait for ever. Those are rows with no issue or pull request (their own or their dispatched run's), rows with no Command record, rows not yet read, and rows whose issue or pull request GitHub can't find. - As the Day shift, I want a row that ages out to go straight to History, as today (Q4.2), so that billing failures don't sit in the Inbox for two weeks.
- As the Day shift, I want a row that leaves Needs you or Ready for review to go where it would be without the problem (Q2.7), so that the groups keep their meaning. A live row goes to Working or Landing, and an ended one to Done, Resolved or History.
- As the Day shift, I want Resolved to hold a row for
inbox.daysafter it was dealt with, not after it ended (Q3.4), so that a pull request I merge ten days after its Ticket run ended stays in view, with its Undo. - As the Day shift, I want a row to count as dealt with from when that happened, not from when the Inbox noticed, so that on the day this ships, rows GitHub finished weeks ago go straight to History instead of flooding Resolved. That is when GitHub says it merged or closed, when the later Command started, or when it was dismissed.
- As the Day shift, I want a row that has left to say why wherever it goes, so that a dismissed failure in Done doesn't read as a success. Examples: "dismissed by" and who, "pull request merged", "issue closed", "
needs-triagetaken off" or "findings triaged". - As the Day shift, I want the Console to read GitHub once a minute in the background (Q2.4), so that a merge shows up within a minute, without a reload.
- As the Day shift, I want open Console pages to update when GitHub's answer changes, as they do when a Command record changes, so that rows leave while I watch.
- As the Day shift, I want
thirdshift status,status --jsonand the Console to agree on every row's group, so that the CLI and the page never disagree. - As the Day shift, I want
thirdshift statusto use the Console's kept answer, and ask GitHub itself only when that answer is more than 5 minutes old (Q3.1), so thatstatusstays fast with a Console and still works without one. - As the Day shift, I want the Inbox to keep the last answer while GitHub can't be read, so that an outage doesn't put a week of finished failures back in Needs you.
- As the Day shift, I want the Inbox's warning line to say when GitHub last answered and why the latest read failed, once that's more than 5 minutes ago, so that I know when to doubt the groups.
- As the factory, I want the Console and
statusto skip their reads while fewer than 500 GraphQL points or 500 REST requests are left, and say so (Q3.2), so that Ticket runs keep the last of the quota (Defer scheduled passes during GitHub quota exhaustion and reduce idle polling #739). - As the factory, I want each read to cover only rows in the Inbox (Q3.3), so that it grows with the Inbox, not with the machine's history.
- As the Day shift, I want reading GitHub never to write to it, so that taking
in-progressoff a closed issue stays the Sweep's job. - As an agent, I want
status --jsonto give each row's dismissal (who, when, from where), what GitHub last showed for it and when, and why and when it left, and to give how old GitHub's answer is, so that scripts see what the Console shows. - As the Day shift, I want no new User config settings (Q3.7), so that every machine behaves the same.
Implementation Decisions
Dismissal:
-
A dismissal is kept beside its Command record, as a Stop request is (Q1.4). It says:
- who made it, when, and from the CLI or the Console;
- which of the record's rows it covers, since a dispatched Spec run or Ticket run lives in its Pickup run's or Architect run's record;
- the kinds of row it has covered, which the return rule compares against (Q2.1). Dismissing a row that came back adds its new kind.
Taking it back removes it.
-
Dismissing a collapsed Failed row dismisses every Command it stands for (Q2.2), one dismissal beside each record.
-
thirdshift dismiss <command> [--undo] [--json]:- It names a Command as
stopandshowdo:repo#number, an Issue URL, a Pass'skind-stamp, or a record's path. - It acts on the whole row the Command is in, one Command per call, and asks for no reason.
- It refuses a row outside Needs you and Ready for review, a row with no Command record, and
--undoon a row that isn't dismissed. --undoworks wherever the dismissed row now is.
- It names a Command as
-
The Activity log gets a line for each dismissal and each one taken back, like Stop's. It names the Console account's email, or the Unix user from the CLI, and where the request came from.
-
Console:
- Command details offers Dismiss beside Stop for a row in Needs you or Ready for review, and Undo for a dismissed row, each with its CLI form beside it. make thirdshift console web ui more like prototype variant=console&page=inbox #917 may later move both onto the rows.
- Both are one-click form posts with no confirming page, behind the session and CSRF checks Stop's post has.
- The Console's route table pairs them with
dismissanddismiss --undo, so the existing pairing test covers them.
The Inbox's rules:
- Needs you:
- A live row (Silent or Slow) leaves by itself as today, or on a dismissal. GitHub's facts never move it (Q3.5).
- An ended row leaves once GitHub shows it finished (Q2.3, Q2.8), once a later Command starts on its issue, or on a dismissal.
- Age moves it only if GitHub can't speak for it (Q2.5).
- Ready for review: a ready Command leaves once GitHub shows its pull request merged or closed, once a later Command starts on its issue (The Inbox's Ready for review keeps Commands whose pull request was merged, forever #1083), or on a dismissal. The Inbox's Ready for review keeps Commands whose pull request was merged, forever #1083's age limit moves it only if GitHub can't speak for it (Q2.5).
- A row GitHub can't speak for has no issue or pull request of its own or of its dispatched run, has no Command record, hasn't been read yet, or has an issue or pull request GitHub says doesn't exist or can't be seen (Q3.1).
- GitHub's latest state counts while a row is in Needs you, Ready for review, Done or Resolved. From History on, it keeps what GitHub last showed (Q3.3). A dismissal holds whatever GitHub shows.
- A dismissed row comes back when it turns into a kind its dismissal hasn't covered, or when the dismissal is taken back (Q2.1, Q2.6).
- A row that leaves goes where it would be without the problem, and says why (Q2.7).
- Resolved holds a row for
inbox.daysafter it was dealt with (Q3.4): when GitHub says its pull request merged or its issue closed, when the later Command started, or when it was dismissed. A change GitHub gives no time for, such asneeds-triagecoming off or findings being triaged, counts from when the Inbox first saw it. A row that ages out isn't dealt with and goes straight to History (Q4.2). Done still holds the Commands that ended in the last day. inbox.dayskeeps its name and default. It now ages only rows GitHub can't speak for, and sets how long Resolved holds a row after it ended or was dealt with.- Notifications don't change. A browser notifies when the count of Needs you rows rises, so a row that comes back notifies like a new one.
Reading GitHub (ADR 0023):
-
A GitHub reader beside thirdshift's other
ghreads. One batched GraphQL query per read covers each candidate row's issue (state, close time, whether it hasneeds-triage) and pull request (state, merge or close time), including those of the run it dispatched, and asks for its ownrateLimit. A read too large for one query is split into as few as it needs. An item GitHub can't resolve is marked as one it can't speak for, without failing the rest. -
Findings: one paginated REST list per repository with a Security run row whose findings were waiting, a Finding or a failed Security run, read as a Security run reads them. A finding waits while its private record is untriaged, by the rule the Security run uses: a draft advisory with no severity, or an open
security-findingissue labelledneeds-triage. A record a merged fix closed (Security run closes a Security finding its fix merged, noting the pull request, when allowed #1073) no longer waits. -
Candidate rows are every row in Needs you and Ready for review, plus every row that left them, while it's in Done or Resolved. Rows with no Command record are never read.
-
The kept answer is one file per machine, in thirdshift's folder in the home directory, replaced whole after each read. It holds:
- each item's facts and their times;
- when GitHub last answered, and why the latest read failed, if it did;
- the quotas left, and when each resets.
It's a cache: nothing else depends on it, and losing it costs one read.
-
The Console reads once a minute in the background, keeping its blocking
ghcalls off its async thread (ADR 0016 keeps async inside the Console). It skips reads while the last one showed fewer than 500 GraphQL points or 500 REST requests left, until that quota resets. -
A new answer that changes any row wakes open pages, as a Command record's change does. The Console's file watcher bumps the Inbox only for changes in the logs folder, the Console's own folder and the User config. So the kept answer goes in one of those, or the reader wakes the Inbox itself. The new Resolved boundaries join the Inbox's scheduled time boundaries, so an idle Console still renders nothing.
-
thirdshift statusreads the kept answer. When it's missing or more than 5 minutes old,statusfirst reads GitHub itself, under the same reserve. If that fails, it shows the kept answer. -
The Inbox's warning line, a fixed message today, can also carry GitHub's. Once the last good read is more than 5 minutes old, or while reads are skipped for the quota, it says when GitHub last answered and why the latest read failed.
-
The numbers are fixed, and none is a setting (Q3.7): 1 minute between reads; 5 minutes before a warning, and before
statusreads for itself; a reserve of 500 GraphQL points and 500 REST requests. Tests shorten the minute with an environment override, as they already do for the poll interval. -
The reads never write to GitHub.
status --json:
- Each row gains its dismissal, if any: who, when, from where, and the kinds it covers. It also gains what GitHub last showed for it and when, and, if it left Needs you or Ready for review, why and when. The Inbox as a whole gains when GitHub last answered and the latest failure. Text output and the Console show the same reasons.
Docs:
- The glossary and ADR 0023 already describe all this (Record #919's grilling: Dismissal, and the Inbox reading GitHub (ADR 0023) #1188).
- Each Ticket corrects the hand-written site pages it changes, and adds what it builds to the domain-to-code index in the code-navigation doc.
Testing Decisions
-
A good test drives thirdshift as the Day shift or an agent would, and checks what they would see: groups, reasons, refusals, Activity log lines and pages. It doesn't reach into the Inbox's internals, and touches the kept answer only to set its age.
-
Seam 1, the main one, is the
thirdshiftbinary. Tests run it in the integration-test Scenario with Command record fixtures and the fakegh, as thestatusandstoptests do. The fakeghlearns two things:- to answer the Inbox's batched GraphQL query alias by alias, with
rateLimit; - to fail as GitHub does: rate limited, unreachable, or unable to resolve an item.
Its findings lists already exist for the Security run tests. Ages come from fixture timestamps, and the kept answer's age from its file.
- to answer the Inbox's batched GraphQL query alias by alias, with
-
Seam 2 is the Console over HTTP, as its Stop and live-update tests do. It covers only what the Console alone shows: Dismiss and Undo in Command details, their authenticated posts, and the Console's own minute read reaching an open page, with the minute shortened by the environment override. The existing test that pairs every Console route with CLI commands covers the new routes.
-
No new seams, and no browser-side tests. Dismiss and Undo are plain form posts, and notifications don't change.
-
Prior art:
- the
statusintegration tests; - the CLI and Console Stop tests;
- the Console's live-update and elapsed-boundary tests;
- the Security run tests' findings fixtures.
- the
Out of Scope
- Showing GitHub's state, or a pull request's checks, on rows still waiting (Q3.8). That could be an issue of its own.
- Dismissing several rows at once, or a whole group (Q3.9).
- Acknowledging a row without it leaving (Q1.2), muting a cause (Q2.2), or dismissing for a set time (Q2.1).
- GitHub webhooks (Q2.4).
- Settings that turn reading GitHub off or change its timings (Q3.7).
- Dismissing rows with no Command record (Q1.4). Every one will have aged out before this ships.
- Anything a dismissal might write to GitHub, such as a label or a comment (Q1.4).
- One Console for every machine (Spec: the Fleet in the Console #1142). Each machine keeps its own dismissals and its own reads.
- The Inbox's layout (make thirdshift console web ui more like prototype variant=console&page=inbox #917). Dismiss sits in Command details until make thirdshift console web ui more like prototype variant=console&page=inbox #917 moves it.
- Whether a Ticket run that fails with "PR … is merged, not open" should count as failed.
- "(title unavailable)" (Q3.10). Since 2026-10-20 a Pickup run's own record carries its issue's title. The rows that still show the placeholder are older records, rows with no Command record, and a dispatched Ticket run whose title read failed.
- The Inbox's Ready for review keeps Commands whose pull request was merged, forever #1083's own exits. It's its own issue, and lands first (Q1.1).
Further Notes
- Publication follows
docs/agents/triage-labels.md./to-ticketspublishes the Tickets as sub-issues with their blocking links, and this Spec staysneeds-triageuntil every Ticket and link is in place, then becomesready-for-agent. A rough cut (Q3.11):thirdshift dismissand--undo, with the Activity log lines and the Inbox rules for dismissal (Q2.1, Q2.2, Q2.7);- the Console's Dismiss and Undo, after Ticket 1;
- reading GitHub, with
statussharing the kept answer (Q3.1, Q3.2, Q3.7); - GitHub moving rows, after Ticket 3 and The Inbox's Ready for review keeps Commands whose pull request was merged, forever #1083 (Q2.3, Q2.5, Q3.3 to Q3.5, Q4.2);
- Findings leaving once triaged, after Ticket 3 (Q2.8).
- The Inbox's Ready for review keeps Commands whose pull request was merged, forever #1083's PR Age ready Commands out of Ready for review like ended Needs you rows #1180 rewrites the glossary's Inbox entry to say the Inbox reads only the machine.
mainnow has Spec: Dismissal, and an Inbox that learns from GitHub that the Day shift acted #919's version, so whoever resolves Age ready Commands out of Ready for review like ended Needs you rows #1180's conflict keeps both The Inbox's Ready for review keeps Commands whose pull request was merged, forever #1083's later-Command exit and GitHub's. - Numbers from the research: 36 of 58 rows already finished on GitHub, 13 of them "PR … is merged, not open". One batched query that looked up 46 pull requests and issues across 10 repositories cost 1 GraphQL point. Both machines and the Day shift's laptop sign in to
ghas one account, so they share one quota.
The issue as first written
for example, the following from needs you was since merged - similar has happened in ready for review too. Or I open the PR link in it, merge it, but then it is still in ready for review
Failed
#88
(title unavailable)
43 hr 34 min
failedcodex · gpt-6.1-sol · high
PR #789 is merged, not open
Activity
[-]add way to dismiss / acknowledge needs you alerts, and decide whether or not to get live github status updates[/-][+]add way to dismiss / acknowledge needs you alerts and ready for review items, and decide whether or not to get live github status updates[/+]Merge pull request #1188 from JacobStephens2/dismiss-grill
[-]add way to dismiss / acknowledge needs you alerts and ready for review items, and decide whether or not to get live github status updates[/-][+]Spec: Dismissal, and an Inbox that learns from GitHub that the Day shift acted[/+]Merge pull request #1189 from JacobStephens2/grill-919-recheck
Merge main into issue-1083 and resolve Inbox conflicts