plan: G3 fixes task 9 (region-host takes an existing alerts topic)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/plans/2026-11-07-region-ha-g3-fixes.md+20 −0
Intent
<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="9e80eef0-ef61-4208-98dd-82fdafa64967"> Agent manager 8a3d302: one more small task for this branch (T9; it rides v0.34.21): the region-host module must accept an EXISTING alerts topic. Add an input such as alerts_topic_arn: when set, the group alarms (capacity, clock, clock-missing, memory, suspect-holder, termination queue) and the launch-failed EventBridge rule target that ARN, and the module creates NO topic or subscription; alerts_email stays for the create path. Module tofu tests for both paths. Reason: the flagship gets a permanent carlos-flagship-us-ha-alerts topic outside the module (carloku-infrastructure PR #34, report ~/.cache/region-ha-next/US-HA-ALERTS-TOPIC.md), and today the only safe setting is alerts_email = "", which leaves every group alarm without an action. </paseo-system>
Attributed to this commit: 42.4 g CO₂e (5,306,168 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-g3-fixes, 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/superpowers/plans/2026-11-07-region-ha-g3-fixes.md b/docs/superpowers/plans/2026-11-07-region-ha-g3-fixes.md| index b59c6ba66..afb3971c0 100644 |
| --- a/docs/superpowers/plans/2026-11-07-region-ha-g3-fixes.md |
| +++ b/docs/superpowers/plans/2026-11-07-region-ha-g3-fixes.md |
| @@ -242,3 +242,23 @@ with console code that passed twice before: a wall-clock budget on a shared |
| CI worker. Make it robust without hiding regressions (e.g. assert the S3 |
| request counts it already measures and keep wall-clock as a generous |
| guard, or take the best of several runs). |
| + |
| +## Task 9: region-host accepts an existing alerts topic (8a3d302, rides v0.34.21) |
| + |
| +The flagship gets a permanent `carlos-flagship-us-ha-alerts` topic outside |
| +the module (carloku-infrastructure PR #34). Today the only safe setting is |
| +`alerts_email = ""`, which leaves every group alarm without an action, and |
| +the G3 topic was destroyed with the group before its email was confirmed. |
| +Add an input `alerts_topic_arn` (default "") to infra/modules/region-host: |
| +when set, every alarm and rule that today targets the module's own alerts |
| +topic (group alarms: capacity, clock, clock-missing, memory, |
| +suspect-holder, termination queue; the launch-failed EventBridge rule |
| +target; and the fixed-mode alarms in main.tf that use the same topic) |
| +targets that ARN, the box's publish permission (alert_publish.tf) covers |
| +it, and the module creates NO topic, subscription or topic policy. Setting |
| +both `alerts_topic_arn` and `alerts_email` is refused by a validation with a |
| +clear message. `alerts_email` keeps today's create path unchanged. The |
| +alerts-topic output returns the ARN in use. Module tofu tests |
| +(infra/modules/region-host/tests) for both paths and the refusal, in both |
| +fixed and group mode; existing tests unchanged. README of the module |
| +updated. No apply. |