Skip to content

Spec: Dismissal, and an Inbox that learns from GitHub that the Day shift acted #919

Closed
9 of 9 issues completed

Description

@JacobStephens2

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.

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 status shares (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-triage is 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 dismiss or 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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. As the Day shift, I want to take a dismissal back (Q2.6), so that a misclick doesn't hide a problem for good.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. As the Day shift, I want Command details to show thirdshift dismiss … beside Dismiss and thirdshift dismiss … --undo beside Undo, so that I know the CLI equivalent.
  17. 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.
  18. As an agent, I want thirdshift dismiss <command> [--undo] [--json], naming a Command as stop and show do, so that the CLI can do everything the Console does (ADR 0016).
  19. As an agent, I want dismiss to 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.
  20. 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.
  21. 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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. As the Day shift, I want Resolved to hold a row for inbox.days after 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.
  14. 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.
  15. 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-triage taken off" or "findings triaged".
  16. 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.
  17. 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.
  18. As the Day shift, I want thirdshift status, status --json and the Console to agree on every row's group, so that the CLI and the page never disagree.
  19. As the Day shift, I want thirdshift status to use the Console's kept answer, and ask GitHub itself only when that answer is more than 5 minutes old (Q3.1), so that status stays fast with a Console and still works without one.
  20. 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.
  21. 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.
  22. As the factory, I want the Console and status to 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).
  23. 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.
  24. As the Day shift, I want reading GitHub never to write to it, so that taking in-progress off a closed issue stays the Sweep's job.
  25. As an agent, I want status --json to 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.
  26. 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 stop and show do: repo#number, an Issue URL, a Pass's kind-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 --undo on a row that isn't dismissed.
    • --undo works wherever the dismissed row now is.
  • 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 dismiss and dismiss --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.days after 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 as needs-triage coming 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.days keeps 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 gh reads. One batched GraphQL query per read covers each candidate row's issue (state, close time, whether it has needs-triage) and pull request (state, merge or close time), including those of the run it dispatched, and asks for its own rateLimit. 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-finding issue labelled needs-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 gh calls 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 status reads the kept answer. When it's missing or more than 5 minutes old, status first 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 status reads 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:

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 thirdshift binary. Tests run it in the integration-test Scenario with Command record fixtures and the fake gh, as the status and stop tests do. The fake gh learns 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.

  • 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 status integration tests;
    • the CLI and Console Stop tests;
    • the Console's live-update and elapsed-boundary tests;
    • the Security run tests' findings fixtures.

Out of Scope

Further Notes

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
failed

codex · gpt-6.1-sol · high

PR #789 is merged, not open

Sub-issues

Sub-issues

9 of 9 Issues completed
Loading 9 sub-issues

Activity

  1. added
    enhancement
    ready-for-human
    on Oct 20, 2026
  2. changed the title [-]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[/+] on Oct 21, 2026
  3. added a commit that references this issue on Oct 23, 2026
  4. added
    needs-triage
    on Oct 23, 2026
  5. changed the title [-]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[/+] on Oct 23, 2026
  6. removed
    ready-for-human
    on Oct 23, 2026
  7. added a commit that references this issue on Oct 23, 2026
  8. added
    ready-for-agent
    and removed
    needs-triage
    on Oct 23, 2026
  9. added
    in-progress
    ready-for-agent
    and removed
    ready-for-agent
    in-progress
    on Oct 23, 2026
  10. removed
    in-progress
    on Oct 24, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions