Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/fleet/book/development/register-a-domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ When a domain is not `Available`, `fn stub(...)` in `main.rs` prints to stderr a
- `NotInBuild`: `fleet: this build does not include '<domain>'.` plus `This is the <build> build (<VERSION>).`, and ` The full build is 'fleet'.` when the build is not full.
- `NarrowedByName`: `fleet: invoked as '<invoked_as>', this build does not include '<domain>'.` plus the explanation that the invocation is name-scoped to the profile and that invoked as `fleet` it carries the full surface.
- `DisabledByConfig`: `fleet: '<domain>' is disabled by config on this host.` plus the instruction to re-enable the domain under `[domains]` in the named `fleet.toml` path.
- `Available` (the step-1 form, for a surface compiled in with nothing behind it): `fleet: '<domain>' is included in this build but not implemented yet.` plus the step-1 skeleton wording of epic #5412.
- `Available` (for a surface compiled in with nothing behind it): `fleet: '<domain>' is included in this build but not implemented yet.` plus the line naming the build and the not-implemented state.

Help renders the same states without stubbing: domain help is registry data and is always available, even where the domain is not. Help marks each domain `included in this build`, `not in this build — invoking it prints the capability stub (exit 69)`, `narrowed out by this invocation name — … (exit 69)`, or `disabled by config on this host (exit 69 if invoked)`, and top-level help closes with: "A domain this invocation cannot use answers with a stub and exit code 69."

Expand Down
10 changes: 3 additions & 7 deletions pkgs/fleet/book/getting-started/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,9 @@ reason:
set the domain to `false`; the stub names the config file to re-enable it
in. This is the per-host shaping / incident lever: one host's fleet can
have a domain switched off without a rebuild.
4. **Available but not implemented** — the step-1 skeleton form: "included in
this build but not implemented yet", with wording from the multicall
epic's first step. (The wording is stale step-1 text; the form remains in
the source. Where this book's research found help text claiming a domain
"lands in a later step" for a domain that is in fact fully implemented —
`gh` and `laptop-agent` are the two cases — the source behaviour is what
this book documents.)
4. **Available but not implemented** — "included in this build but not
implemented yet", with the stub's third line naming the build and the
not-implemented state.

Every stub's second line is `Enabled capabilities: <comma list>` (`none`
when empty), so a stub always tells you what the invocation _can_ do.
Expand Down
4 changes: 2 additions & 2 deletions pkgs/fleet/book/library/registry-and-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ Every stub goes to stderr and returns exit **69** (`EX_UNAVAILABLE`).
Its second line is always `Enabled capabilities: <comma list>` — the
_usable_ set: the effective set minus every capability of every
config-disabled domain — and its third line names the build. There is
also a step-1 skeleton form for a capability that is `Available` but has
also a not-implemented form for a capability that is `Available` but has
nothing behind it yet: "included in this build but not implemented
yet", in frozen epic-#5412 wording. Help renders the same four states
yet", with the build named on the third line. Help renders the same four states
inline (`[not in this build]`, `[narrowed out by this name]`,
`[disabled by config]`), and renders them on _every_ variant — help
never stubs.
Expand Down
2 changes: 0 additions & 2 deletions pkgs/fleet/book/reference/gh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

See also [The gh passthrough](../concepts/gh.md).

Known discrepancy: the domain help's status line still says "implementation lands in a later step of epic #5412". The source is a complete implementation (rotation, cache, close guard, closures, metadata stamping). This chapter documents the source.

## The passthrough (any other arguments)

```
Expand Down
2 changes: 1 addition & 1 deletion pkgs/fleet/book/reference/laptop-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

See also [fleet proxy](proxy.md) and [fleet shell](shell.md).

Known discrepancy: there is **no `--help` handling anywhere in this domain**. The shared USAGE text is printed only as part of error messages, and a `--help` argument is treated as data — `laptop-agent jobs --help` errors `unknown command "jobs"` (because `jobs` accepts no trailing arguments), `poll --help` actually polls a job named `--help` and prints its real `HTTP 404: no such job`, and `kill --help` prints nothing. This chapter is written from source. A second stale-help note: the domain status line still claims "implementation lands in a later step of epic #5412"; the source is a full client mirroring the Python daemon client verb for verb.
Known discrepancy: there is **no `--help` handling anywhere in this domain**. The shared USAGE text is printed only as part of error messages, and a `--help` argument is treated as data — `laptop-agent jobs --help` errors `unknown command "jobs"` (because `jobs` accepts no trailing arguments), `poll --help` actually polls a job named `--help` and prints its real `HTTP 404: no such job`, and `kill --help` prints nothing. This chapter is written from source.

## Shared behaviour (all verbs)

Expand Down
9 changes: 5 additions & 4 deletions pkgs/fleet/crates/fleet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,13 @@ fn stub(surface: &Surface, domain_name: &str, state: &CapState, invoked_as: &str
));
}
CapState::Available => {
// The step-1 form: compiled in, nothing behind it yet.
// Compiled in, nothing behind it yet: the not-implemented state.
out.push_str(&format!(
"fleet: '{domain_name}' is included in this build but not implemented yet.\n"
));
out.push_str(&format!("Enabled capabilities: {caps}.\n"));
out.push_str(&format!(
"This is the {build} build ({VERSION}) — the step-1 skeleton of epic #5412; \
the '{domain_name}' domain lands in a later step.\n"
"This is the {build} build ({VERSION}). '{domain_name}' is not implemented in this build.\n"
));
}
}
Expand Down Expand Up @@ -410,10 +409,12 @@ fn print_domain_help(surface: &Surface, d: &Domain) {
"bridge" => "included in this build (options: fleet bridge <command> --help)",
"agent" => "included in this build (options: fleet agent --help)",
"shell" => "included in this build (options: fleet shell --help)",
"gh" => "included in this build",
"laptop-agent" => "included in this build",
"serve" => {
"included in this build (queue-broker, secrets-broker, search and proxy roles)"
}
_ => "included in this build (implementation lands in a later step of epic #5412)",
_ => "included in this build",
},
CapState::NotInBuild => {
"not in this build — invoking it prints the capability stub (exit 69)"
Expand Down