Add an on/off switch for the MAS facility.

MAS-WP-0007 is finished. power.sh scales the MX and statute together
and records the power annotation. apply.sh keeps an off facility off.
The live facility was annotated power=on and was not restarted.

Assistant: grok
Assistant-Session: 01a198fa-fd27-7e41-a0a2-57355c3e4efd
This commit is contained in:
tegwick 2026-11-01 22:46:46 +01:00
parent b108e89af4
commit f18eb0b8df
12 changed files with 344 additions and 36 deletions

View file

@ -4,7 +4,7 @@ type: workplan
title: "Operate MAS as a switchable facility"
domain: communication
repo: mail-address-semantics
status: active
status: finished
owner: claude
topic_slug: coulomb-social
created: "2026-10-18"
@ -20,7 +20,7 @@ Residual of MAS-WP-0003. Namespace `mas` is the MAS facility for
`mas.coulomb.social`, with replies through Scaleway TEM capped at 300.
It stays. The 2026-10-19 retirement backlog is withdrawn.
**Founder decision (2026-11-01): keep it, and make it switchable.** Do not
**Founder decision (2026-11-01, `4d38ed47-8ab1-419e-839c-92921f7eeef1`): keep it, and make it switchable.** Do not
delete the namespace, revoke the TEM key, remove DNS, or tear down the
OpenBao role. Operate the existing facility so mail and the statute can
be turned off and back on without discarding evidence, credentials, or
@ -91,7 +91,7 @@ images.
```task
id: MAS-WP-0007-T02
status: todo
status: done
priority: high
state_hub_task_id: "18d8898e-52c9-572d-aa7c-014fb1f7751e"
```
@ -103,11 +103,16 @@ switchable parts and the limits above. The release-unit note stops
calling this something other than the operated facility. Historical
workplans and `history/` stay as they were.
Done 2026-11-01. `SCOPE.md`, INTENT.md criterion 5, `deploy/railiance/README.md`,
the manifest header, and `registry/release-units/mas.yaml` describe the
switchable facility. The 300-reply cap, side-loaded image, and snakeoil
SMTP TLS are recorded as limits.
## Add the power switch
```task
id: MAS-WP-0007-T03
status: todo
status: done
priority: high
state_hub_task_id: "78a11c89-7cda-5ff7-bd0a-b7958b6c9fe7"
```
@ -124,11 +129,19 @@ ingress.
On the cluster, record `power=on` to match the running facility. Do not
scale it to 0 and do not roll a new image.
Done 2026-11-01. `deploy/railiance/power.sh` and `apply.sh`, with
`facility.py` doing the render. Live: `power.sh on` with the railiance01
admin kubeconfig annotated namespace `mas` as `power=on`, scaled both
Deployments to 1, and both were already ready. Pod start times stayed
`mas-mx` 2026-10-21T22:18:00Z and `mas-statute` 2026-10-19T11:36:30Z.
`power.sh status` shows `power=on`, both Deployments 1/1, and endpoints
for `mas-smtp` and `mas-statute`. No new image.
## Test the switch offline
```task
id: MAS-WP-0007-T04
status: todo
status: done
priority: high
state_hub_task_id: "3f458be1-a8c8-5b05-96e8-851294e36d60"
```
@ -137,3 +150,5 @@ Test the render without a cluster. Power `off` sets both Deployment
replicas to 0 and leaves the Service, PVC, Ingress, and ExternalSecret
in place. Power `on` leaves `replicas: 1`. The image placeholder is
replaced. The operator command has no delete of those durable objects.
Done 2026-11-01. `tests/test_facility_power.py`: 4 passed.