Repository navigation
Description
This was generated by AI during triage.
Spec B of four from the #1142 grilling (grilling, ADR 0026, PR #1752). Order: Spec A, the Console API (#1753) → release step (#1760) → Spec B (this). Spec C (#1768, run and admin, absorbing #952) follows #1753. This issue's original problem statement is in its edit history.
Problem Statement
Each Console shows only the Commands of its own machine. When work moves between machines, it drops out of the Console the Day shift watches. On 2026-10-23 the thirdshift host was saturated, so #1126, #700's Spec run and #977's continuation were started by hand on stephens. None of them appeared at console.thirdshift.app. They were only on stephens' own Console, behind its own sign-in, and nothing on the first Console said work on its repository was running elsewhere. The Day shift runs thirdshift on thirdshift, stephens and the ETA servers, and has to keep a tab, a sign-in and a mental merge for each. Acting on a Command means finding the right Console first.
Solution
A Console shows and runs its whole Fleet: its own machine and each machine its User config lists with a token. Every fleet machine's Commands are merged into the same Inbox groups, each row tagged with its machine. The tab title's "need you" count includes them. A Command's details open in place, fetched live from the owning machine and never stored. From any row, the Day shift can Stop, make a Dismissal or Undo one, and the owning machine carries the action out and records it in its own Activity log, naming the person and the machine they acted from. Machines are paired from the CLI. A machine that's unreachable or too old shows as such and never breaks the page. thirdshift status and the CLI's actions do the same with --machine. All of it goes through each machine's /api/v1 (#1753).
User Stories
- As the Day shift, I want one Console to show every machine in my Fleet, so that work started anywhere is in front of me.
- As the Day shift, I want each fleet machine's Commands merged into the same Inbox groups as my own, so that Needs you is one list, whatever machine a row is on.
- As the Day shift, I want every row tagged with its machine, so that I know where it's running.
- As the Day shift, I want my own machine's rows tagged too once a Fleet exists, so that every row reads the same way.
- As the Day shift, I want the tab title's "need you" count to include every fleet machine, so that a background tab tells the truth.
- As the Day shift, I want browser notifications (make browser notification option on thirdshift console web ui #958) to fire for fleet machines' rows as for my own, so that nothing on another machine waits silently.
- As the Day shift, I want the active-run count to cover the Fleet, with each machine's share visible, so that I can see where load is.
- As the Day shift, I want each machine's rows to say how old they are, so that I know how fresh a remote view is.
- As the Day shift, I want a machine that hasn't answered for a minute shown as unreachable, with its last rows greyed, so that stale rows don't pass for live ones.
- As the Day shift, I want a machine whose thirdshift is too old for the API shown as needing an update, with a link to its Console, so that I know why it's missing.
- As the Day shift, I want a machine whose token was refused shown as refused, naming the error, so that I know to re-pair it.
- As the Day shift, I want an unreachable, old or refused machine never to break or slow the page, so that one bad machine can't hide the others.
- As the Day shift, I want fleet machines fetched every 15 seconds only while a Console page is open, so that nothing runs when nobody is looking.
- As the Day shift, I want a machine filter on the Inbox kept in the URL, so that I can bookmark "ETA only" without changing settings.
- As the Day shift, I want the default view to show every machine, so that the filter never hides work by accident.
- As the Day shift, I want a Command's details on another machine (child Ticket runs, stages, waterfall, Command log, Session traces) to open in my Console, so that I don't switch tabs.
- As the Day shift, I want those details fetched live when I open them and never stored on my machine, so that each host keeps its own logs (Convert both hosts' Session logs and check the reports #994).
- As the Day shift, I want a Security run's details from another machine to open too when my token there has
security, so that I can do from one Console everything that machine's own Console offers. - As the Day shift, I want a Security run's details shown as "needs the
securityscope on<machine>" when my token lacks it, so that I know why. - As the Day shift, I want each remote row to link to its owning Console too, so that I can still go there.
- As the Day shift, I want to Stop a live Command on any fleet machine from my Console, with the usual confirm step, so that I control the Fleet from one place.
- As the Day shift, I want to make a Dismissal, and Undo one, on any fleet machine's row, so that Needs you and Ready for review clear across the Fleet.
- As the Day shift, I want a remote Stop or Dismissal to report the owning machine's answer, refusals included, so that I know what happened there.
- As the Day shift, I want Stop and Dismiss controls shown on a remote row only when that machine would allow them (my token's scopes intersected with my own scopes there), so that I'm never offered what will be refused.
- As the Day shift, I want another account's Commands on a fleet machine shown read-only, tagged with machine and account, so that Console: opt-in setting to show other local accounts' Commands (read-only) #1446's boundary holds across the Fleet.
- As the owner of a fleet machine, I want a Stop or Dismissal from another Console carried out by my own thirdshift, so that no other machine signals my processes or writes my logs.
- As the owner of a fleet machine, I want my Activity log to say "by
<person>from the Console on<machine>" for those actions, so that I know who did what from where. - As the owner of a fleet machine, I want a person not on my own Console sign-in list refused even through another Console, so that my list keeps meaning what it says.
- As the Day shift, I want to pair a machine with
thirdshift console fleet add <name> <address>, which asks for the token on standard input, so that the token stays out of shell history and the process list. - As the Day shift, I want
fleet addto check the token against that machine'swhoamibefore saving it, so that a typo or a wrong scope shows up at once. - As the Day shift, I want
fleet addto save the entry to the User config and the token to the Credentials, so that the token never sits in the User config. - As the Day shift, I want
thirdshift console fleet list [--json]to show each machine with its address, scopes, thirdshift version and last contact, so that I can see the Fleet's health from a terminal. - As the Day shift, I want
thirdshift console fleet remove <name>to drop the entry and its token, so that unpairing is one command. - As the Day shift, I want one fleet list under
[console]to replaceother_consoles, so that I keep one list of Consoles, not two. - As the Day shift, I want my existing
other_consolesaddresses read as link-only fleet entries, so that nothing I set before is lost. - As the Day shift, I want a fleet entry without a token to stay a header link to its Console, so that I can list a machine I can't pair.
- As the Day shift, I want
setupto write the fleet list out with the other[console]settings, so that the User config shows it. - As the Day shift, I want
thirdshift statusto show the Fleet the way the Console does, so that the CLI keeps pace with the page. - As the Day shift, I want
thirdshift status --jsonto carry each Command's machine and each machine's freshness and reachability, so that scripts can tell live from stale. - As the Day shift, I want
--machine <name>onstatus,stop,dismissand the details commands, so that I can see and act on one machine from any terminal. - As the Day shift, I want
--machinewith my own machine's name to behave exactly like leaving it out, so that scripts can name every machine the same way. - As the Day shift, I want a CLI action through
--machineattributed to my token's holder on the owning machine, so that terminal actions are traceable too. - As the Day shift, I want
statusto finish promptly when a fleet machine is slow, with a short timeout for each machine, so that one machine can't hang my terminal. - As the Day shift on a phone, I want the merged Inbox to stay readable at phone width, so that the Fleet works where I check it most.
- As an agent working in this repository, I want tests that run two real Consoles side by side, so that the Fleet is tested the way it's used.
Implementation Decisions
- Built on Spec: the Console API, /api/v1 behind scoped tokens #1753. Every remote read and action is a call to the owning machine's
/api/v1with that machine's token. No new endpoints are needed beyond Spec: the Console API, /api/v1 behind scoped tokens #1753's. The owning machine enforces scopes, the person check and auditing, so the calling Console only displays and forwards. - The fleet list.
[console]gains a list of entries, each a name and an address, replacingother_consoles. On reading the User config, anyother_consolesaddresses become link-only entries named after their host. Writing the config writes the new list and dropsother_consoles. An entry is live when the Credentials hold a token for its name, and link-only otherwise. - Holder-side tokens. The Credentials gain a table of fleet tokens keyed by entry name, in the same owner-only file. Nothing else in thirdshift reads them.
- Pairing CLI.
console fleet add <name> <address>reads the token from standard input (with no echo on a terminal), callswhoamito check it and records the machine's hostname and version, then saves.fleet list [--json]andfleet remove <name>round it out. None of these is ever an API endpoint. - Fetching. Inside the Console, an async poller fetches each live entry's Inbox every 15 seconds, only while at least one page subscription is open (the existing live-subscription machinery knows this). It keeps each machine's last good answer in memory with its time, plus its last error. It never writes remote data to disk. A machine is unreachable after 60 seconds without a good answer. A 404 or an older API version on
whoamimeans "needs an update", and a 401 or 403 means "refused". - Merging. The merged Inbox is the local Inbox plus each machine's rows, each row carrying its machine (the hostname from
whoami, whichstatus --jsonalready carries per Command). Groups, order and counts follow the existing Inbox rules, with remote rows grouped by the owning machine's own judgement as returned. The tab title count and notifications include remote Needs you rows. The active-run count is the Fleet's total, with a per-machine breakdown. - Details. Opening a remote Command fetches its details on demand from the owning machine and renders them with the local templates. Nothing is cached beyond the request. A refused
securitycall renders the scope message. - Actions. A remote Stop, Dismissal or Undo POSTs to the owning machine with the signed-in person named in the request header Spec: the Console API, /api/v1 behind scoped tokens #1753 defines, and shows the answer. Controls on remote rows come from the effective scopes
whoamireports for that person on that machine, fetched with the Inbox. - Filter. A
machinequery parameter filters the Inbox, and its absence means every machine. - CLI.
statusfetches each live entry with the blocking client, using a short per-machine timeout, and merges as the Console does.--machine <name>scopesstatus,stop,dismissand the details commands to one machine, calling its API without naming a person.status --jsoncarries each Command's machine and a per-machine section with freshness, reachability and error, and its version number goes up. - Header links. Header links to other Consoles come from the fleet list (live and link-only entries alike), replacing
other_consoles. - Docs.
docs/guide.mdgets a "Fleet" section (pairing, the list, freshness,--machine, troubleshooting a refused or old machine). The hand-written site pages (site/index.html,site/how-it-works/,site/architecture/) say a Console can show its Fleet wherever they describe the Console as one machine's page.
Testing Decisions
-
Good tests exercise external behaviour: real binaries, fixture Command records, HTTP and the CLI. Nothing reaches into the poller or the merge.
-
The one seam: two Consoles over HTTP (
tests/console.rs, a new fleet module). Start two Console binaries on 127.0.0.1, each with its own fake home and fixture records. Issue a token on one with its CLI and pair it on the other withfleet addfed through standard input. Then assert:- the merged Inbox and
status --json, with machine tags, the tab title count and per-machine freshness; - remote details rendering, and the
securityrefusal message; - a remote Stop and Dismissal carried out by the owning Console, with its Activity log line naming the person and the machine, and nothing written into the calling machine's logs;
- controls hidden when scopes don't allow them;
- stopping the owning Console showing "unreachable" with greyed rows, and a refused token showing "refused";
- the
machinefilter; --machineon the CLI;other_consolesmigrating to link-only entries;- no remote data on the caller's disk.
Prior art:
tests/console/other_accounts.rs(several fake homes on one machine),stop.rsanddismiss.rs. - the merged Inbox and
-
"Too old" is tested with a stand-in server that answers
whoamiwith 404, kept inside the test. -
The fetch interval is made configurable for tests only, as other Console timings are, so tests don't wait 15 seconds.
-
Site browser tests cover the merged Inbox at phone width.
Out of Scope
- Starting Commands and admin actions on fleet machines (
runandadmin). That's Spec C, which adds them to this Fleet view. - Discovering machines from GitHub (Claims, Pickup reservations). The list is explicit (Spec: the Fleet in the Console #1142 Q1.2).
- Streaming remote changes. Polling every 15 seconds is the agreed first step (Q2.7).
- Aggregating Run metrics, Scores, Experiments and Bug origins across the Fleet. Those pages stay per machine, reachable on each machine's own Console or API. A follow-up can decide this.
- Pairing the real machines. That happens after this Spec is released, with
fleet add. - Changing what another account's Commands allow (Console: opt-in setting to show other local accounts' Commands (read-only) #1446 stays as it is).
Further Notes
- Governing decisions: ADR 0026, ADR 0016 as amended, and the glossary's Fleet, Console and Console account.
- After release: pair
thirdshift, stephens and the ETA servers withfleet add, issuing each token on the owning machine with the scopes that suit it (for exampleread,actfor a machine shared with others, or all five for your own).
Activity
[-]See every machine's Commands from one Console[/-][+]See every machine's Commands from one Console - from multiple hosts for example[/+]JacobStephens2 commentedon Nov 4, 2026
Grilling started (round 1 open)
The grilling for this issue has started. Its rounds go in
docs/grill-with-docs/1142-every-machine-one-console.mdon theconnect-other-consolesbranch, which isn't pushed yet. This comment holds the state until it is.Related, already shipped: #1446 (v0.17.3) shows readable Other-account Commands on the same machine. This issue covers the cross-machine half that #1446 left out of scope.
Round 1 questions and recommendations (unanswered):
ssh <machine> thirdshift status --json) was considered and set aside: it would give a long-running web process a full shell on every other machine. Links only (other_consoles) stays as the fallback for an unreachable machine.Facts checked (2026-10-28):
thirdshift status --jsonalready gives each Command'shostname, kind, issue, stages and outcome.session_logpaths. Those would be left out of a summary served to another machine, in keeping with ADR 0015.Host:. Claims don't name a host.Next round (after round 1 is answered): how tokens are issued and stored, where the machine list lives, how often to fetch, how a machine that's down or out of date shows, and a glossary term for another machine's Command.
Grill #1142: technology for the API, and correct the sign-in rate-lim…
Merge pull request #1752 from JacobStephens2/connect-other-consoles
[-]See every machine's Commands from one Console - from multiple hosts for example[/-][+]Spec: the Fleet in the Console[/+]