grouproll: document test carries drain peers; golden help for --peers
The Go builder shim takes the peers list and the document test builds the drain through whichever builder is under test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
internal/grouproll/testdata/remotecommand/main.go+4 −1scripts/region_group_document_test.py+23 −6testdata/clireg-golden.jsonl+2 −2
Intent
<task-notification> <task-id>aaac076393ec2af43</task-id> <tool-use-id>toolu_012DQjcZbYpUDm1ZWcorYhA8</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/a99cbe46-f458-4f72-8b8a-294aae9cdf21/tasks/aaac076393ec2af43.output</output-file> <status>completed</status> <summary>Agent "Build held-floor-capability" 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>Both round-3 findings are fixed. A resumed transaction now refuses to drain from an old-format floor row, and the drain list comes only from a well-formed `live` array. Tests, mutations and census pass. Three new commits on `held-floor-capability`, on top of 63d90dc1; nothing pushed or amended. **Commits** - **50f62cbc** grouproll: drain list only from a marked, well-formed floor row - **ecd8ce64** docs: a legacy floor cannot be resumed into a drain (one sentence in §25.9) - **ef00e409** census: re-pin the grouproll envelope for the floor marker (seal b60c83f8) **Results** - Full `internal/grouproll` package: ok (519 s; another session's full suite was competing for CPU). `go vet`, `gofmt` and the darwin/windows cross-builds: ok. - Census card: only the `internal/grouproll` envelope moved; no root-read unit changed. `census-propose NAME=held-floor-capability` was rerun with the claims file unchanged, and the internal/provision census tests pass. - Mutations, each reverted: - Ignoring the marker (`if false && row["population"] != ...`) fails `TestDrainPeersRefuseALegacyFloor` and `TestDepartResumeOfALegacyFloorRefusesBeforeTheDrain`. - Accepting a missing `live` again fails `TestDrainPeersNeedAStrictLiveList`. **One gap in the legacy witness:** it does not run origin/main's `Floor` code. The current floor runs, and a hook on the journal write rewrites its row to the old tool's shape: the `population` key is removed and `live` is set to the age-filtered `[g-…0, g-…fe…0]`. That is the same row Astra reproduced, with adi's six-hour-old file left out. The process then dies right after the durable floor event and the new tool resumes. The resume refuses with `floor_legacy`. The journal has no drain session intent, and the floor row stays as written: not rewritten, migrated or re-run. **New operator strings, for copy review** (`internal/grouproll/text.go`) - `floor_legacy`: "This transaction's floor was recorded by an older tool that did not count every edges file, so it cannot be resumed into a drain. Do not resume it: end it with abandon, return, cancel-drain or close-lost, whichever applies" - `floor_population`: "This transaction's floor row has no valid list of the boxes it counted, so the drain cannot name them. Do not resume it: end it with abandon, return, cancel-drain or close-lost, whichever applies" The text-count test now expects 139 approved strings plus 6 not yet reviewed. **Spot-check: the two hunks** (diff 63d90dc1..50f62cbc) `internal/grouproll/floor.go` (constant at line 25, floor event at line 190): ```diff @@ -18,6 +18,12 @@ var ( defaultReleasePlatform = "linux-arm64" ) +// floorPopulation marks a floor row whose live list is this build's +// population: every edges file in the listing, whatever its age (Astra r3 +// F3.1). An older tool's row has no marker and kept only fresh files, so +// drainPeers never builds a drain list from it. +const floorPopulation = "all-files-v1" + @@ -181,7 +187,7 @@ func (e *Engine) Floor(ctx context.Context, kind, version string) (rule string, - if _, err := e.event("floor", map[string]any{"rule": rule, "reasons": reasons, "live": live, + if _, err := e.event("floor", map[string]any{"rule": rule, "reasons": reasons, "live": live, "population": floorPopulation, "ha_floor": haFloor, "releases": releases}); err != nil { ``` `internal/grouproll/depart.go`, `drainPeers` (lines 341-375): ```diff @@ -343,14 +343,27 @@ func (e *Engine) drainPeers() ([]string, error) { if !ok || row["rule"] != "drain" { return nil, refuse("record") } + // A row without this build's marker is an older tool's (Astra r3 + // F3.1): its live list skipped quiet boxes. It is never the population; + // the transaction is closed, not resumed into a drain. + if row["population"] != floorPopulation { + return nil, refuse("floor_legacy") + } + // live must be a present array of valid, distinct references (F3.2): + // missing evidence never means "no peers". + live, ok := row["live"].([]any) + if !ok { + return nil, refuse("floor_population") + } self, _ := e.hIdentity()["box_ref"].(string) - live, _ := row["live"].([]any) peers := []string{} + seen := map[string]bool{} for _, v := range live { s, ok := v.(string) - if !ok { - return nil, refuse("record") + if !ok || !boxRef.MatchString(s) || seen[s] { + return nil, refuse("floor_population") } + seen[s] = true if s != self { peers = append(peers, s) } ``` `boxRef` is the same grammar as the `--peers` validation: `^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$`. **Tests** (`internal/grouproll/depart_test.go`, lines 1204-1313: `drainPeersFrom` and `markedFloor` helpers plus three tests) - `TestDrainPeersNeedAStrictLiveList`: - Refused with `floor_population`: `live` absent, null, a string, a bool, an object or a number; an element with a space, a non-string element, a duplicate, and `-adi`. - Accepted as a non-nil empty list: `[]`, and a list holding only the member. - A marked row with `[adi, member, peer]` gives `[adi, peer]`. - `TestDrainPeersRefuseALegacyFloor`: a `population` key that is absent, `"fresh-files"` or `1` is refused with `floor_legacy`, whatever `live` holds. - `TestDepartResumeOfALegacyFloorRefusesBeforeTheDrain`: the legacy witness described above, with adi's file six hours old and capable. The existing tests, including `TestFloorMetDrains` and `TestDepartDrainNamesTheFloorPopulation`, still pass with the marked row. **Spec sentence added to §25.9:** "The floor row records this rule as `"population": "all-files-v1"`, and the drain list is built only from a row with that marker and a `live` array of valid, distinct references. A transaction whose floor predates the marker, written by an older tool that kept only fresh files, cannot be resumed into a drain: the tool refuses and the operator ends it with abandon, return, cancel-drain or close-lost." **Still open from earlier rounds:** - The new strings above need copy review. - `docs/region-ha-runbook.md` still needs your copy-reviewed edits. - The SSM operator document must be redeployed before this build's tool can drain.</result> <usage><subagent_tokens>466510</subagent_tokens><tool_uses>39</tool_uses><duration_ms>701039</duration_ms></usage> </task-notification>
<task-notification> <task-id>b9vkm5hrl</task-id> <tool-use-id>toolu_01SR8tkwKt1uRWAJ2a5t7KRE</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/a99cbe46-f458-4f72-8b8a-294aae9cdf21/tasks/b9vkm5hrl.output</output-file> <status>completed</status> <summary>Background command "Fable 5.2 spot-check (background)" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>btqqyj19d</task-id> <tool-use-id>toolu_019mS7ftMHWaNg7wd8Nu83aN</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/a99cbe46-f458-4f72-8b8a-294aae9cdf21/tasks/btqqyj19d.output</output-file> <status>completed</status> <summary>Background command "Wait for CI on ef00e409" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>b6batthnu</task-id> <tool-use-id>toolu_01KdJdrm9XoCTGiRJcBg5uwo</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/a99cbe46-f458-4f72-8b8a-294aae9cdf21/tasks/b6batthnu.output</output-file> <status>completed</status> <summary>Background command "Wait for the CI result" completed (exit code 0)</summary> </task-notification>
diff --git a/internal/grouproll/testdata/remotecommand/main.go b/internal/grouproll/testdata/remotecommand/main.go| index d4ac40531..1cffdc46f 100644 |
| --- a/internal/grouproll/testdata/remotecommand/main.go |
| +++ b/internal/grouproll/testdata/remotecommand/main.go |
| @@ -23,6 +23,9 @@ func main() { |
| Transaction string `json:"transaction"` |
| Permit map[string]any `json:"permit"` |
| Nonce string `json:"nonce"` |
| + // Peers is drain's acknowledgement list; absent stays nil (the |
| + // builder refuses a drain without one). |
| + Peers []string `json:"peers"` |
| } |
| dec := json.NewDecoder(os.Stdin) |
| dec.UseNumber() |
| @@ -35,7 +38,7 @@ func main() { |
| fmt.Fprintln(os.Stderr, err) |
| os.Exit(2) |
| } |
| - args := grouproll.BoxArgs{SHA256: req.SHA256, Transaction: req.Transaction} |
| + args := grouproll.BoxArgs{SHA256: req.SHA256, Transaction: req.Transaction, Peers: req.Peers} |
| if req.Permit != nil { |
| args.Permit = permit.(map[string]any) |
| } |
diff --git a/scripts/region_group_document_test.py b/scripts/region_group_document_test.py| index afd540678..b8349558d 100644 |
| --- a/scripts/region_group_document_test.py |
| +++ b/scripts/region_group_document_test.py |
| @@ -72,6 +72,16 @@ def with_peers(command, peers=None): |
| return out |
| +def drain_command(transaction, peers=None): |
| + """A drain with its acknowledgement list, from whichever builder is under test. |
| + The Go builder takes the list itself; the script has none, so it is added.""" |
| + if GO_REMOTE_COMMAND: |
| + listed = PEERS[len("--peers="):] if peers is None else peers |
| + return go_remote_command(dict(verb="drain", transaction=transaction, |
| + peers=listed.split(",") if listed else []), NONCE) |
| + return with_peers(frames.roll.AWS.remote_command(dict(verb="drain", transaction=transaction), NONCE), peers) |
| + |
| + |
| class DocumentPatternTests(unittest.TestCase): |
| def setUp(self): |
| self.tool = pattern() |
| @@ -104,17 +114,24 @@ class DocumentPatternTests(unittest.TestCase): |
| # as a member on this release would refuse it without a list. |
| for transaction in ("a", "t6_held-1", "A_9-" * 20): |
| for verb in ("drain", "drain-cancel", "fence-clear"): |
| - command = frames.roll.AWS.remote_command(dict(verb=verb, transaction=transaction), NONCE) |
| with self.subTest(verb=verb, transaction=transaction): |
| if verb == "drain": |
| - self.assertRefused(command) |
| - self.assertRefused(command, harness=True) |
| - command = with_peers(command) |
| + if GO_REMOTE_COMMAND: |
| + # The Go builder refuses a drain without its list. |
| + with self.assertRaises(frames.roll.Refusal): |
| + frames.roll.AWS.remote_command(dict(verb=verb, transaction=transaction), NONCE) |
| + else: |
| + plain = frames.roll.AWS.remote_command(dict(verb=verb, transaction=transaction), NONCE) |
| + self.assertRefused(plain) |
| + self.assertRefused(plain, harness=True) |
| + command = drain_command(transaction) |
| + else: |
| + command = frames.roll.AWS.remote_command(dict(verb=verb, transaction=transaction), NONCE) |
| self.assertAccepted(command) |
| self.assertAccepted(command, harness=True) |
| self.assertAccepted(frames.roll.AWS.remote_command({"verb": "edge-stop"}, NONCE)) |
| - drain = with_peers(frames.roll.AWS.remote_command(dict(verb="drain", transaction="t6"), NONCE)) |
| - self.assertAccepted(with_peers(frames.roll.AWS.remote_command(dict(verb="drain", transaction="t6"), NONCE), "")) |
| + drain = drain_command("t6") |
| + self.assertAccepted(drain_command("t6", "")) |
| D = PEERS + " t6" |
| clear = frames.roll.AWS.remote_command(dict(verb="fence-clear", transaction="t6"), NONCE) |
| cancel = frames.roll.AWS.remote_command(dict(verb="drain-cancel", transaction="t6"), NONCE) |
diff --git a/testdata/clireg-golden.jsonl b/testdata/clireg-golden.jsonl| index 6872ee194..d65b9318c 100644 |
| --- a/testdata/clireg-golden.jsonl |
| +++ b/testdata/clireg-golden.jsonl |
| @@ -824,8 +824,8 @@ |
| {"case":"system group | bare","argv":["system","group"],"exit":2,"stdout":"","stderr":"usage: carlos system <verb> [flags]\n carlos system router <verb> [flags]\n carlos system demos <status|serving on|serving off|takedown|takedown-status>\n carlos system managed-fleets <show|set --file f.json>\n carlos system antivirus <status|enable|disable|rotate-webhook-key> [flags]\n carlos system pdf status\n carlos system geoip <publish|status|off> [flags]\n carlos system seeds-floor publish --min-release <release>\n carlos system legacy-routes assign --name <name> --to <account>/<app>\n carlos system lifetimes cutover [--no-wait]\n carlos system hosts-used status\n carlos system named-units install <file>\n carlos system box role <box> <default|legacy|platform>\n carlos system box publish-record\n carlos system group role <region> <default|legacy>\n carlos system host-env <write|seed> --deployment <name> --region <code> [flags]\n\nThe platform's own binary (ops account owners and CARLOS_SYSTEM_OPERATORS):\n\n update promote a platform release to a channel; every box on it rolls itself\n status every box: platform, channel, running build, channel target, last apply outcome\n rollback point a channel back at the release before this one\n cancel-activation\n release a channel's activation reservation that was never\n published, so promote and rollback work again\n apply (root oneshot behind carlos-system-update.service; not for operators)\n layout migrate|revert|status: move every instance into its own directory\n and namespace, or back; see carlos system layout help\n seeds-floor publish --min-release <release>\n the first release whose boxes can place a seed, such as v0.27.0\n legacy-routes assign --name <name> --to <account>/<app>\n say which account and app the routes an operator filed by hand belong to\n lifetimes cutover [--no-wait]\n switch a console without host claims onto instance lifetimes,\n once, after the old console has stopped. Waits until they are on\n hosts-used status\n the hostname history: its mode, how many hostnames it has\n recorded, its closed fleets and its floor\n box role <box> <default|legacy|platform>\n whether new instances may be placed on a box. A legacy or\n platform box keeps the instances it has and takes no new ones\n group role <region> <default|legacy>\n the same for every box a region's group has enrolled, and for\n every box it enrolls later\n box publish-record\n run on a box as the agent user, with systemd-run -p User=carlos:\n publish its AWS-signed identity record to the deployment\n bucket, once. It never replaces or deletes a record\n\nA box a region's group launches (region HA):\n\n host-env write build host.env from the deployment's parameters (root)\n host-env seed copy a box's host.env into the deployment's parameters\n install-channel install the release this box's channel names (root)\n\nDeployment-wide settings (CARLOS_STORE_OPERATORS):\n\n pdf status\n\n antivirus status is object scanning wired, switched on, and answering?\n Reports wiring and policy separately, because they fail\n separately.\n antivirus enable turn object scanning on for this deployment. Refused if\n no engine is wired: a record claiming enabled with\n nothing behind it would report health where no scan can\n run.\n antivirus disable turn it off. Takes effect on the next tick — no restart,\n which is the point of the switch living in a record\n rather than in the unit file.\n antivirus rotate-webhook-key\n deliver the current master-derived callback secret to\n every scanning-enabled app, one bounded batch at a\n time. Skips apps already on that key, restarts the\n rest, and is safe to run again.\n\nPlatform GeoIP (ops account owners and CARLOS_SYSTEM_OPERATORS):\n\n geoip publish <file.mmdb> publish a MaxMind-format database (DB-IP Lite or\n GeoLite2) to every edge. -force skips the shrink check\n geoip status the published database, and whether every box\n strips forged headers and has it\n geoip off stop: edges drop the database and send no geo headers\n\nEnabling antivirus scans nothing by itself: a member still requests scanning\nfor their app, and an operator still grants it per store.\n\nThe platform is not an app: the console is updated with carlos deploy --app console.\n"} |
| {"case":"system group | help","argv":["system","group","help"],"exit":2,"stdout":"","stderr":"usage: carlos system <verb> [flags]\n carlos system router <verb> [flags]\n carlos system demos <status|serving on|serving off|takedown|takedown-status>\n carlos system managed-fleets <show|set --file f.json>\n carlos system antivirus <status|enable|disable|rotate-webhook-key> [flags]\n carlos system pdf status\n carlos system geoip <publish|status|off> [flags]\n carlos system seeds-floor publish --min-release <release>\n carlos system legacy-routes assign --name <name> --to <account>/<app>\n carlos system lifetimes cutover [--no-wait]\n carlos system hosts-used status\n carlos system named-units install <file>\n carlos system box role <box> <default|legacy|platform>\n carlos system box publish-record\n carlos system group role <region> <default|legacy>\n carlos system host-env <write|seed> --deployment <name> --region <code> [flags]\n\nThe platform's own binary (ops account owners and CARLOS_SYSTEM_OPERATORS):\n\n update promote a platform release to a channel; every box on it rolls itself\n status every box: platform, channel, running build, channel target, last apply outcome\n rollback point a channel back at the release before this one\n cancel-activation\n release a channel's activation reservation that was never\n published, so promote and rollback work again\n apply (root oneshot behind carlos-system-update.service; not for operators)\n layout migrate|revert|status: move every instance into its own directory\n and namespace, or back; see carlos system layout help\n seeds-floor publish --min-release <release>\n the first release whose boxes can place a seed, such as v0.27.0\n legacy-routes assign --name <name> --to <account>/<app>\n say which account and app the routes an operator filed by hand belong to\n lifetimes cutover [--no-wait]\n switch a console without host claims onto instance lifetimes,\n once, after the old console has stopped. Waits until they are on\n hosts-used status\n the hostname history: its mode, how many hostnames it has\n recorded, its closed fleets and its floor\n box role <box> <default|legacy|platform>\n whether new instances may be placed on a box. A legacy or\n platform box keeps the instances it has and takes no new ones\n group role <region> <default|legacy>\n the same for every box a region's group has enrolled, and for\n every box it enrolls later\n box publish-record\n run on a box as the agent user, with systemd-run -p User=carlos:\n publish its AWS-signed identity record to the deployment\n bucket, once. It never replaces or deletes a record\n\nA box a region's group launches (region HA):\n\n host-env write build host.env from the deployment's parameters (root)\n host-env seed copy a box's host.env into the deployment's parameters\n install-channel install the release this box's channel names (root)\n\nDeployment-wide settings (CARLOS_STORE_OPERATORS):\n\n pdf status\n\n antivirus status is object scanning wired, switched on, and answering?\n Reports wiring and policy separately, because they fail\n separately.\n antivirus enable turn object scanning on for this deployment. Refused if\n no engine is wired: a record claiming enabled with\n nothing behind it would report health where no scan can\n run.\n antivirus disable turn it off. Takes effect on the next tick — no restart,\n which is the point of the switch living in a record\n rather than in the unit file.\n antivirus rotate-webhook-key\n deliver the current master-derived callback secret to\n every scanning-enabled app, one bounded batch at a\n time. Skips apps already on that key, restarts the\n rest, and is safe to run again.\n\nPlatform GeoIP (ops account owners and CARLOS_SYSTEM_OPERATORS):\n\n geoip publish <file.mmdb> publish a MaxMind-format database (DB-IP Lite or\n GeoLite2) to every edge. -force skips the shrink check\n geoip status the published database, and whether every box\n strips forged headers and has it\n geoip off stop: edges drop the database and send no geo headers\n\nEnabling antivirus scans nothing by itself: a member still requests scanning\nfor their app, and an operator still grants it per store.\n\nThe platform is not an app: the console is updated with carlos deploy --app console.\n"} |
| {"case":"system group | zz-unknown","argv":["system","group","zz-unknown"],"exit":2,"stdout":"","stderr":"usage: carlos system <verb> [flags]\n carlos system router <verb> [flags]\n carlos system demos <status|serving on|serving off|takedown|takedown-status>\n carlos system managed-fleets <show|set --file f.json>\n carlos system antivirus <status|enable|disable|rotate-webhook-key> [flags]\n carlos system pdf status\n carlos system geoip <publish|status|off> [flags]\n carlos system seeds-floor publish --min-release <release>\n carlos system legacy-routes assign --name <name> --to <account>/<app>\n carlos system lifetimes cutover [--no-wait]\n carlos system hosts-used status\n carlos system named-units install <file>\n carlos system box role <box> <default|legacy|platform>\n carlos system box publish-record\n carlos system group role <region> <default|legacy>\n carlos system host-env <write|seed> --deployment <name> --region <code> [flags]\n\nThe platform's own binary (ops account owners and CARLOS_SYSTEM_OPERATORS):\n\n update promote a platform release to a channel; every box on it rolls itself\n status every box: platform, channel, running build, channel target, last apply outcome\n rollback point a channel back at the release before this one\n cancel-activation\n release a channel's activation reservation that was never\n published, so promote and rollback work again\n apply (root oneshot behind carlos-system-update.service; not for operators)\n layout migrate|revert|status: move every instance into its own directory\n and namespace, or back; see carlos system layout help\n seeds-floor publish --min-release <release>\n the first release whose boxes can place a seed, such as v0.27.0\n legacy-routes assign --name <name> --to <account>/<app>\n say which account and app the routes an operator filed by hand belong to\n lifetimes cutover [--no-wait]\n switch a console without host claims onto instance lifetimes,\n once, after the old console has stopped. Waits until they are on\n hosts-used status\n the hostname history: its mode, how many hostnames it has\n recorded, its closed fleets and its floor\n box role <box> <default|legacy|platform>\n whether new instances may be placed on a box. A legacy or\n platform box keeps the instances it has and takes no new ones\n group role <region> <default|legacy>\n the same for every box a region's group has enrolled, and for\n every box it enrolls later\n box publish-record\n run on a box as the agent user, with systemd-run -p User=carlos:\n publish its AWS-signed identity record to the deployment\n bucket, once. It never replaces or deletes a record\n\nA box a region's group launches (region HA):\n\n host-env write build host.env from the deployment's parameters (root)\n host-env seed copy a box's host.env into the deployment's parameters\n install-channel install the release this box's channel names (root)\n\nDeployment-wide settings (CARLOS_STORE_OPERATORS):\n\n pdf status\n\n antivirus status is object scanning wired, switched on, and answering?\n Reports wiring and policy separately, because they fail\n separately.\n antivirus enable turn object scanning on for this deployment. Refused if\n no engine is wired: a record claiming enabled with\n nothing behind it would report health where no scan can\n run.\n antivirus disable turn it off. Takes effect on the next tick — no restart,\n which is the point of the switch living in a record\n rather than in the unit file.\n antivirus rotate-webhook-key\n deliver the current master-derived callback secret to\n every scanning-enabled app, one bounded batch at a\n time. Skips apps already on that key, restarts the\n rest, and is safe to run again.\n\nPlatform GeoIP (ops account owners and CARLOS_SYSTEM_OPERATORS):\n\n geoip publish <file.mmdb> publish a MaxMind-format database (DB-IP Lite or\n GeoLite2) to every edge. -force skips the shrink check\n geoip status the published database, and whether every box\n strips forged headers and has it\n geoip off stop: edges drop the database and send no geo headers\n\nEnabling antivirus scans nothing by itself: a member still requests scanning\nfor their app, and an operator still grants it per store.\n\nThe platform is not an app: the console is updated with carlos deploy --app console.\n"} |
| -{"case":"system group-maintenance | --zz-unknown-flag","argv":["system","group-maintenance","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"Usage: carlos system group-maintenance {status|permit|revoke|prepare|apply|rollback|drain|fence-clear}\nRoot only, on a group member. Use through the attended Session Manager operator.\n prepare --sha256 <digest>\n Verify the configured signed pointer, cache its artifact and write a request.\n Check local restart configuration. No staging, repoint or restart.\n Makes cloud GETs only when attended and operator-invoked, never on a timer.\n The total prepare timeout is five minutes.\n previous_result reports the last outcome for this exact promotion.\n An applied, rolled-back or rollback-failed result leaves request_written false.\n apply Run the normal permit-gated apply using the checked local host.env.\n On a group member use carlos system group-maintenance apply, never bare\n carlos system apply.\n rollback Restore this member's previous artifact using an explicit rollback permit.\n Use the same transaction and old/new digests after revoking the apply permit.\n Local only. A consumed rollback permit cannot be replayed.\n permit Read at most 4096 bytes of permit JSON from stdin and install it.\n revoke Remove the permit. Keep all consumed-action records.\n drain <transaction>\n Drain this member for a planned handover: withdraw it and wait for every\n live box to acknowledge, install the start fence for the transaction,\n then move every awake host away and drain the connections. Print the\n agent's JSON report. Exit 0 only when the report's result is ok.\n drain --cancel <transaction>\n End the drain of the transaction and remove its start fence.\n fence-clear <transaction>\n Remove the start fence of the transaction. Another transaction's fence\n is refused.\n status Print one v1 JSON object, at most 8192 bytes. Make one local health GET.\nStatus includes edge.started_at in UTC at second precision, derived from kernel boot time and clock ticks.\nIt is a lower bound, up to two seconds early; compare with a generation at least two seconds later and check the edge identity has not changed.\nClock errors are in edge.started_at_error; edge.error describes the process.\naccepted means the guard's validators accept this permit now; it is not readiness: check the action and its consumed flag too.\nStatus is local evidence, not proof of fresh admission or role publication.\nPresent and accepted is still not authorization for the operator.\nThe cloud facts are the operator's.\nThe operator must also check the published edges object for this process.\nExit codes: 0 success or help, 1 refused or failed, 2 invalid arguments.\nErrors go to stderr, prefixed with \"group-maintenance:\". A held apply lock\nrefuses the command. Unknown status fields are null or state \"unknown\".\n"} |
| -{"case":"system group-maintenance | -h","argv":["system","group-maintenance","-h"],"exit":0,"stdout":"Usage: carlos system group-maintenance {status|permit|revoke|prepare|apply|rollback|drain|fence-clear}\nRoot only, on a group member. Use through the attended Session Manager operator.\n prepare --sha256 <digest>\n Verify the configured signed pointer, cache its artifact and write a request.\n Check local restart configuration. No staging, repoint or restart.\n Makes cloud GETs only when attended and operator-invoked, never on a timer.\n The total prepare timeout is five minutes.\n previous_result reports the last outcome for this exact promotion.\n An applied, rolled-back or rollback-failed result leaves request_written false.\n apply Run the normal permit-gated apply using the checked local host.env.\n On a group member use carlos system group-maintenance apply, never bare\n carlos system apply.\n rollback Restore this member's previous artifact using an explicit rollback permit.\n Use the same transaction and old/new digests after revoking the apply permit.\n Local only. A consumed rollback permit cannot be replayed.\n permit Read at most 4096 bytes of permit JSON from stdin and install it.\n revoke Remove the permit. Keep all consumed-action records.\n drain <transaction>\n Drain this member for a planned handover: withdraw it and wait for every\n live box to acknowledge, install the start fence for the transaction,\n then move every awake host away and drain the connections. Print the\n agent's JSON report. Exit 0 only when the report's result is ok.\n drain --cancel <transaction>\n End the drain of the transaction and remove its start fence.\n fence-clear <transaction>\n Remove the start fence of the transaction. Another transaction's fence\n is refused.\n status Print one v1 JSON object, at most 8192 bytes. Make one local health GET.\nStatus includes edge.started_at in UTC at second precision, derived from kernel boot time and clock ticks.\nIt is a lower bound, up to two seconds early; compare with a generation at least two seconds later and check the edge identity has not changed.\nClock errors are in edge.started_at_error; edge.error describes the process.\naccepted means the guard's validators accept this permit now; it is not readiness: check the action and its consumed flag too.\nStatus is local evidence, not proof of fresh admission or role publication.\nPresent and accepted is still not authorization for the operator.\nThe cloud facts are the operator's.\nThe operator must also check the published edges object for this process.\nExit codes: 0 success or help, 1 refused or failed, 2 invalid arguments.\nErrors go to stderr, prefixed with \"group-maintenance:\". A held apply lock\nrefuses the command. Unknown status fields are null or state \"unknown\".\n","stderr":""} |
| +{"case":"system group-maintenance | --zz-unknown-flag","argv":["system","group-maintenance","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"Usage: carlos system group-maintenance {status|permit|revoke|prepare|apply|rollback|drain|fence-clear}\nRoot only, on a group member. Use through the attended Session Manager operator.\n prepare --sha256 <digest>\n Verify the configured signed pointer, cache its artifact and write a request.\n Check local restart configuration. No staging, repoint or restart.\n Makes cloud GETs only when attended and operator-invoked, never on a timer.\n The total prepare timeout is five minutes.\n previous_result reports the last outcome for this exact promotion.\n An applied, rolled-back or rollback-failed result leaves request_written false.\n apply Run the normal permit-gated apply using the checked local host.env.\n On a group member use carlos system group-maintenance apply, never bare\n carlos system apply.\n rollback Restore this member's previous artifact using an explicit rollback permit.\n Use the same transaction and old/new digests after revoking the apply permit.\n Local only. A consumed rollback permit cannot be replayed.\n permit Read at most 4096 bytes of permit JSON from stdin and install it.\n revoke Remove the permit. Keep all consumed-action records.\n drain --peers=<box,...> <transaction>\n Drain this member for a planned handover: withdraw it and wait for every\n listed box, and any other box with an edges file, to acknowledge, install\n the start fence for the transaction, then move every awake host away and\n drain the connections. --peers lists every other box the operator's\n floor counted (empty when it counted none). Print the agent's JSON\n report. Exit 0 only when the report's result is ok.\n drain --cancel <transaction>\n End the drain of the transaction and remove its start fence.\n fence-clear <transaction>\n Remove the start fence of the transaction. Another transaction's fence\n is refused.\n status Print one v1 JSON object, at most 8192 bytes. Make one local health GET.\nStatus includes edge.started_at in UTC at second precision, derived from kernel boot time and clock ticks.\nIt is a lower bound, up to two seconds early; compare with a generation at least two seconds later and check the edge identity has not changed.\nClock errors are in edge.started_at_error; edge.error describes the process.\naccepted means the guard's validators accept this permit now; it is not readiness: check the action and its consumed flag too.\nStatus is local evidence, not proof of fresh admission or role publication.\nPresent and accepted is still not authorization for the operator.\nThe cloud facts are the operator's.\nThe operator must also check the published edges object for this process.\nExit codes: 0 success or help, 1 refused or failed, 2 invalid arguments.\nErrors go to stderr, prefixed with \"group-maintenance:\". A held apply lock\nrefuses the command. Unknown status fields are null or state \"unknown\".\n"} |
| +{"case":"system group-maintenance | -h","argv":["system","group-maintenance","-h"],"exit":0,"stdout":"Usage: carlos system group-maintenance {status|permit|revoke|prepare|apply|rollback|drain|fence-clear}\nRoot only, on a group member. Use through the attended Session Manager operator.\n prepare --sha256 <digest>\n Verify the configured signed pointer, cache its artifact and write a request.\n Check local restart configuration. No staging, repoint or restart.\n Makes cloud GETs only when attended and operator-invoked, never on a timer.\n The total prepare timeout is five minutes.\n previous_result reports the last outcome for this exact promotion.\n An applied, rolled-back or rollback-failed result leaves request_written false.\n apply Run the normal permit-gated apply using the checked local host.env.\n On a group member use carlos system group-maintenance apply, never bare\n carlos system apply.\n rollback Restore this member's previous artifact using an explicit rollback permit.\n Use the same transaction and old/new digests after revoking the apply permit.\n Local only. A consumed rollback permit cannot be replayed.\n permit Read at most 4096 bytes of permit JSON from stdin and install it.\n revoke Remove the permit. Keep all consumed-action records.\n drain --peers=<box,...> <transaction>\n Drain this member for a planned handover: withdraw it and wait for every\n listed box, and any other box with an edges file, to acknowledge, install\n the start fence for the transaction, then move every awake host away and\n drain the connections. --peers lists every other box the operator's\n floor counted (empty when it counted none). Print the agent's JSON\n report. Exit 0 only when the report's result is ok.\n drain --cancel <transaction>\n End the drain of the transaction and remove its start fence.\n fence-clear <transaction>\n Remove the start fence of the transaction. Another transaction's fence\n is refused.\n status Print one v1 JSON object, at most 8192 bytes. Make one local health GET.\nStatus includes edge.started_at in UTC at second precision, derived from kernel boot time and clock ticks.\nIt is a lower bound, up to two seconds early; compare with a generation at least two seconds later and check the edge identity has not changed.\nClock errors are in edge.started_at_error; edge.error describes the process.\naccepted means the guard's validators accept this permit now; it is not readiness: check the action and its consumed flag too.\nStatus is local evidence, not proof of fresh admission or role publication.\nPresent and accepted is still not authorization for the operator.\nThe cloud facts are the operator's.\nThe operator must also check the published edges object for this process.\nExit codes: 0 success or help, 1 refused or failed, 2 invalid arguments.\nErrors go to stderr, prefixed with \"group-maintenance:\". A held apply lock\nrefuses the command. Unknown status fields are null or state \"unknown\".\n","stderr":""} |
| {"case":"system guard-arm | --zz-unknown-flag","argv":["system","guard-arm","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nUsage of system guard-arm:\n -console string\n \t\n -enrollment string\n \t\n -identity string\n \t\n -policy string\n \t\n"} |
| {"case":"system guard-arm | -h","argv":["system","guard-arm","-h"],"exit":0,"stdout":"","stderr":"Usage of system guard-arm:\n -console string\n \t\n -enrollment string\n \t\n -identity string\n \t\n -policy string\n \t\n"} |
| {"case":"system guard-exec zz | extra (release key set)","argv":["system","guard-exec","zz"],"env":{"CARLOS_RELEASE_PUBKEY":"ebVWLo/mVPlAeLES6KmLp5AfhTrmlb7X4OORC60ElmQ="},"exit":1,"stdout":"","stderr":"hostfloor: authenticated floor required\n"} |