carlos / platform Public

host: align CI tests with G2R forwarding and retry cadence

Refresh the asset name-producer inventory after the backhaul change.
Exercise the 30-second doubling retry cadence through the real host
reconcile path, including read boundaries and the five-minute cap.
Implemented-by: Astra (codex)
claude pushed by paul@keymail.dev 99f7c983f62dc4b1a1d598b08e355f4b5c76a240 parent 1104380
2 files changed, +46 −34
  • internal/host/group_names_test.go +2 −1
  • internal/host/poolwithdrawal_live_test.go +44 −33

CI failed — run details

Intent

Human

<task-notification> <task-id>a9de4a8331b1c26c2</task-id> <tool-use-id>toolu_01GnGksGWLQs4xz1GjJVGXru</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/87a21814-5655-4016-9e7e-41935ee8e96e/tasks/a9de4a8331b1c26c2.output</output-file> <status>completed</status> <summary>Agent "Census review W2b 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>I approve the census for `region-ha-g2r-fixes` at 11043807, with one note below. 1. **The re-pinned `internal/host` envelope: approved.** The only code change is one new case in `newHousekeeper` (`internal/host/housekeeper.go`). When `CARLOS_BOX_REFERENCE` is set to `group`, the box goes to `housekeeperNever` and never contends for the housekeeper lease. That value comes from the box's own environment file, which root provisions. No tenant, app or box agent can write or name it. The change only adds a refusal, placed before the bucket and directory cases, so there is no new path, read, query or follow. No check, refusal, validation, argument or environment a recorded basis relies on is weakened. Fixed boxes still contend for the lease as before. The new file `housekeeper_group_test.go` is test-only. Only the `internal/host` coverage hash moved (8e13242e… to b38e274b…); the activator, edge and provision coverage hashes are unchanged. 2. **Units unchanged since 36bff577 apart from the seal: approved, with one exception.** The dispositions, tasks and approved bases are the same, and the seal moved to 5c6f157c…. - The exception is the card row for `Edge.ServeHTTP`. Its basis text now reads "GET/HEAD or an unswitched upgrade, no body" where it used to read "GET/HEAD no body", and its `@legacy` record hash changed (8ea56dbb… to fde65e49…). - No edge code changed in this range. The approved code at 36bff577 already allows upgrades in the holder follow (`internal/edge/backhaul_holder.go:188` checks `isUpgradeRequest(r)`). - So the new wording corrects the description to match code that was already approved. It does not widen anything. 3. **`go test ./internal/provision/ -run TestPlan14RootReadCensus -count=1`: passed** (9.2s). Census: approved</result> <usage><subagent_tokens>53331</subagent_tokens><tool_uses>6</tool_uses><duration_ms>53301</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bxszjtrvw</task-id> <tool-use-id>toolu_01TKnmMvoAQ8MUydvjpgWx9v</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/87a21814-5655-4016-9e7e-41935ee8e96e/tasks/bxszjtrvw.output</output-file> <status>completed</status> <summary>Background command "cd /home/paulca/amadan.net/carlos/platform/.claude/worktrees/g2r-fixes; echo "Census: re-proposed 11043807 after T7 (+ Luna apply 707641a3); delta census review dispatched; CI on 11043807" &gt;&gt; .superpowers/sdd/2026-11-06-region-ha-g2r-fixes/progress.md; for i in $(seq 1 170); do s=$(amadan ci status carlos/platform -branch region-ha-g2r-fixes 2&gt;&amp;1 | head -1); echo "$s" | grep -q "running\|queued\|pending" || break; sleep 20; done; echo "$s"" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 7.64 g CO₂e (957,292 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-g2r-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/internal/host/group_names_test.go b/internal/host/group_names_test.go
index 21ea46122..a4ff5458f 100644
--- a/internal/host/group_names_test.go
+++ b/internal/host/group_names_test.go
@@ -416,7 +416,8 @@ var groupNameProducerInventory = map[string]string{
"../domains/reconcile.go:Reconcile": "8b2848535d0a15117d578ac28c7486997c6ad8960b58b6dca5d4b35cde14eed0",
"../domains/reconcile.go:mintedRoute": "dbd2211f62fc606661c6d8258ecfbf18f0b3c865e775522c5b363d01c442fca9",
"../edge/assetcatch.go:*Edge.AssetOwners": "2b9ce5620a6defa16f12cb38d389ac59aa594049d37d84746f0a76419ab05b5f",
- "../edge/assetcatch.go:*Edge.serveAssetFar": "7d358ec272ae74c05764504550bad461096a09d0bfcc108dcbe5485f8f68d643",
+ // Name resolution and owner binding unchanged in class; farForward now resolves owner and destination from one snapshot via backhaul; no new name class produced.
+ "../edge/assetcatch.go:*Edge.serveAssetFar": "775ee62d683e07fbcee8a9ea21e03b0b364a5d07aadef8f333da37985c2eaa9b",
// Demo protections wrap existing proxies and retain refusal-only names.
// They do not derive or publish a new group-name class. The site demo API
// proxy is built over an existing exact console row and publishes no name.
diff --git a/internal/host/poolwithdrawal_live_test.go b/internal/host/poolwithdrawal_live_test.go
index 121bada86..64efae1cb 100644
--- a/internal/host/poolwithdrawal_live_test.go
+++ b/internal/host/poolwithdrawal_live_test.go
@@ -70,6 +70,13 @@ func testPoolWithdrawalLiveAgentTicks(t *testing.T, during, failing bool) {
if err := provision.CreateRecord(t.Context(), store, rec); err != nil {
t.Fatal(err)
}
+ view := provision.NewRecordView(store, release.NewChangeWatch(store))
+ if err := view.Rebuild(t.Context()); err != nil {
+ t.Fatal(err)
+ }
+ if !view.Snapshot().Complete {
+ t.Fatal("incomplete record view")
+ }
b := armableBackend(t)
b.Cfg = activator.Config{Bucket: fx.Bucket, Region: "eu-west-1", Prefix: "instances", Idle: time.Hour, Record: haRecordFacts(func(context.Context) (release.Store, error) { return store, nil }, nil)}
b.Registry, b.DataDir, b.RunDirOverride = reg, pcfg.DataDir, t.TempDir()
@@ -117,7 +124,7 @@ func testPoolWithdrawalLiveAgentTicks(t *testing.T, during, failing bool) {
defer log.SetOutput(prior)
tick := func() {
t.Helper()
- if err := reconcileSerializedAuth(t.Context(), store, reg, pcfg, nil, newAssetAuthority(nil)); err != nil {
+ if err := reconcileSerializedAuth(t.Context(), view.Snapshot().Store(store), reg, pcfg, nil, newAssetAuthority(nil)); err != nil {
t.Fatal(err)
}
}
@@ -161,43 +168,47 @@ func testPoolWithdrawalLiveAgentTicks(t *testing.T, during, failing bool) {
if reads == 0 {
t.Fatal("no record reads observed before backoff")
}
- for range 4 {
- clock = clock.Add(time.Minute)
+ for i, delay := range []time.Duration{30 * time.Second, time.Minute, 2 * time.Minute, 4 * time.Minute, 5 * time.Minute, 5 * time.Minute} {
+ started := clock
+ proofs := int32(i + 1)
+ for _, elapsed := range []time.Duration{0, delay - time.Nanosecond} {
+ clock = started.Add(elapsed)
+ bs.refreshAll(t.Context())
+ tick()
+ if got := store.reads.Load(); got != reads {
+ t.Fatalf("backoff %s at %s read the store: before=%d after=%d starts=%d", delay, elapsed, reads, got, logs.starts.Load())
+ }
+ if logs.starts.Load() != proofs || logs.cgroups.Load() != proofs {
+ t.Fatalf("backoff %s at %s restarted proof: starts=%d pending=%d", delay, elapsed, logs.starts.Load(), logs.cgroups.Load())
+ }
+ if row, err := reg.Get(rt.Host); err != nil || row == nil || !svc.Fenced(rt.Host) {
+ t.Fatalf("failed proof lost row or fence: row=%+v err=%v", row, err)
+ }
+ }
+ clock = started.Add(delay)
bs.refreshAll(t.Context())
tick()
- if got := store.reads.Load(); got != reads {
- t.Fatalf("backoff read the store: before=%d after=%d starts=%d", reads, got, logs.starts.Load())
+ select {
+ case line := <-logs.done:
+ if !strings.Contains(line, "code=cgroup") {
+ t.Fatal(line)
+ }
+ case <-time.After(5 * time.Second):
+ t.Fatalf("reported failure prevented retry after %s backoff", delay)
}
- if row, err := reg.Get(rt.Host); err != nil || row == nil || !svc.Fenced(rt.Host) {
- t.Fatalf("failed proof lost row or fence: row=%+v err=%v", row, err)
+ if logs.starts.Load() != proofs+1 || logs.cgroups.Load() != proofs {
+ t.Fatalf("expiry after %s did not start one new proof: starts=%d pending=%d", delay, logs.starts.Load(), logs.cgroups.Load())
}
- }
- if logs.starts.Load() != 1 {
- t.Fatalf("backoff restarted proof: starts=%d", logs.starts.Load())
- }
- clock = clock.Add(time.Minute)
- tick()
- select {
- case line := <-logs.done:
- if !strings.Contains(line, "code=cgroup") {
- t.Fatal(line)
+ if got := store.reads.Load(); got <= reads {
+ t.Fatalf("retry after %s did not read fresh record: before=%d after=%d", delay, reads, got)
}
- case <-time.After(5 * time.Second):
- t.Fatal("reported failure prevented retry after backoff")
- }
- if logs.starts.Load() != 2 || logs.cgroups.Load() != 1 {
- t.Fatalf("expiry did not start one new proof: starts=%d pending=%d", logs.starts.Load(), logs.cgroups.Load())
- }
- time.Sleep(1100 * time.Millisecond)
- tick()
- if logs.cgroups.Load() != 2 {
- t.Fatalf("next tick did not consume retry failure: pending=%d", logs.cgroups.Load())
- }
- reads = store.reads.Load()
- clock = clock.Add(time.Minute)
- tick()
- if store.reads.Load() != reads || logs.starts.Load() != 2 {
- t.Fatalf("retry failure did not back off: before=%d after=%d starts=%d", reads, store.reads.Load(), logs.starts.Load())
+ t.Logf("backoff=%s: no reads before deadline; retried at deadline, starts=%d", delay, logs.starts.Load())
+ time.Sleep(1100 * time.Millisecond)
+ tick()
+ if logs.cgroups.Load() != proofs+1 {
+ t.Fatalf("next tick did not consume retry failure: pending=%d", logs.cgroups.Load())
+ }
+ reads = store.reads.Load()
}
return
}