carlos / platform Public

cli: box and host words in the registry

ops becomes a subtree: internal/ops exports Commands (litestream,
restore-verify, hibernate-verify) and Fallback (Run's help and
unknown-verb arms, verbatim); ops.Run stays as a wrapper. ops host has a
When on CARLOS_HOST_CLAIM (hostClaimEnabled), its child resolve
re-prepends its word for parseHostResolve; its fallback is that parser's
usage. vet, edge, agent, adopt, bootstrap, add, remove, status, update
and instance-* stay leaves (no word dispatch). Corpus re-recorded from
7f4bdf3a: 27 lines added, none changed; replay clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 60ec807c01826694d8bb78210ad2fb61c60b5e16 parent 8a9c246
6 files changed, +86 −18
  • clireg_golden_test.go +5 −0
  • commands.go +1 −1
  • hostclaim_cli.go +27 −8
  • internal/ops/ops.go +22 −8
  • parity/cli.tsv +4 −1
  • testdata/clireg-golden.jsonl +27 −0

CI failed — run details

Intent

Human

<task-notification> <task-id>a28fd22fa1276f6f9</task-id> <tool-use-id>toolu_01Mxm9Jg5BMKbKTDQcieJnuf</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/a28fd22fa1276f6f9.output</output-file> <status>completed</status> <summary>Agent "Implement Task 5 release/runtime words" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Task 5 is done in one commit, **8a9c2461** `cli: release, instances and runtime words in the registry`, on branch `cli-registry-words`. The usual packed-refs.lock error printed, but `git log -1` shows the commit landed and the tree is clean. All 21 dispatchers are converted; the corpus replays against the branch with zero differences. **Nodes per dispatcher.** "All three" means the default runs on absent, flag and unknown word. A fallback is the old `default:` arm moved verbatim unless noted. - **instances**: unnamed default = the box listing (`runInstancesBoxList`, box-local), all three, so no fallback. Children: enable, create, list, delete, set, update, set-upstreams (operator), set-channel, set-environment, set-assets, set-pages, retry, plus: - `instances import`: commit and abort call `runInstancesImportVerb(word, …)`; unnamed default = the import itself, all three. - `instances door-key`: create, list, revoke; fallback `log.Fatal(doorKeyUsage)`. `runInstancesDoorKey` stays as a one-line wrapper for its tests. - **sidecars**: fallback is `log.Fatal(usage)` bare, otherwise the "unknown subcommand" message, exit 1. - **schedule**: fallback `log.Fatal(scheduleUsage)`. - **db**: pull, query. Fallback: bare prints usage to stderr, exit 2; `-h`, `--help`, `help` print to stdout, exit 0; unknown verb exit 2. `runDB` stays as a wrapper. - **devbox** (whole-function): serve (box-local), share, unshare, list each re-prepend their word and call `runDevbox`. The fallback also calls `runDevbox(args)`, so `run`'s help words and exit-code table are unchanged. - **canary**: deploy; ls (alias list); rm (alias delete). `Default: "deploy"`, all three. `runCanary` is deleted because nothing calls it. - **channels**: unnamed default = list, all three. resign and digests (operator) are NoUpdateHint children. digests is a raw leaf and its parser is unchanged. - **releases**: unnamed default = list, all three. retention and authorize (operator) are NoUpdateHint children. - **pipeline**: `Default: "show"`, all three. In the old code every case that matched no word reached show. `runPipeline` stays as a wrapper. - **version**: Task 2's node checked; no change needed. - **skills**: stays a leaf. - **move** (whole-function): status, cut, abort, resolve, and `offline` with eight children, each re-prepending its words and calling `runMove`. The offline fallback calls `runMove("offline", args…)`, which gives the usage text on stdout and exit 2. Unnamed default = request (`runMove(args)`), all three. - `offlineVerbs` is deleted. `parseMoveArgs` and `move_test.go` now read `moveOfflineVerbs()`, which returns the offline node's children. `moveMain` and `parseMoveArgs` keep their signatures. - **economics** (operator): bill, backhaul; fallback usage on stderr, exit 2. - **proof** (box-local): history, keygen, get, put. The three old inline cases are now `runProofKeygen`, `runProofGet` and `runProofPut`. Fallback `log.Fatal(proofUsage)`. - **email**: enable, status, test, rotate; pause and resume (operator) share `runEmailPause` with a bool; plus: - `email domains`: add, rm (alias remove). - `email credentials`: create, list, revoke. - `email events`: push, with an unnamed default = the listing, all three. - Every level's fallback is `emailUsage`, exit 1. - **store**: create, status, rotate, apply; grant, approvals, approve, decline (operator); `store scan` with request, status, enforce (one raw leaf) and grant, revoke, sweep, rotate-webhook-key (closures over `runStoreScanSimple`). Fallbacks are each usage text, exit 1. - **relay**: enable, status, disable, adopted, rotate (operator); serve and keygen (box-local, `Golden.Skip`: serve starts a server and keygen mints a key, and neither reads its arguments). Fallback: bare or unknown exits 2 on stderr; help words print to stdout, exit 0. - **services** and **fleets**: `RunServices` and `RunFleets` stay as wrappers. `fleets boxes` has one child, add; its fallback is the old `log.Fatal` usage line. - **ledger**: six leaves; fallback usage, exit 1. `RunLedger` is deleted because nothing calls it. - **billing** (whole-function, operator): problems, close, house re-prepend their word and call `runBillingWithSession`, so `--console` is still registered before the verb. `OnError` is `billingError`, the mapping moved out of `runBilling`: `ErrHelp` returns, anything else is `log.Fatalf`. The fallback calls `runBillingWithSession` and passes the result to `billingError`. `runBilling` is deleted. **Other changes** - `subVerbSkipsHint` is deleted, from `commands.go` and the check in `main.go`. - `TestUpdateHintSkippedPerPath` now covers the four channels/releases paths, plus two cases that must still get the hint (`channels zz`, `releases --app x`). - `TestCanaryIsDispatchedNotStubbed` now requires `Default` "deploy" on all three cases and a runnable deploy leaf. - The nine explicit cases you listed are added to `goldenExtras`. - `make parity-doc` regenerated `parity/cli.tsv` (+123/−16). **Corpus**: 333 lines before, 710 after. `git diff --numstat` shows 377 added and 0 removed, so no existing line changed. Recording raised no nondeterminism or timeout errors, and the two relay skips are recorded as skipped cases. I read the new lines, including `instances foo`, `canary ./site`, `move --host h status`, `move offline zz` and `version foo`. **Tests**: all pass. - The named set (`TestCommandTree|TestCLIProjection|TestTopLevelWords|TestUpdateHint|TestCanary|TestGoldenCases`) and `TestCLIGolden` replay. - 670 test functions from the converted files' test files, plus `Ledger|Releases|Channels|TestInstances` from `cli_test.go`. - `./internal/parity`, `./internal/docsite`, `./internal/clireg`. - `go vet .`, gofmt, `go build ./...`, and darwin and windows builds of the root package. - The census tests in internal/provision still reference `runInstances`; you expected them to fail until Task 9. **Decisions the plan didn't settle** 1. **`proof history` is still one raw leaf** (`proof_cli.go`, `proofCommand`). `historyCommandWithSave` (`history_cli.go:47-54`) checks its verb (status|reconstruct|retire|resume) and its flags together, names the flag set after it, and `history_cli_test.go` calls it with the verb inside `args`. Splitting it would mean either a fourth whole-function exception or changing its order of checks. The audit treats the verb as an enum positional, but the spec's raw-leaf list (B6) doesn't name `proof history`, so it needs a ruling for the args step. 2. **Whole-function fallbacks call the old function** rather than copying its default arm: devbox (`runDevbox(args)`), billing (`runBillingWithSession`) and `move offline` (`runMove`). The output is identical, as the corpus shows. 3. **Audiences follow the parity table's status, and qualified rows count as customer**: `instances create [--addr]`, `instances set [--size]` and `move resolve [--declare-lost]`. Bare `instances` is box-local (the `box-routes` row). 4. **One commit instead of one per group.** `commands.go`, the corpus and `cli.tsv` are shared, and each split would have needed its own re-record. Leftover `/var/tmp/carlos-test-*` directories exist, but my runs finished cleanly, so I left them alone; they may belong to other sessions. My `$TMPDIR` scratch is removed.</result> <usage><subagent_tokens>192847</subagent_tokens><tool_uses>72</tool_uses><duration_ms>1052772</duration_ms></usage> </task-notification>

Attributed to this commit: 6.37 g CO₂e (730,373 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on cli-registry-words, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/clireg_golden_test.go b/clireg_golden_test.go
index f9ae5fa82..effd28bed 100644
--- a/clireg_golden_test.go
+++ b/clireg_golden_test.go
@@ -72,6 +72,11 @@ var goldenExtras = []goldenExtra{
{Argv: []string{"move", "--host", "h", "status"}},
{Argv: []string{"move", "offline", "zz"}},
{Argv: []string{"version", "foo"}},
+ // Task 6: ops host exists only with CARLOS_HOST_CLAIM set; without it
+ // the word reaches ops's unknown-verb fallback.
+ {Argv: []string{"ops", "host", "resolve", "-h"}, Env: map[string]string{"CARLOS_HOST_CLAIM": "1"}, Note: "host claim on"},
+ {Argv: []string{"ops", "host", "resolve", "-h"}, Note: "host claim off"},
+ {Argv: []string{"ops", "zz"}},
}
// goldenExtraCases turns goldenExtras into cases.
diff --git a/commands.go b/commands.go
index 090ba4633..db9eb7b0f 100644
--- a/commands.go
+++ b/commands.go
@@ -149,7 +149,7 @@ func buildCommandRoot() *clireg.Node {
secretsCommand(),
noHint(raw("release-keygen", box, runKeygen)),
proofCommand(),
- noHint(raw("ops", op, runOps)),
+ opsCommand(),
noHint(raw("system", op, runSystem)),
moveCommand(),
noHint(raw("status", op, RunStatus)),
diff --git a/hostclaim_cli.go b/hostclaim_cli.go
index 07f9fcb9b..8189bd7c7 100644
--- a/hostclaim_cli.go
+++ b/hostclaim_cli.go
@@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"github.com/carlosframework/platform/internal/awsinv"
+ "github.com/carlosframework/platform/internal/clireg"
"github.com/carlosframework/platform/internal/hostfence"
"github.com/carlosframework/platform/internal/hostresolve"
"io"
@@ -29,15 +30,33 @@ type hostResolveOptions struct {
Console string
}
-// runOps leaves the existing box-side ops surface byte-for-byte alone while
-// the claim feature is off. The remote host family only exists behind the
-// explicit deployment flag.
-func runOps(args []string) {
- if hostClaimEnabled(os.Getenv("CARLOS_HOST_CLAIM")) && len(args) > 0 && args[0] == "host" {
- runOpsHost(args[1:])
- return
+// opsCommand is `carlos ops`: internal/ops's box-side verbs, and the
+// remote host family, which exists only behind the explicit deployment flag
+// (`ops host` with CARLOS_HOST_CLAIM unset reaches ops's fallback, "unknown
+// verb", as before). The box-side surface is byte-for-byte unchanged while
+// the claim feature is off.
+func opsCommand() *clireg.Node {
+ host := &clireg.Node{
+ Name: "host",
+ Audience: clireg.Operator,
+ When: func() bool { return hostClaimEnabled(os.Getenv("CARLOS_HOST_CLAIM")) },
+ Children: []*clireg.Node{{
+ Name: "resolve",
+ Audience: clireg.Operator,
+ // parseHostResolve still reads its own verb word; the
+ // walk has already chosen it.
+ Run: clireg.RawArgs(func(args []string) { runOpsHost(append([]string{"resolve"}, args...)) }),
+ }},
+ // Any word but resolve, or none: parseHostResolve's usage, exit 1.
+ Fallback: func(args, consumed []string) { runOpsHost(args) },
+ }
+ return &clireg.Node{
+ Name: "ops",
+ Audience: clireg.Operator,
+ NoUpdateHint: true,
+ Children: append([]*clireg.Node{host}, boxops.Commands()...),
+ Fallback: boxops.Fallback,
}
- boxops.Run(args)
}
func parseHostResolve(args []string) (hostResolveOptions, error) {
diff --git a/internal/ops/ops.go b/internal/ops/ops.go
index bfcb904c7..0a7b3f23e 100644
--- a/internal/ops/ops.go
+++ b/internal/ops/ops.go
@@ -6,6 +6,7 @@ package ops
import (
"github.com/carlosframework/platform/internal/cliflag"
+ "github.com/carlosframework/platform/internal/clireg"
"context"
"errors"
@@ -28,20 +29,33 @@ const (
defaultDataDir = "/data"
)
-// Run dispatches `carlos ops <verb>`.
+// Run dispatches `carlos ops <verb>` from Commands and Fallback, the
+// words the command tree declares under `ops`.
func Run(args []string) {
+ clireg.Dispatch(&clireg.Node{Children: Commands(), Fallback: Fallback}, args)
+}
+
+// Commands are `carlos ops`'s verbs, as command-tree nodes: box-side
+// leaves, each handed its arguments unparsed.
+func Commands() []*clireg.Node {
+ leaf := func(name string, f func([]string)) *clireg.Node {
+ return &clireg.Node{Name: name, Audience: clireg.BoxLocal, Run: clireg.RawArgs(f)}
+ }
+ return []*clireg.Node{
+ leaf("litestream", runLitestream),
+ leaf("restore-verify", runRestoreVerify),
+ leaf("hibernate-verify", runHibernateVerify),
+ }
+}
+
+// Fallback is `carlos ops` with no verb, a help word, or a word that names
+// no verb: usage on stderr, exit 2 except for help (exit 0).
+func Fallback(args, consumed []string) {
verb := ""
if len(args) > 0 {
verb = args[0]
- args = args[1:]
}
switch verb {
- case "litestream":
- runLitestream(args)
- case "restore-verify":
- runRestoreVerify(args)
- case "hibernate-verify":
- runHibernateVerify(args)
case "", "-h", "--help", "help":
usage()
if verb == "" {
diff --git a/parity/cli.tsv b/parity/cli.tsv
index 375df3352..f5a8eb651 100644
--- a/parity/cli.tsv
+++ b/parity/cli.tsv
@@ -155,7 +155,10 @@ move offline start customer - - - - -
move offline status customer - - - - -
move resolve customer - - - - -
move status customer - - - - -
-ops operator - - - - -
+ops hibernate-verify box-local - - - - -
+ops host resolve operator - - - - -
+ops litestream box-local - - - - -
+ops restore-verify box-local - - - - -
pipeline add customer - - - - -
pipeline init customer - - - - -
pipeline remove customer - - - - -
diff --git a/testdata/clireg-golden.jsonl b/testdata/clireg-golden.jsonl
index 0cf20ecb2..dae7d9303 100644
--- a/testdata/clireg-golden.jsonl
+++ b/testdata/clireg-golden.jsonl
@@ -492,8 +492,35 @@
{"case":"move | bare","argv":["move"],"exit":2,"stdout":"carlos move needs --host <host>.\n","stderr":""}
{"case":"move | help","argv":["move","help"],"exit":2,"stdout":"carlos move needs --host <host>.\n","stderr":""}
{"case":"move | zz-unknown","argv":["move","zz-unknown"],"exit":2,"stdout":"carlos move needs --host <host>.\n","stderr":""}
+{"case":"ops hibernate-verify | --zz-unknown-flag","argv":["ops","hibernate-verify","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos ops hibernate-verify [flags]\nflags:\n --data <string> data directory (default $CARLOS_DATA_DIR or /data)\n --max <int> most replicas to restore in one run (0 = no cap) (default: 25)\n --registry <string> registry database (default <data>/registry.db)\n"}
+{"case":"ops hibernate-verify | -h","argv":["ops","hibernate-verify","-h"],"exit":0,"stdout":"","stderr":"usage: carlos ops hibernate-verify [flags]\nflags:\n --data <string> data directory (default $CARLOS_DATA_DIR or /data)\n --max <int> most replicas to restore in one run (0 = no cap) (default: 25)\n --registry <string> registry database (default <data>/registry.db)\n"}
+{"case":"ops host resolve -h | extra (host claim off)","argv":["ops","host","resolve","-h"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"host\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops host resolve -h | extra (host claim on)","argv":["ops","host","resolve","-h"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"unknown option \"-h\"\n"}
+{"case":"ops host resolve | --zz-unknown-flag","argv":["ops","host","resolve","--zz-unknown-flag"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"unknown option \"--zz-unknown-flag\"\n"}
+{"case":"ops host resolve | -h","argv":["ops","host","resolve","-h"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"unknown option \"-h\"\n"}
+{"case":"ops host | --help (when off)","argv":["ops","host","--help"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"host\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops host | --help (when on)","argv":["ops","host","--help"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"usage: carlos ops host resolve <host> --declare-lost <box> [--yes] [--console <url>]\n"}
+{"case":"ops host | --zz-unknown-flag (when off)","argv":["ops","host","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"host\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops host | --zz-unknown-flag (when on)","argv":["ops","host","--zz-unknown-flag"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"usage: carlos ops host resolve <host> --declare-lost <box> [--yes] [--console <url>]\n"}
+{"case":"ops host | -h (when off)","argv":["ops","host","-h"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"host\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops host | -h (when on)","argv":["ops","host","-h"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"usage: carlos ops host resolve <host> --declare-lost <box> [--yes] [--console <url>]\n"}
+{"case":"ops host | bare (when off)","argv":["ops","host"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"host\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops host | bare (when on)","argv":["ops","host"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"usage: carlos ops host resolve <host> --declare-lost <box> [--yes] [--console <url>]\n"}
+{"case":"ops host | help (when off)","argv":["ops","host","help"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"host\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops host | help (when on)","argv":["ops","host","help"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"usage: carlos ops host resolve <host> --declare-lost <box> [--yes] [--console <url>]\n"}
+{"case":"ops host | zz-unknown (when off)","argv":["ops","host","zz-unknown"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"host\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops host | zz-unknown (when on)","argv":["ops","host","zz-unknown"],"env":{"CARLOS_HOST_CLAIM":"1"},"exit":1,"stdout":"","stderr":"usage: carlos ops host resolve <host> --declare-lost <box> [--yes] [--console <url>]\n"}
+{"case":"ops litestream | --zz-unknown-flag","argv":["ops","litestream","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos ops litestream [flags]\nflags:\n --allow-shrink permit a config that replicates FEWER databases than the one it replaces\n --bucket <string> S3 bucket receiving the replicas (required)\n --data <string> data directory holding the fleet's *.db files (default $CARLOS_DATA_DIR or /data)\n --litestream-bin <string> litestream binary to check the snapshot policy against (pinned release 0.5.15) (default: litestream)\n --memory-dropin <string> systemd drop-in that sets the replicator's memory cap from the database count (default /etc/systemd/system/carlos-litestream.service.d/50-memory.conf when --out is /etc/litestream.yml; \"none\" leaves the unit's cap alone)\n --out <string> config file to write (default: /etc/litestream.yml)\n --prefix <string> key prefix inside the bucket for this fleet (required)\n --region <string> S3 region for the replica stanza\n --registry <string> registry database (default <data>/registry.db)\n"}
+{"case":"ops litestream | -h","argv":["ops","litestream","-h"],"exit":0,"stdout":"","stderr":"usage: carlos ops litestream [flags]\nflags:\n --allow-shrink permit a config that replicates FEWER databases than the one it replaces\n --bucket <string> S3 bucket receiving the replicas (required)\n --data <string> data directory holding the fleet's *.db files (default $CARLOS_DATA_DIR or /data)\n --litestream-bin <string> litestream binary to check the snapshot policy against (pinned release 0.5.15) (default: litestream)\n --memory-dropin <string> systemd drop-in that sets the replicator's memory cap from the database count (default /etc/systemd/system/carlos-litestream.service.d/50-memory.conf when --out is /etc/litestream.yml; \"none\" leaves the unit's cap alone)\n --out <string> config file to write (default: /etc/litestream.yml)\n --prefix <string> key prefix inside the bucket for this fleet (required)\n --region <string> S3 region for the replica stanza\n --registry <string> registry database (default <data>/registry.db)\n"}
+{"case":"ops restore-verify | --zz-unknown-flag","argv":["ops","restore-verify","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos ops restore-verify [flags]\nflags:\n --config <string> generated litestream config to read the database set from (default: /etc/litestream.yml)\n --litestream-bin <string> litestream binary (pinned release 0.5.15) (default: litestream)\n"}
+{"case":"ops restore-verify | -h","argv":["ops","restore-verify","-h"],"exit":0,"stdout":"","stderr":"usage: carlos ops restore-verify [flags]\nflags:\n --config <string> generated litestream config to read the database set from (default: /etc/litestream.yml)\n --litestream-bin <string> litestream binary (pinned release 0.5.15) (default: litestream)\n"}
+{"case":"ops zz | extra","argv":["ops","zz"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"zz\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops | --help","argv":["ops","--help"],"exit":0,"stdout":"","stderr":"carlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
{"case":"ops | --zz-unknown-flag","argv":["ops","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"--zz-unknown-flag\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
{"case":"ops | -h","argv":["ops","-h"],"exit":0,"stdout":"","stderr":"carlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops | bare","argv":["ops"],"exit":2,"stdout":"","stderr":"carlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops | help","argv":["ops","help"],"exit":0,"stdout":"","stderr":"carlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
+{"case":"ops | zz-unknown","argv":["ops","zz-unknown"],"exit":2,"stdout":"","stderr":"ops: unknown verb \"zz-unknown\"\n\ncarlos ops — box-side operations verbs\n\n carlos ops litestream (re)generate the fleet litestream config from the\n registry + data dir; prints \"changed\"/\"unchanged\"\n so the caller knows whether to restart replication\n carlos ops restore-verify restore every configured replica from S3 and\n integrity-check each (run by the daily timer)\n carlos ops hibernate-verify\n the same drill for the replicas the config does\n NOT name: hibernating instances, whose\n replication the activator owns under its lease.\n Publishes a per-host verdict to the deployment\n bucket so the result is readable off-box.\n\nNo verb for your task? Extend ops in a small PR — never a hand-run sequence\nreconstructed from docs.\n"}
{"case":"pipeline add | --zz-unknown-flag","argv":["pipeline","add","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos pipeline <command>\n\ncommands:\n show show an app's channels and any pending changes\n (this is also what a bare \"carlos pipeline\"\n runs)\n init --template edge-production|full-ladder\n replace the pipeline with a starter template\n set --channel <name> [--bake <dur>] [--passkey[=false]]\n [--promote-approvals N] [--change-approvals N]\n edit one existing channel's bake window or\n rules — flags not given are left as they were\n add --channel <name> [--after <name>] [--bake <dur>] [--passkey]\n [--promote-approvals N] [--change-approvals N]\n insert a new channel (default: appended at the\n end of the list; --after inserts right after\n that existing channel)\n remove --channel <name> drop a channel from the pipeline\n\nEvery command above also takes [--app <a>] [--account <sqid-or-name>]\n[--account-id <sqid>] [--console <origin>] — the same account/app resolution\nevery other API-mode verb uses (defaults apply when a flag is omitted and\nonly one candidate exists).\n\ncarlos pipeline works through a logged-in console (carlos auth login) —\nthere is no bucket-direct pipeline editor to fall back to; --bake, --passkey,\n--promote-approvals and --change-approvals set release.ChannelRules exactly as\nthe console's own pipeline settings page does. promote and rollback are\nunaffected in direct mode.\n\nset/add/remove all read the CURRENT channel list first and PUT the whole\nlist back — an edit that touches a channel the stored pipeline already\nguards with --change-approvals does not land from here: the console turns it\ninto a proposal instead (0 confirmations; finish with the printed console\nURL), exactly as it does for a guarded promote or rollback.\nflags:\n --account <string> account (sqid or name) the app belongs to (default: your only account, or the configured/chosen one; ops in direct mode)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account; this is the flag an ambiguity error tells you to use\n --after <string> insert immediately after this existing channel (default: append at the end)\n --app, -a <string> app name\n --bake <string> bake window before this channel is eligible to adopt (Go duration, e.g. 24h; \"\" clears it)\n --change-approvals <int> pipeline edits that touch this channel need this many console confirmations (0 clears the rule)\n --channel, -c <string> channel to add\n --console <string> console origin to work through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --passkey require a console passkey to promote into or edit this channel; --passkey=false clears it\n --promote-approvals <int> promotions into this channel need this many console confirmations (0 clears the rule)\n --registry <string> registry database (resolves --account) (default: $DIR/data/registry.db)\n"}
{"case":"pipeline add | -h","argv":["pipeline","add","-h"],"exit":0,"stdout":"","stderr":"usage: carlos pipeline <command>\n\ncommands:\n show show an app's channels and any pending changes\n (this is also what a bare \"carlos pipeline\"\n runs)\n init --template edge-production|full-ladder\n replace the pipeline with a starter template\n set --channel <name> [--bake <dur>] [--passkey[=false]]\n [--promote-approvals N] [--change-approvals N]\n edit one existing channel's bake window or\n rules — flags not given are left as they were\n add --channel <name> [--after <name>] [--bake <dur>] [--passkey]\n [--promote-approvals N] [--change-approvals N]\n insert a new channel (default: appended at the\n end of the list; --after inserts right after\n that existing channel)\n remove --channel <name> drop a channel from the pipeline\n\nEvery command above also takes [--app <a>] [--account <sqid-or-name>]\n[--account-id <sqid>] [--console <origin>] — the same account/app resolution\nevery other API-mode verb uses (defaults apply when a flag is omitted and\nonly one candidate exists).\n\ncarlos pipeline works through a logged-in console (carlos auth login) —\nthere is no bucket-direct pipeline editor to fall back to; --bake, --passkey,\n--promote-approvals and --change-approvals set release.ChannelRules exactly as\nthe console's own pipeline settings page does. promote and rollback are\nunaffected in direct mode.\n\nset/add/remove all read the CURRENT channel list first and PUT the whole\nlist back — an edit that touches a channel the stored pipeline already\nguards with --change-approvals does not land from here: the console turns it\ninto a proposal instead (0 confirmations; finish with the printed console\nURL), exactly as it does for a guarded promote or rollback.\nflags:\n --account <string> account (sqid or name) the app belongs to (default: your only account, or the configured/chosen one; ops in direct mode)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account; this is the flag an ambiguity error tells you to use\n --after <string> insert immediately after this existing channel (default: append at the end)\n --app, -a <string> app name\n --bake <string> bake window before this channel is eligible to adopt (Go duration, e.g. 24h; \"\" clears it)\n --change-approvals <int> pipeline edits that touch this channel need this many console confirmations (0 clears the rule)\n --channel, -c <string> channel to add\n --console <string> console origin to work through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --passkey require a console passkey to promote into or edit this channel; --passkey=false clears it\n --promote-approvals <int> promotions into this channel need this many console confirmations (0 clears the rule)\n --registry <string> registry database (resolves --account) (default: $DIR/data/registry.db)\n"}
{"case":"pipeline init | --zz-unknown-flag","argv":["pipeline","init","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos pipeline <command>\n\ncommands:\n show show an app's channels and any pending changes\n (this is also what a bare \"carlos pipeline\"\n runs)\n init --template edge-production|full-ladder\n replace the pipeline with a starter template\n set --channel <name> [--bake <dur>] [--passkey[=false]]\n [--promote-approvals N] [--change-approvals N]\n edit one existing channel's bake window or\n rules — flags not given are left as they were\n add --channel <name> [--after <name>] [--bake <dur>] [--passkey]\n [--promote-approvals N] [--change-approvals N]\n insert a new channel (default: appended at the\n end of the list; --after inserts right after\n that existing channel)\n remove --channel <name> drop a channel from the pipeline\n\nEvery command above also takes [--app <a>] [--account <sqid-or-name>]\n[--account-id <sqid>] [--console <origin>] — the same account/app resolution\nevery other API-mode verb uses (defaults apply when a flag is omitted and\nonly one candidate exists).\n\ncarlos pipeline works through a logged-in console (carlos auth login) —\nthere is no bucket-direct pipeline editor to fall back to; --bake, --passkey,\n--promote-approvals and --change-approvals set release.ChannelRules exactly as\nthe console's own pipeline settings page does. promote and rollback are\nunaffected in direct mode.\n\nset/add/remove all read the CURRENT channel list first and PUT the whole\nlist back — an edit that touches a channel the stored pipeline already\nguards with --change-approvals does not land from here: the console turns it\ninto a proposal instead (0 confirmations; finish with the printed console\nURL), exactly as it does for a guarded promote or rollback.\nflags:\n --account <string> account (sqid or name) the app belongs to (default: your only account, or the configured/chosen one; ops in direct mode)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account; this is the flag an ambiguity error tells you to use\n --app, -a <string> app name\n --console <string> console origin to work through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --registry <string> registry database (resolves --account) (default: $DIR/data/registry.db)\n --template <string> starter pipeline: edge-production | full-ladder\n"}