host: witness a fleet box's startup HA pass never waits on reconcileMu
Re-proposes the #964 census overlay on main's chain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+68
−0
docs/superpowers/notes/census-proposal-fleet-skip-ha-ingress-scan.md+19 −0internal/host/haingress_fleet_test.go+43 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-fleet-skip-ha-ingress-scan.tsv+5 −0
CI passed — run details
Intent
Attributed to this commit: 26.4 g CO₂e (2,292,069 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on fleet-skip-ha-ingress-scan, 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/notes/census-proposal-fleet-skip-ha-ingress-scan.md b/docs/superpowers/notes/census-proposal-fleet-skip-ha-ingress-scan.md| new file mode 100644 |
| index 000000000..7693dd0ae |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-fleet-skip-ha-ingress-scan.md |
| @@ -0,0 +1,19 @@ |
| +# Census approval: fleet-skip-ha-ingress-scan |
| + |
| +Ruling `census-ruling-fleet-skip-ha-ingress-scan`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/host/haingress.go` `refreshHAIngressAtStart` | body | unchanged (1) | a fleet box (region a fleet placement) reads no records at startup and does not wait on reconcileMu; it publishes the empty projection only where none exists (CompareAndSwap from nil), so a published refusal marker stands (#964); every other box unchanged | |
| + |
| +Envelopes re-pinned: `internal/host`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `internal/host/haingress.go` `refreshHAIngressAtStart`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Serialize a bounded startup refresh with instance reconciliation; use armed RecordView or the extracted judged record scan, then publish HA metadata. New indirect record/account/manifest/lifetime reads reuse existing store/judge paths. |
| + |
| +Seal: `c6655e82e81ccd2a7547655eb393ec3fd10bba396255a1edb30d59b7ad1e682e` → `30b6ee553f864b11c18481ce747ad98d696de462e2cb9bec5832b01c2e224104`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-fleet-skip-ha-ingress-scan.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/host/haingress_fleet_test.go b/internal/host/haingress_fleet_test.go| index fe108121c..0af9897ca 100644 |
| --- a/internal/host/haingress_fleet_test.go |
| +++ b/internal/host/haingress_fleet_test.go |
| @@ -2,9 +2,11 @@ package host |
| import ( |
| "context" |
| + "errors" |
| "path/filepath" |
| "strings" |
| "testing" |
| + "time" |
| "github.com/carlosframework/platform/internal/registry" |
| "github.com/carlosframework/platform/internal/release" |
| @@ -98,3 +100,44 @@ func isolateHAIngress(t *testing.T) { |
| boxAssetAuthority = oldAuthority |
| }) |
| } |
| + |
| +// #964 (b): a fleet box's startup HA ingress refresh does not wait on |
| +// reconcileMu, so a reconcile pass already in flight (or the first fast |
| +// tick's) is never held behind it. A platform box still serializes with the |
| +// instance pass: with reconcileMu held, its refresh waits out the attempt. |
| +func TestHAIngressStartupFleetBoxDoesNotHoldReconcile(t *testing.T) { |
| + for _, c := range []struct { |
| + name, region string |
| + waits bool |
| + }{ |
| + {"fleet", "fleet/acme", false}, |
| + {"platform box", "ie", true}, |
| + } { |
| + t.Run(c.name, func(t *testing.T) { |
| + t.Setenv("CARLOS_REGION", c.region) |
| + t.Setenv("CARLOS_REGION_HA", "1") |
| + isolateHAIngress(t) |
| + reconcileMu.Lock() |
| + defer reconcileMu.Unlock() |
| + opened := false |
| + ctx, cancel := context.WithTimeout(t.Context(), 300*time.Millisecond) |
| + defer cancel() |
| + err := refreshHAIngressAtStart(ctx, func(context.Context) (release.Store, error) { |
| + opened = true |
| + return startupAliasStore{newCICountingStore(t)}, nil |
| + }, newBoxJudge(claimsOffEnv)) |
| + if c.waits { |
| + if !errors.Is(err, context.DeadlineExceeded) || opened { |
| + t.Fatalf("platform box: err=%v opened=%v, want it to wait on reconcileMu", err, opened) |
| + } |
| + return |
| + } |
| + if err != nil || opened { |
| + t.Fatalf("fleet box: err=%v opened=%v, want an immediate return without the store", err, opened) |
| + } |
| + if r := boxHAIngress.routes.Load(); r == nil || len(*r) != 0 { |
| + t.Fatalf("fleet box: projection %v, want the empty one", r) |
| + } |
| + }) |
| + } |
| +} |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index c30c10e7f..12988c77b 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -225,3 +225,4 @@ plan14-root-reads-flat-plans.tsv 66404a2fb26ea541e99d9c3d3bd87cb3f2a346eda95cdb7 |
| plan14-root-reads-sr-followups.tsv da718fcd010b3c1db861196e0bbb9121723a9857ad16c2a15a329983688b8981 |
| plan14-root-reads-close-direct-s3-fleet-writes.tsv c6655e82e81ccd2a7547655eb393ec3fd10bba396255a1edb30d59b7ad1e682e |
| plan14-root-reads-fleet-drain-followups.tsv c6655e82e81ccd2a7547655eb393ec3fd10bba396255a1edb30d59b7ad1e682e |
| +plan14-root-reads-fleet-skip-ha-ingress-scan.tsv 30b6ee553f864b11c18481ce747ad98d696de462e2cb9bec5832b01c2e224104 |
diff --git a/internal/provision/testdata/plan14-root-reads-fleet-skip-ha-ingress-scan.tsv b/internal/provision/testdata/plan14-root-reads-fleet-skip-ha-ingress-scan.tsv| new file mode 100644 |
| index 000000000..06e9fd315 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-fleet-skip-ha-ingress-scan.tsv |
| @@ -0,0 +1,5 @@ |
| +# Census overlay fleet-skip-ha-ingress-scan, written by census-propose (#369). census-ruling-fleet-skip-ha-ingress-scan, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-fleet-skip-ha-ingress-scan.md. |
| +# 1 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +@legacy 840e69d371ad863ca59696fa41194f3d7e010ce21242f121b004d3ebf0619df5 internal/host/haingress.go refreshHAIngressAtStart legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Serialize a bounded startup refresh with instance reconciliation; use armed RecordView or the extracted judged record scan, then publish HA metadata. New indirect record/account/manifest/lifetime reads reuse existing store/judge paths.;rev3=census-ruling-fleet-skip-ha-ingress-scan;basis=a fleet box (region a fleet placement) reads no records at startup and does not wait on reconcileMu; it publishes the empty projection only where none exists (CompareAndSwap from nil), so a published refusal marker stands (#964); every other box unchanged whole:Route@1817 903a857f4a8ecb2376a1b4c5f3fffedb59921f064b97ca901d674ea23e17d8d0 |
| +internal/host/haingress.go refreshHAIngressAtStart legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Serialize a bounded startup refresh with instance reconciliation; use armed RecordView or the extracted judged record scan, then publish HA metadata. New indirect record/account/manifest/lifetime reads reuse existing store/judge paths.;rev3=census-ruling-fleet-skip-ha-ingress-scan;basis=a fleet box (region a fleet placement) reads no records at startup and does not wait on reconcileMu; it publishes the empty projection only where none exists (CompareAndSwap from nil), so a published refusal marker stands (#964); every other box unchanged whole:Route@1817 903a857f4a8ecb2376a1b4c5f3fffedb59921f064b97ca901d674ea23e17d8d0 |
| +@coverage internal/host 8f7a34324fe2c0efdc9f9bfc7d64340da5ce644d31ac013f2ec9febf5bda81ed |