Repository navigation
Description
This was generated by AI during triage.
On a machine where more than one OS account runs thirdshift, the Console shows only the Commands of the account that serves it. On orchestrate.etadventures.com, the Console runs as jstephens and reads /home/jstephens/.thirdshift/logs, so a Command started by the conductor service account (or by another operator) never appears in the Inbox, including Needs you. To see it you have to run thirdshift status as that account. The glossary's Console entry ("shows every Command started on it") reads as machine-wide, but the implementation reads one UserConfig.logs_dir.
Jacob wants a User config setting that makes the Console, and thirdshift status to match, also show the Commands of the other accounts on the machine whose logs the serving account can read.
Agent Brief
Category: enhancement
Summary: Add an opt-in User config setting under [console] that adds other local accounts' Commands, read-only, to the Console and to status, limited to logs the serving account can read.
Current behavior:
UserConfig.logs_dir(default~/.thirdshift/logs) is the only source of Command records, Command logs and Activity for the Console's Inbox, waterfall, logs and peek views, and forthirdshift status.- Every row belongs implicitly to the serving account, and Stop and Dismissal act on it.
Desired behavior:
- The setting: a new key under
[console]in the User config, e.g.other_accounts = "readable"(default"none") or an explicit list of account names. Setup writes it, andthirdshift consoleCLI can set it, as with the other[console]settings ("the page does nothing the CLI can't"). - Finding the accounts:
- With
"readable", each local account's thirdshift logs directory is found from its home directory in the passwd database, plus its own User config'slogs_diroverride if that config is readable. - Any account whose logs directory the serving process can't read is silently skipped. The page never errors because of another account, and never asks for privilege.
- With a list, only the named accounts are considered, and an unreadable one is reported once in
status/doctoroutput, not on the page.
- With
- Display:
- Other accounts' Commands are merged into every Inbox section, Needs you included, and into the other views, each row showing its account, for example a small
conductortag. - The serving account's own rows are unchanged.
- The tab title's "‹n› need you" count includes them.
- Other accounts' Commands are merged into every Inbox section, Needs you included, and into the other views, each row showing its account, for example a small
- Read-only: Stop and Dismissal stay available only on the serving account's own Commands. Other accounts' rows show no Stop or Dismiss control, and the matching CLI commands refuse them with a message naming the owning account. No signal is sent to, and nothing is written into, another account's logs, Activity log or repositories.
thirdshift status: follows the same setting and tags other accounts' runs the same way.
Key interfaces:
ConsoleSettings(the[console]table): the new setting, with validation and rendering inUserConfigDocument.- The log-reading layer behind the Inbox and
status: it reads from a set of(account, logs_dir)sources instead of onelogs_dir, and each Command record carries its account. - Stop and Dismissal: refuse records whose account isn't the serving one.
- Glossary: a term for a Command of another account, and the Console entry updated to state the scope.
Acceptance criteria:
- With the setting off (the default), the Console and
statusoutput are unchanged. Existing tests pass. - With
"readable", a test with two fake homes, one readable and one not, shows only the readable account's Commands, tagged with its name, in the Inbox and instatus, and no error for the unreadable one. - A Needs you Command from another account appears under Needs you and counts in the tab title.
- Stop and Dismissal on another account's Command are refused, from both the Console and the CLI, and nothing in that account's logs directory is modified. A test asserts both.
- Setup and the
thirdshift consoleCLI can set and show the setting, and the docs describe it, including that the operator grants read access with filesystem permissions or ACLs.
Out of scope:
- Stopping or dismissing another account's Commands, or any privilege escalation (sudo, setuid, a helper service).
- Granting filesystem access. That's the machine owner's job, for example
setfaclon the other account's logs directory. - Showing other machines' Commands; the header already links to other Consoles.
Activity