ha: note the capacity observer's store is read-only
Comment-only follow-ups from the final fix re-review (P3). Also re-runs CI after the gate step died with signal: terminated (#359).
internal/console/hacapacity_observe.go+3 −0internal/release/openers_test.go+3 −1
CI passed — run details
Intent
<task-notification> <task-id>bzufu6qww</task-id> <tool-use-id>toolu_01GrzWaPyRYL6oY6MKaWBVnQ</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/de069047-3c6a-40e7-ae66-85194f066976/tasks/bzufu6qww.output</output-file> <status>completed</status> <summary>Background command "Wait for final fix wave" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>a5a6c8f9223519d12</task-id> <tool-use-id>toolu_01DAvYuHbq7tKd36LSUCm4r4</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/de069047-3c6a-40e7-ae66-85194f066976/tasks/a5a6c8f9223519d12.output</output-file> <status>completed</status> <summary>Agent "Re-review final fix wave (Opus)" 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>All four CI fixes and the depth cap check out. I found no new P1 or P2 in the fix diff (f9eadab3..e951b577). I ran no tests; everything below comes from reading the code and diffs. **1. 9B8 census re-pin: ADDRESSED, honest.** - I diffed `attachDomainAs` from the main merge parent (6209ce43) to HEAD. The function has exactly two kinds of change. Its `doorRefusal` literals were converted to keyed fields. And a new gate, `s.haRegion("")` → `readRecord` → `requireHACreateCapacity`, sits at `internal/console/domainattach.go:227-239`. That gate runs before `attachClaimFirstRoute` and before the `CreateRecord` path. - The census reason at `internal/provision/demo_census_test.go:48-51` describes exactly that. Class (`record-writer`), site (`key:CreateRecord`) and path/function are unchanged. Only that one entry's digest moved. No other entry, overlay or census mechanism was touched, so this is not a blanket weakening. **2. S3 opener classification: ADDRESSED.** - `newHACapacityStore` builds an `S3Store` literal at `hacapacity_observe.go:57`. That literal is used only for `GetObject` (l.95), `ListObjectsV2` (l.169) and the read-only edges page (l.127). Writes go through the embedded original `release.Store` (the console's change-indexed deployment store), not the literal. - So `otherBucketOpeners` with count 1 is the right class, and the reason ("read-only, one-attempt, never writes") is accurate (`internal/release/openers_test.go:45`). - Entries are matched per key and per count, so adding one does not loosen the check for any other opener. **3. Static-create test: ADDRESSED, no exemption.** - The change is test-only: one line, `createCapacityEvidence(t, w.fx.srv, "allow", nil)` at `internal/console/ha_born_test.go:214`. - The gate's production call sites are unchanged (`apiinstances.go:2340`, `apisidecars.go:422`, `domainattach.go:235`), and `hacreate_test.go:343` still lists static among the HA create cases. **4. Linux edges body: ADDRESSED.** - `"named_pools":[]` is inserted before `burst_notices` at `internal/host/egress_nopolicy_linux_test.go:388`. That matches the struct order at `internal/host/edgesfile.go:336-343`. - The base constant `mainNoPolicyEdges` has no `named_pools`, so the field is not duplicated. **B. haJSON depth cap: ADDRESSED; malformed can never become zero.** - The check is `depth >= haCapacityJSONDepthLimit` → `errHACapacity`, at `internal/console/hacapacity.go:75-77`, with the outermost container at depth 0. That allows 10,000 containers and refuses the 10,001st, which matches the boundary test. - Every production caller treats any non-nil `haJSON` result as malformed or invalid. None checks for `errHACapacity` specifically, so a refusal cannot fall through to zero: - `hacapacity_observe.go:240` marks the status as bad. - l.381 sets `f.malformed`. - l.457 and l.491 return `identity_malformed`. - `hacapacity.go:116` treats it as invalid config. - `hacapacity.go:377` sets `capsOK=false`. - `TestHACapacityJSONDepthLimit` covers depths 9,999, 10,000 and 10,001 for arrays and objects. Its 1 MiB case runs through the real observer and asserts `!Complete`, `HACapacityUnknown` and the `edges_malformed` blocker. **P3s:** - P3: the top-of-file doc in `internal/release/openers_test.go:23-29` still says a hand-built `S3Store` literal over the deployment bucket belongs in `deploymentManualSites`. Only the map comment at l.42-43 was widened, so the two now disagree. - P3: the `newHACapacityStore` entry depends on `b.s3` staying read-only. A future `b.s3.Put` would skip the change-index bump and the opener test would not catch it. A short comment at `hacapacity_observe.go:57` would guard this.</result> <usage><subagent_tokens>74750</subagent_tokens><tool_uses>13</tool_uses><duration_ms>116034</duration_ms></usage> </task-notification>
<task-notification> <task-id>b77qf7wgv</task-id> <tool-use-id>toolu_01AtCVm11ggC6Qj6aRosbk5u</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/de069047-3c6a-40e7-ae66-85194f066976/tasks/b77qf7wgv.output</output-file> <status>completed</status> <summary>Background command "Poll CI until finished" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 29.8 g CO₂e (3,847,388 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-p2b-build, 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/internal/console/hacapacity_observe.go b/internal/console/hacapacity_observe.go| index 089ec9072..819eb1969 100644 |
| --- a/internal/console/hacapacity_observe.go |
| +++ b/internal/console/hacapacity_observe.go |
| @@ -54,6 +54,9 @@ func newHACapacityStore(s release.Store, directory string) release.Store { |
| switch s := s.(type) { |
| case *release.S3Store: |
| client := awss3.New(s.Client.Options(), func(o *awss3.Options) { o.Retryer = aws.NopRetryer{}; o.RetryMaxAttempts = 1 }) |
| + // b.s3 is read-only (GET and LIST). A write through it would skip |
| + // the change-index bump, and openers_test classifies it as a |
| + // read-only observer; writes go through the embedded Store. |
| b.s3 = &release.S3Store{Client: client, Bucket: s.Bucket} |
| case *release.DirStore: |
| b.directory = directory |
diff --git a/internal/release/openers_test.go b/internal/release/openers_test.go| index c8eff14e5..de411b4a0 100644 |
| --- a/internal/release/openers_test.go |
| +++ b/internal/release/openers_test.go |
| @@ -27,7 +27,9 @@ import ( |
| // S3Store literal over the deployment bucket: listed in |
| // deploymentManualSites, and the test checks the same function calls |
| // EnableChangeIndex at least once per site; |
| -// - anything else: listed in otherBucketOpeners with the reason. |
| +// - a read-only observer of the deployment bucket, which never writes |
| +// and so needs no change-index bump, or anything else: listed in |
| +// otherBucketOpeners with the reason. |
| // |
| // Keys are "path/from/module/root.go:enclosingFunc". Every entry carries the |
| // number of sites it covers, and the test fails when the count found under |