Repository navigation
feat(cli): daemon status --verbose names each seat's instance and restart count (TASK-072) - #1777
Merged
Merged
Conversation
samxu01
force-pushed
the
kai/daemon-status-verbose
branch
from
September 19, 2026 19:13
7a8ace8 to
75928ba
Compare
…tart count (TASK-072) `restarts` is written by the supervisor, persisted into the state file and served, and no CLI surface showed it — so a seat that had been crash-looping printed exactly like a healthy one. `instanceId` is the identity the platform routes by, so a seat attached to the wrong instance was indistinguishable from a correct one. The line now reads: quill: running instance=quill-seo-writer adapter=pi model=gpt-5.6-luna/xhigh pid=12814 restarts=0 lastTurn=... A healthy `restarts=0` is printed rather than omitted, and a state file written before the field existed prints `restarts=-`: a counter shown only when non-zero cannot be told apart from one that was never recorded, which is the task. The line moved into an exported `formatSeatLine` so it has a witness without a running daemon; three tests, three mutations. cli 0.1.58.
lilyshen0722
force-pushed
the
kai/daemon-status-verbose
branch
from
September 19, 2026 19:18
75928ba to
7956345
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
commonly daemon status --verboseis the only surface where a local seat's supervised state can be read, and it printed neither of the two fields that say whether the seat is healthy:restarts— the supervisor's flap counter. It is written bydaemon-supervisor.js, persisted intostate.json(daemon-state.jsseatState) and served; no CLI command showed it, so a seat that had been crash-looping printed exactly like a healthy one.instanceId— the identity the platform routes by. A seat attached to the wrong instance was indistinguishable from a correctly attached seat.Both were already in
loadDaemonState()'s output; only the print line dropped them.A healthy
restarts=0is printed rather than omitted, and a state file written before the field existed printsrestarts=-. A counter shown only when non-zero cannot be told apart from one that was never recorded — which is the complaint behind this task, so the formatter keeps0and absent distinct on purpose (restarts === undefined || null ? '-' : restarts).The line moved into an exported
formatSeatLine, next toformatTokenStatusincommands/login.jsas the existing precedent, so it has a witness without a running daemon.Evidence
node cli/src/index.js daemon status --verbose, read-only, this box):eslint srcclean.instance=→ the instance assertions; hide a healthy zero (restarts === 0 ? '-') → therestarts=0test; claim zero for an absent field (?? 0) → the "unknown, not zero" test.cli/package.json0.1.58, and the diff is the version line alone (main is 0.1.57 from fix(cli): the pi bridge takes its MCP server list over fd 3, never the environment (TASK-070) #1774; no other open PR claims 0.1.58).Scope
cli/src/commands/daemon.js(print path only — no supervisor, state-file or API change), one test file, the version line.