carlos / platform Public

plan: G3 fixes additions (edges readers, fast retire, replay, flake)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 422d2e88092ef5b88ee02dcb02fcf0f259aaab80 parent 82b30f0
1 file changed, +70 −0
  • docs/superpowers/plans/2026-11-07-region-ha-g3-fixes.md +70 −0

Intent

Human

<task-notification> <task-id>bswogl418</task-id> <tool-use-id>toolu_01HrDXFaAbBsvJbWHo3bVuN5</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/f72ef775-81b3-4d2e-a18d-c8edb14aa192/tasks/bswogl418.output</output-file> <status>completed</status> <summary>Background command "sleep 15; .superpowers/sdd/2026-11-07-region-ha-g3-fixes/wait.sh fw2" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>a63c5c2748e3ea095</task-id> <tool-use-id>toolu_013ASYq9gPzSVcG6PwFFeS6j</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/f72ef775-81b3-4d2e-a18d-c8edb14aa192/tasks/a63c5c2748e3ea095.output</output-file> <status>completed</status> <summary>Agent "Re-review revert + census delta" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>The fix wave is good: all three requested items are done, A2/A4/A5 are unchanged, there are no new P1 or P2 problems, and the census is APPROVED. The full results are in `.superpowers/sdd/2026-11-07-region-ha-g3-fixes/fw2-review.md`. - **Item 1 (revert A1): ADDRESSED.** The missing-record check and its call are gone (`hadepartures_scan.go:316-319`). The old A1 test (`hadepartures_g3_test.go:666`) now checks the restored behaviour. A deleted record whose lock still names the dead box no longer stalls the departure. The edges file stays until the remaining host is superseded, then the departure completes. - **Item 2 (comment): ADDRESSED.** `:312-313` is now one short, accurate comment, still at the decision point. - **Item 3 (census re-proposal): ADDRESSED.** - **A2, A4, A5 unchanged.** - A2: `complete()` still reads the edges file before the delete and rebinds after verifying (`:510-553`). - A4: Cursor is saved as 0 (`:131`, `:331`, `:351`). The new `len(current)` check (`:370`) counts the same as the old Cursor did. - A5: the comment at `:126-127` is in place. - **Compared with f81cfd5c:** besides the comments, the only changes left are A4 and A2's read before the delete. Departure completion otherwise matches f81cfd5c. - **No new P1, P2 or P3.** The G3 departure tests pass and gofmt is clean. - **Census delta: all APPROVE.** - The dropped `checkMissingDepartureHosts` was only ever in the unmerged proposal, so it did not move anywhere and needs no removal row. - `ScanPass` lost two read sites (the arguments to the removed call). It reads nothing new and keeps the same disposition. Its claim now correctly says removed records drop out of coverage. - The count is now 7 new dispositions instead of 8. The seal and chain line moved to 9b8a6f53, and only `internal/host` was re-pinned. - None of the rejection criteria are met. - **Census tests:** `go test ./internal/provision/ -run Census -count=1` passes at 82b30f05. The first run failed inside the sandbox because it could not write the Go cache, so I re-ran it outside, as the brief allowed. **Census verdict: APPROVED.**</result> <usage><subagent_tokens>73035</subagent_tokens><tool_uses>14</tool_uses><duration_ms>207928</duration_ms></usage> </task-notification>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="67e49fc8-d383-414a-989f-a1d20573f62b"> Agent manager 8a3d302: Paul adopted Fable&apos;s step-back plan (~/.cache/region-ha-next/fable-stepback/out.md). ADD to this branch before merge: (A) an AUDIT of every reader of control/edges/ (steering, domains/aliases, wildcard certs, departures, hosts-used/history, forwarding/backhaul, housekeeper, metrics, anything else): for each, rule it group-member-aware or member-blind, record where and why, fix the ones that are wrong, and write the result into the spec (a new section, with the rule for future readers). (B) A production-wired REPLAY test on a flagship-shaped, anonymised record and edges set (4 fixed boxes, ~70 steered names, ~60 custom-domain aliases, per-account wildcards, 2-3 g- files including a terminated member), run through the steering, domains, departures and hosts-used passes under write churn. Assert no invalid steering change, aliases stable, and the dead member retired. (C) For departures: a terminated member with EC2 proof and a released or expired lease must retire WITHOUT waiting on a full inventory walk (target within 5 min under churn). The Fable review is round 1; keep the three-round limit. Census, CI, merge under the standing approval. Release v0.34.21 is RESERVED for this branch: don&apos;t cut it yourself; tell me when it&apos;s merged. </paseo-system>

Human

<task-notification> <task-id>bvxedept3</task-id> <tool-use-id>toolu_01GzK9J3NWqk7ibAcBshVEYn</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/f72ef775-81b3-4d2e-a18d-c8edb14aa192/tasks/bvxedept3.output</output-file> <status>completed</status> <summary>Background command "sleep 100; until amadan ci status carlos/platform -branch region-ha-g3-fixes &gt;/dev/null 2&gt;&amp;1; rc=$?; [ $rc -le 1 ]; do sleep 60; done; amadan ci status carlos/platform -branch region-ha-g3-fixes 2&gt;&amp;1 | grep -v '^20[0-9][0-9]/\|^go: downloading' | grep -E 'CI |--- FAIL|step|terminated|panic' | head -20" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 36.6 g CO₂e (4,374,864 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 4bb577212..b59c6ba66 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
@@ -172,3 +172,73 @@ all, stop and report instead of changing it.
Files: internal/provision/recordview.go, internal/host/haingress.go (+
tests). Review: whole-branch review.
+
+## Additions (Paul adopted the step-back plan, 2026-11-07 ~16:20Z, via 8a3d302)
+
+Review rounds so far: R1 whole-branch (Fable) READY; R2 fix-wave re-review found
+one P1 (reverted); the additions below are reviewed in R3, the last round.
+
+## Task 5: audit every reader of control/edges/ and write the rule into the spec
+
+Every subsystem that reads edges files met its first group member (`g-`
+file: named_pools only, serves_shared_pool false, 0 hosts, accepts_inbound
+true) on the flagship and several broke (steering F4, W2b housekeeper, W3
+departures, hostname history, hosts-used floor). Do:
+1. Audit (read-only, separate step): list every reader of `control/edges/`
+ (steering, domains/aliases, wildcard certs, departures, hosts-used and
+ hostname history, forwarding/backhaul and the holder cache, housekeeper,
+ metrics, console capacity observation, anything else; find them by code
+ search, not by this list). For each: file:line, what it uses the files
+ for, what it does today with a group member's file and with a dead
+ member's stale file, the rule (member-aware: must treat members
+ specially, and how; or member-blind: correct for any box), and whether
+ today's code is right.
+2. Fix every reader the audit rules wrong, with a test each.
+3. Spec: add a section to
+ docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md
+ ("Readers of edges files") with the audit table and the rule for future
+ readers (a new reader must state which it is, and a group member's file
+ must never be assumed to carry hosts, aliases, steering eligibility or
+ housekeeper candidacy).
+
+## Task 6: a terminated member retires without a full inventory walk
+
+Target: a terminated member with EC2 proof and a released or expired lease
+retires (edges file deleted, receipt acked) within 5 minutes under write
+churn, on a ~260-record deployment with several departures pending.
+Locks a dead box can own or have released live only in its data scope's
+bucket (`instances/<host>/lock.json`). At the start of each walk (after the
+departure's ObservedAt), list that bucket's lock objects once; inventory
+records with no lock object there are covered without a read and do not
+count toward the 32-read page budget; previously seen hosts are always
+read. If the listing fails (e.g. AccessDenied), fall back to today's full
+walk and log it once. Check the box roles' IAM (fixed boxes and group
+members) grants s3:ListBucket on the data bucket for `instances/`; if not,
+add it in infra modules (not applied here) and say so. Production-wired
+test: 260 records, one HA host, dead lease expired or released, one write
+every 30 s, three departures pending: finalize ≤ 5 min after proof. Keep
+the safety invariant and the seeded simulation (extend it with the listing).
+
+## Task 7: flagship-shaped replay test
+
+A production-wired replay over an anonymised flagship-shaped world: 4 fixed
+boxes (home ie ~320 hosts, us/au/uk ~75 each), ~70 steered names, ~60
+custom-domain aliases, per-account wildcards, 3 `g-` member files in one
+region (one terminated, with EC2 proof and an expired lease), run through
+the real steering, domains/aliases, departures and hosts-used passes for
+several cycles under record-write churn. Assert: no invalid steering change
+(Route 53 fake enforces the regional latency rule and atomic batches), no
+member ever a steering target, aliases stable (no alias removed or moved),
+wildcards unchanged, hosts-used/hostname history unaffected by members,
+the dead member retired within 5 min. Shapes: anonymised templates of a
+real fixed-box and member edges file in the SDD workspace `shapes/`.
+Never use tenant names.
+
+## Task 8: flaky console perf budget
+
+`TestPerfWriteRoutesMeetTheBudget` (internal/console/perfwrites_test.go
+~:350) failed on CI at 82b30f05 ("ship: median 543.8 ms ... budget 500ms")
+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).