Skip to content

feat: make status and dashboard top-level verbs - #227

Draft
outofcoffee wants to merge 3 commits into
mainfrom
read-verbs-top-level
Draft

outofcoffee wants to merge 3 commits into
mainfrom
read-verbs-top-level

Conversation

@outofcoffee

@outofcoffee outofcoffee commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Collapses the two read verbs that need nothing new into top-level commands serving every target kind. First of two — metrics and logs follow separately. Part of #155.

Summary

  • spinloop status and spinloop dashboard become top-level commands, taking their target the way the fleet commands do: --env <name>, --fleet <path>, or the working directory's fleet.yaml. A single environment renders as a one-row table and opens as a board of one panel, with no fleet file needed.
  • BREAKING fleet status and fleet dashboard are removed; each fails naming its replacement.
  • BREAKING With no target resolvable, the verbs fail rather than looking for an engine on this machine. The failure now names all three ways to give a target — it offered only --fleet and creating a file, though --env has been valid since it landed.
  • New docs/commands/status.md and dashboard.md; every doc, example and CI script updated.

Implementation details

remote status is not removed here, which is a change from this PR's original scope. Implementing it showed the command does three things a fan-out cannot: it makes a second control call for the version (statusFromRemote deliberately sets none — the version is in the stats reply), it applies a Spinloop's ENV instructions before resolving, and it renders the endpoint's address and retention deadline. remote metrics does the same three, so the design for carrying them belongs with the change that moves metrics and logs — solving it once for all of them beats solving it twice. Until then the two spellings coexist, as --env and --fleet did through the change that introduced them.

Health needed no work. statusFromRemote already maps a cloud endpoint's health onto Ready, and servingText already renders ReadyNo as (not ready) — so an unhealthy environment reads exactly like a daemon whose engine hasn't answered its health check. That mapping arrived with the gateway's wake-a-deployed-node work; an earlier draft of this change proposed a Healther capability and a fleet-owned status type, both of which turned out to be solving a problem that no longer existed.

Two facts are deliberately not columns — an endpoint's address and its retention deadline. Each is filled by only one node kind, and a table read one row per node shouldn't grow a column that is usually blank. The address is remote env, the deadline is fleet metrics and the dashboard.

Depends on #229. That change made every environment resolve by name, which deleted the DefaultEnvironment special-casing this branch had been carrying in ForEnvironment and NewNode.

Coverage 90.5%, unchanged.

@outofcoffee outofcoffee added enhancement New feature or request refactor labels Sep 14, 2026
Reading an engine's state is one operation the CLI spells twice: fleet status
and remote status answer the same question about the same kind of thing, and
since --env landed both work on the same environment and print differently.
The renderers converged long ago; the commands above them did not.

Proposes status and dashboard as top-level verbs over the existing target
resolver, deleting the three spellings they replace and signposting each. The
two facts only the cloud path rendered — the endpoint's health and address —
ride on the node result rather than becoming a capability, since both are
already in the reply the node receives.

metrics and logs follow in their own change: they carry cloud-only flags with
no daemon counterpart and need node capabilities to survive the move, which
deserves its own review.
Reading an engine's state is one operation the CLI spelled twice. fleet status
and remote status answer the same question about the same kind of thing, and
since --env landed both worked on the same environment and printed
differently. The renderers converged long ago — status_render.go exists
because someone noticed — but the commands above them did not.

status and dashboard now take their target the way every command that acts on
a fleet does: --env, --fleet, or the working directory's fleet.yaml. A single
environment renders as a one-row table and opens as a board of one panel, with
no fleet file needed. fleet status and fleet dashboard are removed, each
naming its replacement.

With no target resolvable the verbs fail rather than looking for an engine on
this machine, and the failure now names all three ways to give one — it
offered only --fleet and creating a file, though --env has been a target since
it landed.

remote status stays. It makes a second control call for the version, applies a
Spinloop's ENV before resolving, and renders the endpoint's address and keep
deadline: three things a fan-out does not do. remote metrics does the same
three, so the design for carrying them belongs with the change that moves
metrics and logs — once, for all of them.
The two run-tests.sh scripts call a fleet() shell helper that prefixes
`spinloop fleet`, so `fleet status` was a function call, not a command line.
Moving status to the top level rewrote those call sites to a bare `status`,
which is no function at all — the fleet-docker suite failed on it.

Each script gains a status() wrapper beside fleet(), so the call sites read
the same and reach the command that replaced the subcommand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant