feat: make status and dashboard top-level verbs - #227
Draft
outofcoffee wants to merge 3 commits into
Draft
outofcoffee wants to merge 3 commits into
outofcoffee wants to merge 3 commits into
Conversation
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.
outofcoffee
force-pushed
the
read-verbs-top-level
branch
from
September 15, 2026 00:53
43bf466 to
25abcd5
Compare
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.
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.
Collapses the two read verbs that need nothing new into top-level commands serving every target kind. First of two —
metricsandlogsfollow separately. Part of #155.Summary
spinloop statusandspinloop dashboardbecome top-level commands, taking their target the way the fleet commands do:--env <name>,--fleet <path>, or the working directory'sfleet.yaml. A single environment renders as a one-row table and opens as a board of one panel, with no fleet file needed.fleet statusandfleet dashboardare removed; each fails naming its replacement.--fleetand creating a file, though--envhas been valid since it landed.docs/commands/status.mdanddashboard.md; every doc, example and CI script updated.Implementation details
remote statusis 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 (statusFromRemotedeliberately sets none — the version is in the stats reply), it applies a Spinloop'sENVinstructions before resolving, and it renders the endpoint's address and retention deadline.remote metricsdoes the same three, so the design for carrying them belongs with the change that movesmetricsandlogs— solving it once for all of them beats solving it twice. Until then the two spellings coexist, as--envand--fleetdid through the change that introduced them.Health needed no work.
statusFromRemotealready maps a cloud endpoint's health ontoReady, andservingTextalready rendersReadyNoas(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 aHealthercapability 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 isfleet metricsand the dashboard.Depends on #229. That change made every environment resolve by name, which deleted the
DefaultEnvironmentspecial-casing this branch had been carrying inForEnvironmentandNewNode.Coverage 90.5%, unchanged.