carlos system group: roll, resume, rollback, return, abandon, close-lost
The six leaves go through runSystemGroup. Missing or malformed arguments are refused before any state, config or provider: an empty member or artifact is config_invalid, a missing transaction or a chosen roll transaction the box verbs cannot take is record. Parity rows and parity-doc updated; census re-proposed (roll.go units, changed blocked) and the floor's two refusing Put methods inventoried for B8.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 files changed,
+248
−61
docs/parity.md+1 −1docs/superpowers/notes/census-proposal-group-roll-verb.md+6 −4internal/provision/group_roll_verb_census_test.go+6 −2internal/provision/testdata/plan14-root-reads-chain.tsv+1 −1internal/provision/testdata/plan14-root-reads-group-roll-verb.tsv+50 −45parity/cli.tsv+6 −0parity/parity.tsv+1 −1system_group.go+77 −7system_group_test.go+88 −0system_roles.go+6 −0testdata/clireg-golden.jsonl+6 −0
Intent
diff --git a/docs/parity.md b/docs/parity.md| index f935f325c..09f474d93 100644 |
| --- a/docs/parity.md |
| +++ b/docs/parity.md |
| @@ -409,7 +409,7 @@ Discussion #742. |
| | op-system-geoip | operator | `system geoip publish`<br>`system geoip status`<br>`system geoip off` | | The platform GeoIP database. | |
| | op-system-cutovers | operator | `system seeds-floor publish`<br>`system legacy-routes assign`<br>`system lifetimes cutover`<br>`system hosts-used status` | | One-off cutovers and floors. | |
| | op-system-roles | operator | `system box role`<br>`system group role` | | Box and group roles. | |
| -| op-system-group-roll | operator | `system group plan`<br>`system group status` | | Group maintenance from an operator machine. | |
| +| op-system-group-roll | operator | `system group plan`<br>`system group status`<br>`system group roll`<br>`system group resume`<br>`system group rollback`<br>`system group return`<br>`system group abandon`<br>`system group close-lost` | | Group maintenance from an operator machine. | |
| | op-system-demos | operator | `system demos status`<br>`system demos serving`<br>`system demos takedown`<br>`system demos takedown-status`<br>`system demos reports`<br>`system demos reports resolve` | | Demo serving, takedowns and reports. | |
| | op-system-managed-fleets | operator | `system managed-fleets show`<br>`system managed-fleets set` | | The managed-fleet catalog. | |
diff --git a/docs/superpowers/notes/census-proposal-group-roll-verb.md b/docs/superpowers/notes/census-proposal-group-roll-verb.md| index d8db8201e..61f4ca276 100644 |
| --- a/docs/superpowers/notes/census-proposal-group-roll-verb.md |
| +++ b/docs/superpowers/notes/census-proposal-group-roll-verb.md |
| @@ -1,18 +1,20 @@ |
| # Census approval: group-roll-verb |
| -Ruling `census-ruling-group-roll-verb`. The independent reviewer approves or rejects every change below, 20 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| +Ruling `census-ruling-group-roll-verb`. The independent reviewer approves or rejects every change below, 22 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| -Envelopes re-pinned: `.`, `internal/grouproll`, `internal/grouprollaws`. |
| +Envelopes re-pinned: `.`, `internal/grouproll`, `internal/grouprollaws`, `internal/release`. |
| Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| - new `internal/grouproll/config.go:LoadConfig`: reads +file:ReadFile; written legacy, accepted-legacy, frozen |
| -- new `internal/grouproll/engine.go:Engine.blocked`: reads +file:Stat; written legacy, accepted-legacy, frozen |
| +- new `internal/grouproll/engine.go:Engine.blocked`: reads +file:Lstat; written legacy, accepted-legacy, frozen |
| - new `internal/grouproll/engine.go:Engine.preflight`: reads +file:Read; written legacy, accepted-legacy, frozen |
| - new `internal/grouproll/journal.go:Journal.read`: reads +file:ReadAll; written legacy, accepted-legacy, frozen |
| - new `internal/grouproll/plan.go:Engine.Plan`: reads +file:Read; written legacy, accepted-legacy, frozen |
| +- new `internal/grouproll/roll.go:Engine.Roll`: reads +file:Create, +file:Lstat; written legacy, accepted-legacy, frozen |
| +- new `internal/grouproll/roll.go:Engine.closeLost`: reads +file:Lstat; written legacy, accepted-legacy, frozen |
| - new `internal/grouproll/state.go:State.ActiveID`: reads +file:Lstat ×2, +file:Read, +file:ReadDir; written legacy, accepted-legacy, frozen |
| - new `internal/grouproll/state.go:State.Create`: reads +file:Create; written legacy, accepted-legacy, frozen |
| - new `internal/grouproll/state.go:State.Read`: reads +file:Read, +file:ReadAll; written legacy, accepted-legacy, frozen |
| @@ -29,6 +31,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the |
| - new `internal/grouprollaws/transport.go:boundedBody.Read`: reads +file:Read ×2; written legacy, accepted-legacy, frozen |
| - new `system_group.go:runSystemGroup`: reads +file:Lstat; written legacy, accepted-legacy, frozen |
| -Seal: `8924fafc5b6083858a72f45c764081abe3bcad6a6de71901470586c076c64bb6` → `69a7af2adbf2566a2b321f66c67dd64802995f4c66f99291a2781deb2f8adfb1`. |
| +Seal: `8924fafc5b6083858a72f45c764081abe3bcad6a6de71901470586c076c64bb6` → `2579fa41b5ffb428ec177525ecba843e03772390783499ccd3b9933e6e7a2cce`. |
| Overlay: `internal/provision/testdata/plan14-root-reads-group-roll-verb.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/provision/group_roll_verb_census_test.go b/internal/provision/group_roll_verb_census_test.go| index ab7117e7f..f803854a4 100644 |
| --- a/internal/provision/group_roll_verb_census_test.go |
| +++ b/internal/provision/group_roll_verb_census_test.go |
| @@ -4,8 +4,12 @@ package provision |
| // record-write census: the AWS adapter's object store for carlos system |
| // group (internal/grouprollaws/objects.go) is read-only. Its Put defines |
| // the release.Store method only to refuse it, sends nothing and writes no |
| -// record. |
| +// record. The floor's router pointer stores (internal/grouproll/floor.go |
| +// pointerStore, internal/release/systemlookup.go oneObject) are the same: |
| +// a Put that only refuses. |
| func groupRollVerbWriteCensusInventory() []censusEntry { |
| return append(append([]censusEntry(nil), billingDashboard1WriteCensusInventory()...), |
| - censusEntry{"internal/grouprollaws/objects.go", "readStore.Put", "nonrecord", "def:Put", "eca4ac5bfc69da9215d6274d226b615fa0757ce051783db6694e6b1c0f4be47b"}) |
| + censusEntry{"internal/grouprollaws/objects.go", "readStore.Put", "nonrecord", "def:Put", "eca4ac5bfc69da9215d6274d226b615fa0757ce051783db6694e6b1c0f4be47b"}, |
| + censusEntry{"internal/grouproll/floor.go", "pointerStore.Put", "nonrecord", "def:Put", "2f932311032049669f2eb169d55b5502cc4e2f27d274fb0356fbdd09dc47b000"}, |
| + censusEntry{"internal/release/systemlookup.go", "oneObject.Put", "nonrecord", "def:Put", "ab8da9562c84b52edb60a8c23628d8c70d40ce3e6f7e9b4add2facd3a362f5b4"}) |
| } |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index c581d9e62..6f1ec6ab1 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -146,4 +146,4 @@ plan14-root-reads-security-review-mitigations.tsv a6f3f9eec4aac5ea88f20d0e52eaa0 |
| plan14-root-reads-cli-registry-words.tsv 8924fafc5b6083858a72f45c764081abe3bcad6a6de71901470586c076c64bb6 |
| plan14-root-reads-billing-dashboard-1.tsv 8924fafc5b6083858a72f45c764081abe3bcad6a6de71901470586c076c64bb6 |
| plan14-root-reads-billing-dash-3-cost.tsv 8924fafc5b6083858a72f45c764081abe3bcad6a6de71901470586c076c64bb6 |
| -plan14-root-reads-group-roll-verb.tsv 69a7af2adbf2566a2b321f66c67dd64802995f4c66f99291a2781deb2f8adfb1 |
| +plan14-root-reads-group-roll-verb.tsv 2579fa41b5ffb428ec177525ecba843e03772390783499ccd3b9933e6e7a2cce |
diff --git a/internal/provision/testdata/plan14-root-reads-group-roll-verb.tsv b/internal/provision/testdata/plan14-root-reads-group-roll-verb.tsv| index 4360ebffe..84bb5e3c9 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-group-roll-verb.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-group-roll-verb.tsv |
| @@ -1,46 +1,51 @@ |
| # Census overlay group-roll-verb, written by census-propose (#369). census-ruling-group-roll-verb, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-group-roll-verb.md. |
| -# 0 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| -# 20 new dispositions: 0 reads re-frozen at their disposition with the claim, 20 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| -@legacy 5301fc4779fe18ebdb3ab3f939536655fff2f0f69b77cb4da8232f2d0bf57e60 internal/grouproll/config.go LoadConfig legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads the operator's group config file named by --config (operator CLI only; refuses root) file:ReadFile@60 104fe171b8ce675aec5b764f43b1151bc9e9fba27d47c11b51b0bc7ea4065661 |
| -@legacy 98a907bed6b04f1ae2fd12df2a2ffca97fd6cd27e8bd3613156ce1caf2ca69e5 internal/grouproll/engine.go Engine.blocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: stats provider-divergence.json in the operator's own 0700 state directory file:Stat@45 5a1271bdebf2ddfe30d53ffa5bb74d5418e7163f860333a4e28e0f8a93be281d |
| -@legacy f054d418b4bc79970f300d5d84cb8aba6f19a17115d57633a99b2b1cba62df5b internal/grouproll/engine.go Engine.preflight legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads provider-observation.json from the operator's own 0700 state directory file:Read@630 7fc8c49acade80e8c7e3b3a1c72d46343c0e9f66c03a48ee684c49f5b20a0ece |
| -@legacy 1a7211d1fd02a49878e27ee824566d33b0c34bc6b4aa89e9d9158224f447a041 internal/grouproll/journal.go Journal.read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads a format 2 journal from the operator's own 0700 state directory, capped at 64 MiB file:ReadAll@57 70ca67ebedcdf02e651ae0b6e016f578bb415438466bb78e247e649bde17c94b |
| -@legacy 7bc64898fa2bcff55a3152e358c0ae25cb087e82709b23cdae687c4f4b82ee91 internal/grouproll/plan.go Engine.Plan legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads provider-observation.json from the operator's own 0700 state directory file:Read@2082 4d5228ed17c41e0ccda1517f5715a16e1c52cf6c24873bfd3ebbb20dbeb11903 |
| -@legacy 0d8c73d4843fceb26628539fd6a99d63633b0299b25da660b92a7c4ef986142a internal/grouproll/state.go State.ActiveID legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: lists and reads active-v2.json and journals in the operator's own state directory file:Lstat@1138,file:Lstat@74,file:Read@125,file:ReadDir@434 9d44b2accce767cd6b36f813e2b429f36b0a54201603bb9c23d62ae557af1784 |
| -@legacy 13880520ddcf8c9e525f37c334169bf13b214aa2edba733dee404620cf57f7ef internal/grouproll/state.go State.Create legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: creates a journal in the operator's own state directory (O_NOFOLLOW, 0600) file:Create@16 b9aea0e0651c69cba91721bfd788318c274685a684c65da69d51d8953775cf14 |
| -@legacy fdffaf14ef0de828e31a2b336d25378097c0de862bcdfba155fec9b231f0d276 internal/grouproll/state.go State.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads a small state file (65,536-byte cap) from the operator's own state directory file:Read@16,file:ReadAll@168 591dafeefdcdb3bf61135d1245169a1c5be53464809c623baf956775fec37516 |
| -@legacy 625b07f777959fa0bb7ddc978335061be47a0854d9ef6067820dca0595af45a7 internal/grouproll/state.go randomHex legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads crypto/rand for plan log and transaction names file:Read@56 354b626f961cb7bf467fda630527c1ffc8d16f927b6d14eace7054630ac61ae3 |
| -@legacy 796d6894510486cf11a362d939709d456884c668c0023107b94703929bd1e803 internal/grouproll/state_unix.go lstatOwner legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: lstats the state directory and its ancestors to refuse symlinks and unsafe owners file:Lstat@83 98b0d85298b28884cc5a24ae07edec72762db01a5dd0e70dc9a6cf4b45a3589b |
| -@legacy cb6b283cbaab2453d18a92e6ea619e490da6c7e251e7d5548e032ff0888319be internal/grouproll/state_unix.go privateFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: opens a state file O_NOFOLLOW and checks it is a private regular file owned by the caller file:Fstat@318,file:Open@84 2b689035c80437e3f3a8c99ef9e1e1970ee7d8087bcdca0bb276eab3b3d6ebef |
| -@legacy 7c427a62f1a4a5411fad89025592b3b9c6888acaf22ec377aeebe6d6e0ccd392 internal/grouproll/state_unix.go syncDirectory legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: opens the state directory to fsync it file:Open@52 5e53836f352bbeb3bc0518407e4db67d407331bcea784191693e94339a6c1520 |
| -@legacy 0137f4465f132b206858e823cf74da3748be0887eebde8400dd1678c99bba80d internal/grouprollaws/group.go Adapter.TemplateRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads the launch template's user data from the EC2 answer (in memory, 4 MiB cap) file:ReadAll@1474 1fca0c893f4983a2a5e4d109e9c79eeaccb560255e9e0126a1db80103c36ff96 |
| -@legacy 0039188458a3b700ccf22d9e3c5f703950de7ec49466e0ad87769602bb9b86c3 internal/grouprollaws/pty_linux.go openPTY legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: opens /dev/ptmx and the pts slave for the Session Manager plugin file:Open@421,file:Open@47 12f5a07caf7bb27f2cc8b0b2ac5da4074c1c073fa6f73da9816b5473115fd988 |
| -@legacy 9d0e8abe70411923bc3af2d9f20bdae1c722764633e1a20f1024398c256526e0 internal/grouprollaws/pty_unix.go pty.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads the plugin's pty output, capped at 4 MiB file:Read@996 2d6798bc9760f315d67cd93a75d3b746fbe538881f0d50d3acd2070f3e91379f |
| -@legacy c53f0f8796ede4f379e30e9b9c6e3835bebcca55d182b4558f59fa41089e15e6 internal/grouprollaws/pty_unix.go runVersion legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads session-manager-plugin --version output, capped at 4 KiB file:Read@789 996b5cb79b292f5de0fcb42c5987eaf739ec27869e1744380e0d6f65deb639fd |
| -@legacy fcf9bf3f19da2f83fb1514585abd83c6bddeef983c47957a8c84c4689797fbca internal/grouprollaws/session.go newNonce legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads crypto/rand for the frame nonce file:Read@49 7bba200ea8c254001d09c73841b2b454d95ea5015fb75840187c4612f28edb6e |
| -@legacy fc7f077ae17a4c567792904f6a9f0bd229423365a9884a7035fc0273ed4607ae internal/grouprollaws/transport.go boundBody.HandleDeserialize legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads an AWS API answer body under the 4 MiB cap file:ReadAll@436 020d98263efa2c56f212b20f4d3e3d9497ebc1a86d737c0ffc481cb1c48d38e8 |
| -@legacy 5f2211a1c118d3be97d2abdfd57e5fe5a42a2d65d364a2d1d01b8cc31ad359f6 internal/grouprollaws/transport.go boundedBody.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads an AWS API answer body under the 4 MiB cap and the read timeout file:Read@22,file:Read@448 7ff90cef635efcf75d046d9113cb6a0dcddd8dfb3570c73984bc5565b637e872 |
| -@legacy e76de0f49c6b8cbd42aa4d1eab1dc48477d629258b58e477a6948649fc59aab4 system_group.go runSystemGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: lstats /etc/carlos/host.env to refuse running on a carlos box (euid 0 is refused first) file:Lstat@245 08579781ed6b6c32c375fc18155a6dd5e7e5035e3eb011beb51d6c87d24f178c |
| -internal/grouproll/config.go LoadConfig legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads the operator's group config file named by --config (operator CLI only; refuses root) file:ReadFile@60 104fe171b8ce675aec5b764f43b1151bc9e9fba27d47c11b51b0bc7ea4065661 |
| -internal/grouproll/engine.go Engine.blocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: stats provider-divergence.json in the operator's own 0700 state directory file:Stat@45 5a1271bdebf2ddfe30d53ffa5bb74d5418e7163f860333a4e28e0f8a93be281d |
| -internal/grouproll/engine.go Engine.preflight legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads provider-observation.json from the operator's own 0700 state directory file:Read@630 7fc8c49acade80e8c7e3b3a1c72d46343c0e9f66c03a48ee684c49f5b20a0ece |
| -internal/grouproll/journal.go Journal.read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads a format 2 journal from the operator's own 0700 state directory, capped at 64 MiB file:ReadAll@57 70ca67ebedcdf02e651ae0b6e016f578bb415438466bb78e247e649bde17c94b |
| -internal/grouproll/plan.go Engine.Plan legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads provider-observation.json from the operator's own 0700 state directory file:Read@2082 4d5228ed17c41e0ccda1517f5715a16e1c52cf6c24873bfd3ebbb20dbeb11903 |
| -internal/grouproll/state.go State.ActiveID legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: lists and reads active-v2.json and journals in the operator's own state directory file:Lstat@1138,file:Lstat@74,file:Read@125,file:ReadDir@434 9d44b2accce767cd6b36f813e2b429f36b0a54201603bb9c23d62ae557af1784 |
| -internal/grouproll/state.go State.Create legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: creates a journal in the operator's own state directory (O_NOFOLLOW, 0600) file:Create@16 b9aea0e0651c69cba91721bfd788318c274685a684c65da69d51d8953775cf14 |
| -internal/grouproll/state.go State.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads a small state file (65,536-byte cap) from the operator's own state directory file:Read@16,file:ReadAll@168 591dafeefdcdb3bf61135d1245169a1c5be53464809c623baf956775fec37516 |
| -internal/grouproll/state.go randomHex legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads crypto/rand for plan log and transaction names file:Read@56 354b626f961cb7bf467fda630527c1ffc8d16f927b6d14eace7054630ac61ae3 |
| -internal/grouproll/state_unix.go lstatOwner legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: lstats the state directory and its ancestors to refuse symlinks and unsafe owners file:Lstat@83 98b0d85298b28884cc5a24ae07edec72762db01a5dd0e70dc9a6cf4b45a3589b |
| -internal/grouproll/state_unix.go privateFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: opens a state file O_NOFOLLOW and checks it is a private regular file owned by the caller file:Fstat@318,file:Open@84 2b689035c80437e3f3a8c99ef9e1e1970ee7d8087bcdca0bb276eab3b3d6ebef |
| -internal/grouproll/state_unix.go syncDirectory legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: opens the state directory to fsync it file:Open@52 5e53836f352bbeb3bc0518407e4db67d407331bcea784191693e94339a6c1520 |
| -internal/grouprollaws/group.go Adapter.TemplateRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads the launch template's user data from the EC2 answer (in memory, 4 MiB cap) file:ReadAll@1474 1fca0c893f4983a2a5e4d109e9c79eeaccb560255e9e0126a1db80103c36ff96 |
| -internal/grouprollaws/pty_linux.go openPTY legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: opens /dev/ptmx and the pts slave for the Session Manager plugin file:Open@421,file:Open@47 12f5a07caf7bb27f2cc8b0b2ac5da4074c1c073fa6f73da9816b5473115fd988 |
| -internal/grouprollaws/pty_unix.go pty.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads the plugin's pty output, capped at 4 MiB file:Read@996 2d6798bc9760f315d67cd93a75d3b746fbe538881f0d50d3acd2070f3e91379f |
| -internal/grouprollaws/pty_unix.go runVersion legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads session-manager-plugin --version output, capped at 4 KiB file:Read@789 996b5cb79b292f5de0fcb42c5987eaf739ec27869e1744380e0d6f65deb639fd |
| -internal/grouprollaws/session.go newNonce legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads crypto/rand for the frame nonce file:Read@49 7bba200ea8c254001d09c73841b2b454d95ea5015fb75840187c4612f28edb6e |
| -internal/grouprollaws/transport.go boundBody.HandleDeserialize legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads an AWS API answer body under the 4 MiB cap file:ReadAll@436 020d98263efa2c56f212b20f4d3e3d9497ebc1a86d737c0ffc481cb1c48d38e8 |
| -internal/grouprollaws/transport.go boundedBody.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: reads an AWS API answer body under the 4 MiB cap and the read timeout file:Read@22,file:Read@448 7ff90cef635efcf75d046d9113cb6a0dcddd8dfb3570c73984bc5565b637e872 |
| -system_group.go runSystemGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=new: lstats /etc/carlos/host.env to refuse running on a carlos box (euid 0 is refused first) file:Lstat@245 08579781ed6b6c32c375fc18155a6dd5e7e5035e3eb011beb51d6c87d24f178c |
| -@coverage . e4510f22fe12a9dd4aad38272b0aeeea526302bd53dfba6e8490174b7f05f006 |
| -@coverage internal/grouproll fe6470509641420b4a2e36be7995e244a73a7317e709c7bd1fbcc86295ca69dc |
| -@coverage internal/grouprollaws 42606b41b520f77c7c0d5b971e57be7766cafbe8cc67214e38468a0b97e47184 |
| +# 0 body, 0 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 22 new dispositions: 0 reads re-frozen at their disposition with the claim, 22 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 4777f6d8b9e2da6def3258060eaab9340548a61f595e62e67e410df1cd040fd5 internal/grouproll/config.go LoadConfig legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads the operator's group config file named by --config (operator CLI only; refuses root) file:ReadFile@60 104fe171b8ce675aec5b764f43b1151bc9e9fba27d47c11b51b0bc7ea4065661 |
| +@legacy 9a38d288a899bddbd997d70ef2d5f1c710f0cda9f7c2282e68653e49800a9e99 internal/grouproll/engine.go Engine.blocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats provider-divergence.json in the operator's own 0700 state directory (no symlink follow); any answer but not-found refuses as a damaged record file:Lstat@54 5eab2f9c41b12a03746b294a25a18a7fa5c4d6abc2196b59f05ba055daca0583 |
| +@legacy 5c4850672a60472a3ecde4bd0975d4f9f49986b4a062564bd3a1d02cf53f84a2 internal/grouproll/engine.go Engine.preflight legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads provider-observation.json from the operator's own 0700 state directory file:Read@713 20d6aa0e018217e8354c2f0dcf8ff82db2701b76ab22e669ccb692d714ccce7a |
| +@legacy bddcf0d42f620aeb6ae7c83250f0018e7b06955458196f0495039a1283c72e42 internal/grouproll/journal.go Journal.read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads a format 2 journal from the operator's own 0700 state directory, capped at 64 MiB file:ReadAll@57 adb440d005959966ae0182557065f55ad8f4c3d223828f9ac290bda6e584e87f |
| +@legacy 84944d21a82ac46654dc689bb67e17afa397016318ea2d00976cd51723a48482 internal/grouproll/plan.go Engine.Plan legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads provider-observation.json from the operator's own 0700 state directory file:Read@2173 a9e81e1f0b1d88b56ba5181caa85b7a194faf1945fd8dbf501ee65b4a2d63444 |
| +@legacy 7ee538f985320a0d4ff4574d3be4bafc20ae2a04da5ffc7c1b472eb092e5bae4 internal/grouproll/roll.go Engine.Roll legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats a chosen transaction's journal name in the operator's own 0700 state directory (an existing one refuses before any call), then creates the journal through State.Create (O_NOFOLLOW, 0600) file:Create@936,file:Lstat@526 4cdb2e5e210d8b53bc012d952a351cc9abbb50ea1ebe80f96240a401004e65c5 |
| +@legacy 692c22a90518e761faacebc98f36130ed3a6738d97cbf5ccca9782895e9ab97e internal/grouproll/roll.go Engine.closeLost legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats provider-divergence.json in the operator's own 0700 state directory to say it is kept file:Lstat@1182 96e6fdd05d2d1679cdf6cca8f8ca19ad1594ed03b750785e4d33894d8b7e2a55 |
| +@legacy 186c867d7252903227d8fe85c23ef4c9d6fcccb69044007d0662701aa8ef0209 internal/grouproll/state.go State.ActiveID legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lists and reads active-v2.json and journals in the operator's own state directory file:Lstat@1138,file:Lstat@74,file:Read@125,file:ReadDir@434 9d44b2accce767cd6b36f813e2b429f36b0a54201603bb9c23d62ae557af1784 |
| +@legacy 8c02d51a35d03f02e49ccfdec733b9712ff428ee9e169f85abec879fcaa6fab5 internal/grouproll/state.go State.Create legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=creates a journal in the operator's own state directory (O_NOFOLLOW, 0600); the begin row records the caller's provider user id file:Create@16 58596801fe3b8491e12ccfa4bce99a2bea7bc10094ce8fc030684ceb248c59e6 |
| +@legacy 2e7da7904baf82cdc6c648b40735943c5e385358ace99d416a8b2094452da4fb internal/grouproll/state.go State.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads a small state file (65,536-byte cap) from the operator's own state directory file:Read@16,file:ReadAll@168 591dafeefdcdb3bf61135d1245169a1c5be53464809c623baf956775fec37516 |
| +@legacy b2d1fb77cf16e0ff009561c79d2fa96e856a791270f2f185bd9e3e99d5edcc43 internal/grouproll/state.go randomHex legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads crypto/rand for plan log and transaction names file:Read@56 354b626f961cb7bf467fda630527c1ffc8d16f927b6d14eace7054630ac61ae3 |
| +@legacy 7cd8035e5e072a727080783cd9e026bb2085702970f8b36a97f09f9904ca681e internal/grouproll/state_unix.go lstatOwner legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats the state directory and its ancestors to refuse symlinks and unsafe owners file:Lstat@83 98b0d85298b28884cc5a24ae07edec72762db01a5dd0e70dc9a6cf4b45a3589b |
| +@legacy 9191450761b635d8d9c2ccb070ea05416dfecfe1acf377a140cb57d0444cf97e internal/grouproll/state_unix.go privateFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=opens a state file O_NOFOLLOW and checks it is a private regular file owned by the caller file:Fstat@318,file:Open@84 2b689035c80437e3f3a8c99ef9e1e1970ee7d8087bcdca0bb276eab3b3d6ebef |
| +@legacy 67f4c1c2da06c32eea1d5d3a084bcac2e26e0f5c8b972ae49235a9dd67671f4a internal/grouproll/state_unix.go syncDirectory legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=opens the state directory to fsync it file:Open@52 5e53836f352bbeb3bc0518407e4db67d407331bcea784191693e94339a6c1520 |
| +@legacy 4fa99eb9bb5e8f76add8e72038d6caf774918e968091164908713b5d1d2062e7 internal/grouprollaws/group.go Adapter.TemplateRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads the launch template's user data from the EC2 answer (in memory, 4 MiB cap) file:ReadAll@1474 1fca0c893f4983a2a5e4d109e9c79eeaccb560255e9e0126a1db80103c36ff96 |
| +@legacy 75840f735277497febc95c25ce14645b808a03ec91ecbba7b95d7b69effd41b1 internal/grouprollaws/pty_linux.go openPTY legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=opens /dev/ptmx and the pts slave for the Session Manager plugin file:Open@421,file:Open@47 12f5a07caf7bb27f2cc8b0b2ac5da4074c1c073fa6f73da9816b5473115fd988 |
| +@legacy 99847c7d8e60a04b7e12411580ca96dfec8c0f5969008128f233f46279efdef1 internal/grouprollaws/pty_unix.go pty.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads the plugin's pty output, capped at 4 MiB file:Read@996 2d6798bc9760f315d67cd93a75d3b746fbe538881f0d50d3acd2070f3e91379f |
| +@legacy 6dff08e12048cfef52df2f01f32736e9078870244fc4b18177b4d654b030d4a0 internal/grouprollaws/pty_unix.go runVersion legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads session-manager-plugin --version output, capped at 4 KiB file:Read@789 996b5cb79b292f5de0fcb42c5987eaf739ec27869e1744380e0d6f65deb639fd |
| +@legacy 04fe12d1b6361d680ee74f64c9aaab1a3861f158be69c2e60aeecb944c1912da internal/grouprollaws/session.go newNonce legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads crypto/rand for the frame nonce file:Read@49 7bba200ea8c254001d09c73841b2b454d95ea5015fb75840187c4612f28edb6e |
| +@legacy 4dc65f2a87ac20b4bbfb3b57bcdcd630e5e648ddee3571ac78981f4a76248fb1 internal/grouprollaws/transport.go boundBody.HandleDeserialize legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads an AWS API answer body under the 4 MiB cap file:ReadAll@436 020d98263efa2c56f212b20f4d3e3d9497ebc1a86d737c0ffc481cb1c48d38e8 |
| +@legacy 50ca60690b026dffe9bfdce05939612f8ea2fc96361639106943a5756e354601 internal/grouprollaws/transport.go boundedBody.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads an AWS API answer body under the 4 MiB cap and the read timeout file:Read@22,file:Read@448 7ff90cef635efcf75d046d9113cb6a0dcddd8dfb3570c73984bc5565b637e872 |
| +@legacy c307c31f57453dd5b80d525e90eec251923afbdd09d37785575d3ece702cedc6 system_group.go runSystemGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats /etc/carlos/host.env to refuse running on a carlos box (euid 0 is refused first); routes the roll verbs to the engine after refusing missing arguments file:Lstat@245 5ae37b736d72a8f6c04fcc5e04750d4ec59fc9f69cbf2c5aaa3c9ac72dbf2330 |
| +internal/grouproll/config.go LoadConfig legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads the operator's group config file named by --config (operator CLI only; refuses root) file:ReadFile@60 104fe171b8ce675aec5b764f43b1151bc9e9fba27d47c11b51b0bc7ea4065661 |
| +internal/grouproll/engine.go Engine.blocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats provider-divergence.json in the operator's own 0700 state directory (no symlink follow); any answer but not-found refuses as a damaged record file:Lstat@54 5eab2f9c41b12a03746b294a25a18a7fa5c4d6abc2196b59f05ba055daca0583 |
| +internal/grouproll/engine.go Engine.preflight legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads provider-observation.json from the operator's own 0700 state directory file:Read@713 20d6aa0e018217e8354c2f0dcf8ff82db2701b76ab22e669ccb692d714ccce7a |
| +internal/grouproll/journal.go Journal.read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads a format 2 journal from the operator's own 0700 state directory, capped at 64 MiB file:ReadAll@57 adb440d005959966ae0182557065f55ad8f4c3d223828f9ac290bda6e584e87f |
| +internal/grouproll/plan.go Engine.Plan legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads provider-observation.json from the operator's own 0700 state directory file:Read@2173 a9e81e1f0b1d88b56ba5181caa85b7a194faf1945fd8dbf501ee65b4a2d63444 |
| +internal/grouproll/roll.go Engine.Roll legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats a chosen transaction's journal name in the operator's own 0700 state directory (an existing one refuses before any call), then creates the journal through State.Create (O_NOFOLLOW, 0600) file:Create@936,file:Lstat@526 4cdb2e5e210d8b53bc012d952a351cc9abbb50ea1ebe80f96240a401004e65c5 |
| +internal/grouproll/roll.go Engine.closeLost legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats provider-divergence.json in the operator's own 0700 state directory to say it is kept file:Lstat@1182 96e6fdd05d2d1679cdf6cca8f8ca19ad1594ed03b750785e4d33894d8b7e2a55 |
| +internal/grouproll/state.go State.ActiveID legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lists and reads active-v2.json and journals in the operator's own state directory file:Lstat@1138,file:Lstat@74,file:Read@125,file:ReadDir@434 9d44b2accce767cd6b36f813e2b429f36b0a54201603bb9c23d62ae557af1784 |
| +internal/grouproll/state.go State.Create legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=creates a journal in the operator's own state directory (O_NOFOLLOW, 0600); the begin row records the caller's provider user id file:Create@16 58596801fe3b8491e12ccfa4bce99a2bea7bc10094ce8fc030684ceb248c59e6 |
| +internal/grouproll/state.go State.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads a small state file (65,536-byte cap) from the operator's own state directory file:Read@16,file:ReadAll@168 591dafeefdcdb3bf61135d1245169a1c5be53464809c623baf956775fec37516 |
| +internal/grouproll/state.go randomHex legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads crypto/rand for plan log and transaction names file:Read@56 354b626f961cb7bf467fda630527c1ffc8d16f927b6d14eace7054630ac61ae3 |
| +internal/grouproll/state_unix.go lstatOwner legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats the state directory and its ancestors to refuse symlinks and unsafe owners file:Lstat@83 98b0d85298b28884cc5a24ae07edec72762db01a5dd0e70dc9a6cf4b45a3589b |
| +internal/grouproll/state_unix.go privateFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=opens a state file O_NOFOLLOW and checks it is a private regular file owned by the caller file:Fstat@318,file:Open@84 2b689035c80437e3f3a8c99ef9e1e1970ee7d8087bcdca0bb276eab3b3d6ebef |
| +internal/grouproll/state_unix.go syncDirectory legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=opens the state directory to fsync it file:Open@52 5e53836f352bbeb3bc0518407e4db67d407331bcea784191693e94339a6c1520 |
| +internal/grouprollaws/group.go Adapter.TemplateRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads the launch template's user data from the EC2 answer (in memory, 4 MiB cap) file:ReadAll@1474 1fca0c893f4983a2a5e4d109e9c79eeaccb560255e9e0126a1db80103c36ff96 |
| +internal/grouprollaws/pty_linux.go openPTY legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=opens /dev/ptmx and the pts slave for the Session Manager plugin file:Open@421,file:Open@47 12f5a07caf7bb27f2cc8b0b2ac5da4074c1c073fa6f73da9816b5473115fd988 |
| +internal/grouprollaws/pty_unix.go pty.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads the plugin's pty output, capped at 4 MiB file:Read@996 2d6798bc9760f315d67cd93a75d3b746fbe538881f0d50d3acd2070f3e91379f |
| +internal/grouprollaws/pty_unix.go runVersion legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads session-manager-plugin --version output, capped at 4 KiB file:Read@789 996b5cb79b292f5de0fcb42c5987eaf739ec27869e1744380e0d6f65deb639fd |
| +internal/grouprollaws/session.go newNonce legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads crypto/rand for the frame nonce file:Read@49 7bba200ea8c254001d09c73841b2b454d95ea5015fb75840187c4612f28edb6e |
| +internal/grouprollaws/transport.go boundBody.HandleDeserialize legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads an AWS API answer body under the 4 MiB cap file:ReadAll@436 020d98263efa2c56f212b20f4d3e3d9497ebc1a86d737c0ffc481cb1c48d38e8 |
| +internal/grouprollaws/transport.go boundedBody.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=reads an AWS API answer body under the 4 MiB cap and the read timeout file:Read@22,file:Read@448 7ff90cef635efcf75d046d9113cb6a0dcddd8dfb3570c73984bc5565b637e872 |
| +system_group.go runSystemGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats /etc/carlos/host.env to refuse running on a carlos box (euid 0 is refused first); routes the roll verbs to the engine after refusing missing arguments file:Lstat@245 5ae37b736d72a8f6c04fcc5e04750d4ec59fc9f69cbf2c5aaa3c9ac72dbf2330 |
| +@coverage . d2b3e214d46199707d7f13503cff9be94bb0da41638983a350ec51a6de81d91c |
| +@coverage internal/grouproll 57dba69c114c9f4a7ba03c154c42c5a7e30edf590676f28c9b6b54e36dc22650 |
| +@coverage internal/grouprollaws d9bc632b24975cd6e6434b0c23439871a68e4b4659041e6e110ba8b8b5e96ffc |
| +@coverage internal/release e8d4983a8b37969c7d4ad9b99facf8332113f12f69c640b0b9624901184c9e54 |
diff --git a/parity/cli.tsv b/parity/cli.tsv| index 69d7236b8..e71ddec3e 100644 |
| --- a/parity/cli.tsv |
| +++ b/parity/cli.tsv |
| @@ -249,8 +249,14 @@ system floor-allows-prev box-local - - - - - |
| system geoip off operator - - - - - |
| system geoip publish operator - - - - - |
| system geoip status operator - - - - - |
| +system group abandon operator - - - - - |
| +system group close-lost operator - - - - - |
| system group plan operator - - - - - |
| +system group resume operator - - - - - |
| +system group return operator - - - - - |
| system group role operator - - - - - |
| +system group roll operator - - - - - |
| +system group rollback operator - - - - - |
| system group status operator - - - - - |
| system group-maintenance box-local - - - - - |
| system guard-arm box-local - - - - - |
diff --git a/parity/parity.tsv b/parity/parity.tsv| index 819b8695d..8d553a766 100644 |
| --- a/parity/parity.tsv |
| +++ b/parity/parity.tsv |
| @@ -210,7 +210,7 @@ op-system-layout operator operator system layout status ; system layout migrate |
| op-system-geoip operator operator system geoip publish ; system geoip status ; system geoip off The platform GeoIP database. |
| op-system-cutovers operator operator system seeds-floor publish ; system legacy-routes assign ; system lifetimes cutover ; system hosts-used status One-off cutovers and floors. |
| op-system-roles operator operator system box role ; system group role Box and group roles. |
| -op-system-group-roll operator operator system group plan ; system group status Group maintenance from an operator machine. |
| +op-system-group-roll operator operator system group plan ; system group status ; system group roll ; system group resume ; system group rollback ; system group return ; system group abandon ; system group close-lost Group maintenance from an operator machine. |
| op-system-demos operator operator system demos status ; system demos serving ; system demos takedown ; system demos takedown-status ; system demos reports ; system demos reports resolve Demo serving, takedowns and reports. |
| op-system-managed-fleets operator operator system managed-fleets show ; system managed-fleets set The managed-fleet catalog. |
diff --git a/system_group.go b/system_group.go| index 802e71fd4..c7059f8c2 100644 |
| --- a/system_group.go |
| +++ b/system_group.go |
| @@ -19,7 +19,8 @@ import ( |
| "github.com/carlosframework/platform/internal/grouprollaws" |
| ) |
| -// carlos system group plan|status (group roll verb spec §3-§4): the |
| +// carlos system group plan|status|roll|resume|rollback|return|abandon| |
| +// close-lost (group roll verb spec §3-§4): the |
| // script scripts/region-group-roll.py's main, ported. It runs on an |
| // operator machine as the deployment's operator account, takes flags only, |
| // and works from the group config file alone: it never opens a console |
| @@ -67,13 +68,21 @@ func processUser() string { |
| return u.Username |
| } |
| -// runSystemGroupPlan and runSystemGroupStatus are the registry's leaves. |
| -func runSystemGroupPlan(args []string) { os.Exit(runSystemGroup("plan", args)) } |
| -func runSystemGroupStatus(args []string) { os.Exit(runSystemGroup("status", args)) } |
| +// The registry's leaves. |
| +func runSystemGroupPlan(args []string) { os.Exit(runSystemGroup("plan", args)) } |
| +func runSystemGroupStatus(args []string) { os.Exit(runSystemGroup("status", args)) } |
| +func runSystemGroupRoll(args []string) { os.Exit(runSystemGroup("roll", args)) } |
| +func runSystemGroupResume(args []string) { os.Exit(runSystemGroup("resume", args)) } |
| +func runSystemGroupRollback(args []string) { os.Exit(runSystemGroup("rollback", args)) } |
| +func runSystemGroupReturn(args []string) { os.Exit(runSystemGroup("return", args)) } |
| +func runSystemGroupAbandon(args []string) { os.Exit(runSystemGroup("abandon", args)) } |
| +func runSystemGroupCloseLost(args []string) { os.Exit(runSystemGroup("close-lost", args)) } |
| // groupFlags are one verb's flags, as the script's argparse declares them. |
| type groupFlags struct { |
| config, attendedBy, member, sha, transaction string |
| + // transactionSet: --transaction was given, even empty. |
| + transactionSet bool |
| } |
| // groupRefused prints the script main's refusal line and returns its exit |
| @@ -114,10 +123,17 @@ func parseGroupFlags(verb string, args []string) (f groupFlags, rc int, ok bool) |
| fs.StringVar(&f.config, "config", "", grouproll.Text("config")) |
| fs.StringVar(&f.attendedBy, "attended-by", "", grouproll.Text("attended")) |
| switch verb { |
| - case "plan": |
| + case "plan", "roll", "rollback": |
| fs.StringVar(&f.member, "member", "", grouproll.Text("member")) |
| + } |
| + switch verb { |
| + case "plan", "roll": |
| fs.StringVar(&f.sha, "to-sha256", "", grouproll.Text("sha")) |
| - case "status": |
| + } |
| + switch verb { |
| + case "roll": |
| + fs.StringVar(&f.transaction, "transaction", "", grouproll.Text("roll_transaction")) |
| + case "rollback", "resume", "status", "return", "abandon", "close-lost": |
| fs.StringVar(&f.transaction, "transaction", "", grouproll.Text("transaction")) |
| } |
| if err := fs.Parse(args); err != nil { |
| @@ -134,9 +150,44 @@ func parseGroupFlags(verb string, args []string) (f groupFlags, rc int, ok bool) |
| if f.config == "" { |
| return f, groupRefused(grouproll.Refusal{Key: "config_required"}), false |
| } |
| + fs.Visit(func(fl *flag.Flag) { f.transactionSet = f.transactionSet || fl.Name == "transaction" }) |
| + if err := checkGroupArgs(verb, f); err != nil { |
| + return f, groupRefused(err), false |
| + } |
| return f, 0, true |
| } |
| +// checkGroupArgs refuses a verb's missing or malformed arguments before |
| +// any state, config or provider is touched: a chosen roll transaction id |
| +// the drain and fence verbs could not take (the script's main checked it |
| +// first), and an empty member, artifact or transaction where the verb |
| +// needs one (argparse's required arguments). |
| +func checkGroupArgs(verb string, f groupFlags) error { |
| + if verb == "roll" && f.transactionSet && (!grouproll.TX.MatchString(f.transaction) || |
| + strings.HasPrefix(f.transaction, "probe-") || strings.HasPrefix(f.transaction, "-")) { |
| + return grouproll.Refusal{Key: "record"} |
| + } |
| + switch verb { |
| + case "plan", "roll", "rollback": |
| + if f.member == "" { |
| + return grouproll.Refusal{Key: "config_invalid"} |
| + } |
| + } |
| + switch verb { |
| + case "plan", "roll": |
| + if f.sha == "" { |
| + return grouproll.Refusal{Key: "config_invalid"} |
| + } |
| + } |
| + switch verb { |
| + case "rollback", "resume", "status", "return", "abandon", "close-lost": |
| + if f.transaction == "" { |
| + return grouproll.Refusal{Key: "record"} |
| + } |
| + } |
| + return nil |
| +} |
| + |
| // attendedBy is the script's attended_by or SUDO_USER or getpass.getuser(). |
| func attendedBy(flagValue string) string { |
| if flagValue != "" { |
| @@ -209,7 +260,26 @@ func runSystemGroup(verb string, args []string) int { |
| return groupRefused(err) |
| } |
| e := grouproll.NewEngine(c, p, p, state, time.Now, time.Sleep, groupEnv.stdout, attended) |
| - ok, err = e.Plan(ctx, f.member, f.sha) |
| + e.ConfigPath = f.config |
| + ok = true |
| + switch verb { |
| + case "plan": |
| + ok, err = e.Plan(ctx, f.member, f.sha) |
| + case "roll": |
| + err = e.Roll(ctx, f.member, f.sha, f.transaction) |
| + case "resume": |
| + err = e.Resume(ctx, f.transaction) |
| + case "rollback": |
| + err = e.Rollback(ctx, f.member, f.transaction) |
| + case "return": |
| + err = e.Return(ctx, f.transaction) |
| + case "abandon": |
| + err = e.Abandon(ctx, f.transaction) |
| + case "close-lost": |
| + err = e.CloseLost(ctx, f.transaction) |
| + default: |
| + err = grouproll.Refusal{Key: "unsupported"} |
| + } |
| if err != nil { |
| if groupExitCode(err) == 130 { |
| return 130 |
diff --git a/system_group_test.go b/system_group_test.go| index 546e278bf..3a225982a 100644 |
| --- a/system_group_test.go |
| +++ b/system_group_test.go |
| @@ -282,3 +282,91 @@ func TestCLIGroupInterrupted(t *testing.T) { |
| t.Fatal("exit codes") |
| } |
| } |
| + |
| +// The roll leaves: each refuses a missing or malformed argument before |
| +// anything runs (argparse's required arguments; the script main's chosen |
| +// transaction check, before config or state), and with its arguments |
| +// reaches the provider after the shared files and isolation. |
| +func TestCLIGroupLeaves(t *testing.T) { |
| + member, sha := []string{"--member", "i-0123456789abcdef0"}, []string{"--to-sha256", strings.Repeat("b", 64)} |
| + tx := []string{"--transaction", "t-1"} |
| + join := func(parts ...[]string) []string { |
| + var out []string |
| + for _, p := range parts { |
| + out = append(out, p...) |
| + } |
| + return out |
| + } |
| + refusals := []struct { |
| + verb string |
| + args []string |
| + key string |
| + }{ |
| + {"roll", sha, "config_invalid"}, |
| + {"roll", member, "config_invalid"}, |
| + {"plan", member, "config_invalid"}, |
| + {"rollback", tx, "config_invalid"}, |
| + {"rollback", member, "record"}, |
| + {"resume", nil, "record"}, |
| + {"return", nil, "record"}, |
| + {"abandon", nil, "record"}, |
| + {"close-lost", nil, "record"}, |
| + {"roll", join(member, sha, []string{"--transaction", ""}), "record"}, |
| + {"roll", join(member, sha, []string{"--transaction", "probe-x"}), "record"}, |
| + {"roll", join(member, sha, []string{"--transaction", "../escape"}), "record"}, |
| + {"roll", join(member, sha, []string{"--transaction", strings.Repeat("x", 81)}), "record"}, |
| + } |
| + for _, c := range refusals { |
| + h := newGroupHarness(t) |
| + args := append([]string{"--config", h.config, "--attended-by", "op"}, c.args...) |
| + if rc := h.run(c.verb, args...); rc != 1 || h.stderr.String() != h.refused(c.key) || len(h.steps) != 0 { |
| + t.Errorf("%s %v: rc %d stderr %q steps %v", c.verb, c.args, rc, h.stderr.String(), h.steps) |
| + } |
| + } |
| + state := func(h *groupHarness) { |
| + if err := os.MkdirAll(filepath.Join(groupEnv.getenv("HOME"), ".local", "state", "carlos", "group"), 0o700); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + for verb, args := range map[string][]string{ |
| + "roll": join(member, sha), "resume": tx, "rollback": join(member, tx), |
| + "return": tx, "abandon": tx, "close-lost": tx, |
| + } { |
| + h := newGroupHarness(t) |
| + state(h) |
| + rc := h.run(verb, append([]string{"--config", h.config, "--attended-by", "op"}, args...)...) |
| + want := []string{"shared-files", "isolate example"} |
| + if rc != 1 || len(h.steps) < 2 || !reflect.DeepEqual(h.steps[:2], want) { |
| + t.Errorf("%s: rc %d steps %v stderr %q", verb, rc, h.steps, h.stderr.String()) |
| + continue |
| + } |
| + // The state directory's ancestors on a test machine may be group |
| + // writable; otherwise the provider is built and refuses. |
| + if len(h.steps) == 3 && h.stderr.String() != h.refused("api") { |
| + t.Errorf("%s: stderr %q", verb, h.stderr.String()) |
| + } |
| + } |
| + h := newGroupHarness(t) |
| + if rc := h.run("roll", "-h"); rc != 0 || !strings.Contains(h.stdout.String(), grouproll.Text("roll")) || |
| + !strings.Contains(h.stdout.String(), "-transaction") || !strings.Contains(h.stdout.String(), "-to-sha256") { |
| + t.Fatalf("help: rc %d %q", rc, h.stdout.String()) |
| + } |
| +} |
| + |
| +// test_tty_operator_identity_is_recorded: with no --attended-by, the |
| +// attending person is SUDO_USER, else the login name. |
| +func TestCLIAttendedByFallback(t *testing.T) { |
| + newGroupHarness(t) |
| + env := map[string]string{"SUDO_USER": "example-operator"} |
| + groupEnv.getenv = func(k string) string { return env[k] } |
| + if got := attendedBy(""); got != "example-operator" { |
| + t.Fatalf("SUDO_USER: %q", got) |
| + } |
| + env = map[string]string{} |
| + if got := attendedBy(""); got != "operator" { |
| + t.Fatalf("login: %q", got) |
| + } |
| + if got := attendedBy("named"); got != "named" { |
| + t.Fatalf("flag: %q", got) |
| + } |
| +} |
diff --git a/system_roles.go b/system_roles.go| index 95b91ebe4..e360d8d22 100644 |
| --- a/system_roles.go |
| +++ b/system_roles.go |
| @@ -134,6 +134,12 @@ func systemGroupCommand() *clireg.Node { |
| raw("role", clireg.Operator, runSystemGroupRole), |
| noHint(skipGolden(raw("plan", clireg.Operator, runSystemGroupPlan), groupVerbGolden)), |
| noHint(skipGolden(raw("status", clireg.Operator, runSystemGroupStatus), groupVerbGolden)), |
| + noHint(skipGolden(raw("roll", clireg.Operator, runSystemGroupRoll), groupVerbGolden)), |
| + noHint(skipGolden(raw("resume", clireg.Operator, runSystemGroupResume), groupVerbGolden)), |
| + noHint(skipGolden(raw("rollback", clireg.Operator, runSystemGroupRollback), groupVerbGolden)), |
| + noHint(skipGolden(raw("return", clireg.Operator, runSystemGroupReturn), groupVerbGolden)), |
| + noHint(skipGolden(raw("abandon", clireg.Operator, runSystemGroupAbandon), groupVerbGolden)), |
| + noHint(skipGolden(raw("close-lost", clireg.Operator, runSystemGroupCloseLost), groupVerbGolden)), |
| }, |
| Fallback: systemRolesFallback, |
| } |
diff --git a/testdata/clireg-golden.jsonl b/testdata/clireg-golden.jsonl| index 4bd622966..3238ee418 100644 |
| --- a/testdata/clireg-golden.jsonl |
| +++ b/testdata/clireg-golden.jsonl |
| @@ -803,10 +803,16 @@ |
| {"case":"system geoip | extra","argv":["system","geoip"],"exit":2,"stdout":"","stderr":"system geoip: no verb given\n\nusage: 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 geoip | help","argv":["system","geoip","help"],"exit":2,"stdout":"","stderr":"system geoip: unknown verb \"help\"\n\nusage: 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 geoip | zz-unknown","argv":["system","geoip","zz-unknown"],"exit":2,"stdout":"","stderr":"system geoip: unknown verb \"zz-unknown\"\n\nusage: 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 abandon | skipped","skipped":"refuses root and carlos boxes before it reads its arguments, -h included"} |
| +{"case":"system group close-lost | skipped","skipped":"refuses root and carlos boxes before it reads its arguments, -h included"} |
| {"case":"system group plan | skipped","skipped":"refuses root and carlos boxes before it reads its arguments, -h included"} |
| +{"case":"system group resume | skipped","skipped":"refuses root and carlos boxes before it reads its arguments, -h included"} |
| +{"case":"system group return | skipped","skipped":"refuses root and carlos boxes before it reads its arguments, -h included"} |
| {"case":"system group role x y --zz z | extra","argv":["system","group","role","x","y","--zz","z"],"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 role | --zz-unknown-flag","argv":["system","group","role","--zz-unknown-flag"],"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 role | -h","argv":["system","group","role","-h"],"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 roll | skipped","skipped":"refuses root and carlos boxes before it reads its arguments, -h included"} |
| +{"case":"system group rollback | skipped","skipped":"refuses root and carlos boxes before it reads its arguments, -h included"} |
| {"case":"system group status | skipped","skipped":"refuses root and carlos boxes before it reads its arguments, -h included"} |
| {"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-flag","argv":["system","group","--zz-unknown-flag"],"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"} |