carlos / platform Public

docs: name the W6 residual where a rollback drains then refuses

rootFloorDowngradeIdle runs only inside the activation guard's ledger
transaction, so a rollback below the running release on a box with root
moves required and an armed floor can drain and then be refused. The box
stays withdrawn until the 3-minute exit's clean restart; clients see no
errors. Spec §5.3 and the runbook say so (controller ruling 25).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 5c6d0f03b2b91c3a05dc2e069098550852feda8a parent b135182
2 files changed, +2 −2
  • docs/region-ha-runbook.md +1 −1
  • docs/superpowers/specs/2026-11-10-fixed-edge-ingress-drain-design.md +1 −1

Intent

Human

<task-notification> <task-id>bjpgennzo</task-id> <tool-use-id>toolu_01VRYL2YHFurZcvAGLPgdg1d</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/a373aecd-faa9-4b83-8736-ff726fb2d3af/tasks/bjpgennzo.output</output-file> <status>completed</status> <summary>Background command "Wait for both fix-wave re-reviews" completed (exit code 0)</summary> </task-notification>

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

diff --git a/docs/region-ha-runbook.md b/docs/region-ha-runbook.md
index c48189c20..1f714babe 100644
--- a/docs/region-ha-runbook.md
+++ b/docs/region-ha-runbook.md
@@ -182,7 +182,7 @@ A fixed box that is a target of a region's load balancer takes itself out of the
Every planned stop of the edge drains on its own:
-- `carlos system apply` and `carlos system rollback` ask for the drain after their own checks pass and before they change anything. An apply of the release already installed, or a refusal, restarts nothing and asks for no drain.
+- `carlos system apply` and `carlos system rollback` ask for the drain after their own checks pass and before they change anything. An apply of the release already installed, or a refusal, restarts nothing and asks for no drain. One case can still drain and then refuse: on a box with root moves required and an armed floor, a rollback below the running release can be refused after its drain by a check that runs only at the binary swap. The box then stays out of the load balancer until the agent's 3-minute exit, a clean shutdown and restart. Clients see no errors, because the load balancer had already withdrawn the box.
- `systemctl restart carlos-edge`, `systemctl stop carlos-edge`, a reboot and a poweroff run the drain through `carlos-edge-drain.service`. That unit is started with the edge, and its stop runs the drain before any tenant or the edge stops.
Expect a planned stop to take 30 to 60 seconds longer than before, and up to about 2 minutes 20 seconds at worst. The box's own hosts (fixed, non-HA hosts it serves) are unreachable for that extra time. After the restart, the load balancer sends the box new traffic only after two passing health checks, about 20 seconds after tenant admission opens. The other targets carry the traffic in the meantime.
diff --git a/docs/superpowers/specs/2026-11-10-fixed-edge-ingress-drain-design.md b/docs/superpowers/specs/2026-11-10-fixed-edge-ingress-drain-design.md
index 18a3f615b..f07928b9e 100644
--- a/docs/superpowers/specs/2026-11-10-fixed-edge-ingress-drain-design.md
+++ b/docs/superpowers/specs/2026-11-10-fixed-edge-ingress-drain-design.md
@@ -106,7 +106,7 @@ Group=carlos
Rollback restores `carlos.prev` over `/opt/carlos/carlos` and then installs the older unit set, which lacks the drain unit, before it restarts the edge (`internal/host/systemapply.go:2063-2098`). By the time the drain unit stopped, its `ExecStop` would run the old binary, which has no `__ingress-drain`. So `apply` and `rollback` ask for the drain themselves, **before** they quiesce and swap anything, through the drain-call child they already use for group maintenance (`internal/host/hadrain_call.go`): root re-executes its own pinned `/proc/self/exe` (the binary running the verb, not the file on disk), which drops to the agent's user and dials the socket. The verb waits for the report and prints it. If the verb then fails before it restarts the edge, the agent's 3-minute exit (§4.2) restores service.
-A verb that will not restart the edge (a refusal, a no-op apply of the same release) asks for no drain. The verb asks only after its own refusals and preflight checks have passed, including a dry run of the activation guard's checks (the root protocol check on the binary, the moves floor and hold rule) and the quiesce's group maintenance permit, so a refusal never follows a drain. `carlos-system-update.service`'s `TimeoutStartSec` gains 300 s: an apply whose gate fails asks twice (install, then rollback).
+A verb that will not restart the edge (a refusal, a no-op apply of the same release) asks for no drain. The verb asks only after its own refusals and preflight checks have passed, including a dry run of the activation guard's checks (the root protocol check on the binary, the moves floor and hold rule) and the quiesce's group maintenance permit, so almost no refusal follows a drain. One residual remains: the guard's `rootFloorDowngradeIdle` check runs only inside the guard's ledger transaction, so on a box with root moves required and an armed floor, a rollback below the running release can drain and then be refused. The box then stays out of the load balancer until the agent's 3-minute exit, which is a clean shutdown and restart; clients see no errors, because the target groups had already withdrawn it. `carlos-system-update.service`'s `TimeoutStartSec` gains 300 s: an apply whose gate fails asks twice (install, then rollback).
**Not drained: anything a pre-W6 binary runs.** That is the first roll onto W6, and also an automatic rollback or recovery that the pre-W6 verb process runs during that first roll if the new agent fails its gate (`internal/host/systemapply.go:675`, `:730`): the old process cannot ask, and the binary it restores has no helper.