| index 1f73bf28f..26ec8d6a6 100644 |
| --- a/testdata/clireg-golden.jsonl |
| +++ b/testdata/clireg-golden.jsonl |
| @@ -819,12 +819,12 @@ |
| {"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":0,"stdout":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n","stderr":""} |
| -{"case":"system group | --zz-unknown-flag","argv":["system","group","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n"} |
| -{"case":"system group | -h","argv":["system","group","-h"],"exit":0,"stdout":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n","stderr":""} |
| -{"case":"system group | bare","argv":["system","group"],"exit":2,"stdout":"","stderr":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n"} |
| -{"case":"system group | help","argv":["system","group","help"],"exit":2,"stdout":"","stderr":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n"} |
| -{"case":"system group | zz-unknown","argv":["system","group","zz-unknown"],"exit":2,"stdout":"","stderr":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n"} |
| +{"case":"system group | --help","argv":["system","group","--help"],"exit":0,"stdout":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n role <region> <default|legacy>\n","stderr":""} |
| +{"case":"system group | --zz-unknown-flag","argv":["system","group","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n role <region> <default|legacy>\n"} |
| +{"case":"system group | -h","argv":["system","group","-h"],"exit":0,"stdout":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n role <region> <default|legacy>\n","stderr":""} |
| +{"case":"system group | bare","argv":["system","group"],"exit":2,"stdout":"","stderr":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n role <region> <default|legacy>\n"} |
| +{"case":"system group | help","argv":["system","group","help"],"exit":2,"stdout":"","stderr":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n role <region> <default|legacy>\n"} |
| +{"case":"system group | zz-unknown","argv":["system","group","zz-unknown"],"exit":2,"stdout":"","stderr":"Attended maintenance of one member of a region's Auto Scaling group: roll it to a new release, replace it, or remove it, one transaction at a time. Run it from the deployment's operator account.\n\n plan Read readiness and list refusals. It changes no group or box state.\n roll Roll one member to the named artifact.\n replace Drain one member, terminate it and let the group launch its replacement.\n remove Drain one member and terminate it without a replacement (scale-in).\n rollback Restore this transaction's old artifact while in Standby.\n resume Resume from the durable journal and current provider state.\n return Return an already restarted and admitted member.\n status Read the saved journal without contacting AWS.\n abandon Close a transaction that has no group write intent.\n close-lost Close an active transaction after confirming that its member is gone. Record failure.\n cancel-drain End a failed drain of this member: drain --cancel on the box, which lifts the fence.\n probe Probe an unchanged member through Auto Scaling Standby under the group lock.\n role <region> <default|legacy>\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 --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"} |