Fleet public routes Task 12: the hub's instance pass forwards, and the request budget
BoxProvisionConfig(reg, getenv, judge, configure) replaces boxProvisionConfig: provisionTickConfig reads the getenv given, and on the hub (hubArmed) the pass carries FleetOwners = hubFleetOwners(reg), the hub's own fleets table read on each call. fleetArmInputs now takes its owners from hubFleetOwners, so the forward phase and the edge's fleet arm judge by one map. Every other box leaves FleetOwners nil and its forward phase only retires. fastConvergeLoop and instancesLoop pass their reg and os.Getenv; the source pins and the four test callers move to the new name. TestForwardRequestBudget is spec §6's comparative test: the production pass set over identical buckets on a dormant and an armed hub, a fleet app on canary/x. The steady-state difference is exactly the trash marker, the telemetry pair (index off), the owner's limits; plus one instance-prefix List with an instance catch-all, and the record and slot GETs of two instances sharing a label. The edges file gains one PUT when the row appears. Spec §7 records Task 12's card.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md+25 −3internal/host/agent.go+20 −11internal/host/changeindex_test.go+1 −1internal/host/fleet_forward_budget_test.go+459 −0internal/host/hawake_wiring_test.go+2 −1internal/host/hub.go+23 −6internal/host/lifetime_gating_test.go+1 −1internal/host/policycache_wiring_test.go+9 −7internal/host/sizestatus_test.go+5 −4internal/provision/reconcile.go+1 −1
CI failed — run details
Intent
<task-notification> <task-id>a4c17b74700baa3f2</task-id> <tool-use-id>toolu_01816R72zmUPb4h1soc7yB7x</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/a4c17b74700baa3f2.output</output-file> <status>completed</status> <summary>Agent "Implement Task 11: console" 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>**Status: DONE.** All four rulings are in one commit, `f68b4fae`, on top of `724f5379`, not pushed. The failing backfill subtest now passes. **Tests:** the four new or extended tests failed on `724f5379` and pass now, and all 7 mutations were caught. The 347 tests in the 22 related console test files pass, as do the root CLI, region-label and copy-gate tests. `TestPlan9B8RecordWriteCensus` passes after re-pinning `placeAppTarget`; `handleAPIInstanceList`'s pin is unchanged. gofmt, vet and the darwin, windows and linux/arm64 builds are clean. The census card is unchanged (no unit, same seal), and §7 records the fix round. **What changed:** 1. **Unplace (option A):** - An unplace now calls a new `clearLegacyPlacement`. It runs before the records and clears the fleet from the app's own non-forward rows on the console's box, using `registry.SetPlacement(host, "")`. That is the narrowest existing setter, and its statement already skips forward rows. A place onto a fleet still writes no row. - A new `legacyFleetFromRoutes` (`fleetFromRoutes` minus forward rows) is now read by `appPlacement` and both backfill reads in `sealkey.go`. - I also switched `fleetPlacedApps` (`fleetsecretskey.go`) to it, because its doc says it reads placement the way `appPlacement` does. That's one site beyond the ruling. - The display readers keep `fleetFromRoutes`, as the spec wants. - The new test sets up a legacy hand row and a forward row, then places and unplaces. After that, a new instance gets the region it asked for, not the old fleet, and the backfill writes no fleet. 2. **C08 accuracy:** no C08 when the row is the same app, placed on the record's own fleet, and its account is the record's or empty. The account condition goes beyond your ruling: the edge only serves such a row toward the fleet in that case, so another account's app with the same name still shows C08. Tests cover all three cases (same fleet, another fleet, another account). 3. **CLI sanitising:** I reused the CLI's existing `cleanPlace` rule from `region_labels.go`, generalised as `cleanConsoleText(s, max)`, because its 128-byte limit is shorter than the C08 sentence. `reasonCell` prints `route_held` through it with a 512-byte limit. Text that fails is dropped rather than stripped, and the cell falls through to the next reason. 4. **Spec §4.7:** now describes what the unplace writes and why, the C08 rule, and the fleet-page and Fleet-tab lag as a stated limitation. **Remaining concerns:** - An unplace now stops a legacy placed row (railsdemo-style) from being served toward its fleet, exactly as unplace did before Task 11. §4.7 says so. - `cleanConsoleText` drops bad text instead of stripping it, so a C08 sentence with a control character would show no REASON at all. The report is appended to `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-public-routes/.superpowers/sdd/2026-10-30-fleet-public-routes/task-11-report.md`.</result> <usage><subagent_tokens>290121</subagent_tokens><tool_uses>123</tool_uses><duration_ms>2443846</duration_ms></usage> </task-notification>
<task-notification> <task-id>ace32b179ec826ef4</task-id> <tool-use-id>toolu_016EUR8FzZ2g3DbTypjhMCmn</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/ace32b179ec826ef4.output</output-file> <status>completed</status> <summary>Agent "Review Task 11: console" 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>Spec compliance: ✅ compliant. Task quality: Approved. No critical or important findings. - **Minor** (`apiinstances.go:520`): C08 treats any forward row at the host as "not held", even one that belongs to another account, app or fleet. The spec keeps such a row at a host two records collide on, so in that case the caller's requests reach someone else's fleet and no C08 shows. The brief asked for exactly this rule, the case only arises in a collision, and nothing leaks. - **Minor** (`apiinstances.go:523`): the "served toward the fleet" clause is a partial copy of `edge.FleetServeEligible` rather than a call to it. It skips the `rt.Tunnel == ""` check, the fleet-owner check and the ready check. So a same-app, same-fleet legacy row that has a `Tunnel` shows no C08 even though requests go to that tunnel. - **Minor** (`regionfacts.go:133`): the doc comment on `fleetFromRoutes` still calls it `appPlacement`'s fallback, but `appPlacement` now uses `legacyFleetFromRoutes`. `legacyFleetFromRoutes` also repeats the same loop, and `sealkey.go:201` is now an over-long comment line. - **Minor** (report evidence): the implementer's accidental full console run showed `TestControlPlane*` failing on the buildvcs trap and one test timing out under load. Both predate this task and are unrelated, but they are noise in the evidence. CI's full run is the check. On your focus points: - **Tenancy:** `route_held` and health only look at the caller's own records, and the sentence names only the record's own fleet. No other account's information can leak. - **Unplace:** it clears only the app's own non-forward rows. A new instance or a console restart no longer gets the old fleet back. - **Copy:** C08 matches the approved row byte for byte. - **Platform apps:** nothing changes for them. - **Tests:** the 6 migrated tests still test something real, and the reported mutations line up with assertions that would catch them. I ran `TestInstanceListNamesTheHeldHost` and `TestUnplaceLeavesNoFleetBehind` at f68b4fae, and both pass. The review is at `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-public-routes/.superpowers/sdd/2026-10-30-fleet-public-routes/task-11-review.md`.</result> <usage><subagent_tokens>141232</subagent_tokens><tool_uses>12</tool_uses><duration_ms>230239</duration_ms></usage> </task-notification>
<cross-session-message from="uds:/run/user/1001/cc-socks/3178442.sock" from-name="platform-6e" from-mode="bypass"> From platform-6e (#457 managed fleets; #451 merged as 4029ac56): after v0.31.2 reaches dev in the next hour or so, I plan to reboot dev fleet box box-1 (r10r) once, to prove a rebooted box serves again within about 2 minutes instead of about 15. railsdemo and shop (your 1a witness) on box-1 will be dark for the reboot, roughly 1 to 2 minutes, and I'll probe both while it runs. I won't touch box-1's config or the apps. Is there a window where that would break your 1a work (a build or drill running against shop)? Reply "go" or "hold until <time/condition>". Also: when 1a merges, please ping me; #457's 1b plan waits on it. The 1b addendum (records name their box; the forward row carries it as FleetBox from the start) is in docs/superpowers/specs/2026-10-28-managed-fleets-design.md on design-managed-fleets-457. </cross-session-message>
Attributed to this commit: 30.2 g CO₂e (3,895,943 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-fleet-public-routes, 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/specs/2026-10-29-fleet-public-routes-design.md b/docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md| index cf663973c..07cfe27f4 100644 |
| --- a/docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md |
| +++ b/docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md |
| @@ -1084,9 +1084,11 @@ Units, by file (N = new, R = removed, otherwise a changed body or sites): |
| - `internal/domains/aliases.go`: `ReconcileAliasesReport` (no wildcard |
| parent for a refused primary; Task 6 fix round 2, card under |
| `edgesfile.go` below). |
| -- `internal/host/agent.go`: `boxProvisionConfig` (hub predicate, owner map, |
| - reads `Fleet.Name`, `Fleet.Account`); `instancesLoop` (hub-only |
| - bindings); `countExpiredCanaries` (skip). The hub predicate `hubArmed` |
| +- `internal/host/agent.go`: `boxProvisionConfig`, now `BoxProvisionConfig` |
| + (hub predicate; the owner map, reading `Fleet.Name` and |
| + `Fleet.Account`, is `internal/host/hub.go` `hubFleetOwners`, Task 12); |
| + `fastConvergeLoop` (Task 12: its pass config call); `instancesLoop` |
| + (hub-only bindings); `countExpiredCanaries` (skip). The hub predicate `hubArmed` |
| is in a new file, `internal/host/hub.go`. Neither `instancesLoop`'s |
| change nor `hubArmed` shows on Task 1's card: `hubArmed` reads its |
| environment through its `getenv` parameter and `instancesLoop` gained |
| @@ -1343,6 +1345,26 @@ Units, by file (N = new, R = removed, otherwise a changed body or sites): |
| `fleetPlacedApps`), outside the root scope; `placeAppTarget`'s 9B8 |
| digest is re-pinned again. |
| + Task 12's card, reconciled with this list. `fastConvergeLoop`: `body`, |
| + read sites unchanged (2), keeps authority: its pass config is now |
| + `BoxProvisionConfig(reg, os.Getenv, judge, configure)`, a call and no |
| + read site (reverting that one line takes the unit off the card). |
| + `hubFleetOwners` (new, `hub.go`: `+registry:Account`, `+registry:Name`, |
| + `+whole:Fleet` x2): the hub's `ReconcileConfig.FleetOwners`, the |
| + fleets table read on each call. Those are the reads Task 6 listed under |
| + `fleetArmInputs`, which now takes its owners from `hubFleetOwners` so |
| + the forward phase and the edge's fleet arm judge by one map; |
| + `fleetArmInputs` keeps no read site and leaves the card. |
| + `BoxProvisionConfig` replaces `boxProvisionConfig`, which was never on |
| + the card: it reads its environment through its `getenv` parameter |
| + (`hubArmed(getenv)`, `provisionTickConfig(getenv)`) and the owner map |
| + through `hubFleetOwners`, so it has no read site. `instancesLoop` |
| + gained only an argument and is not on the card. Envelopes re-pinned: |
| + `internal/host`, and `internal/provision` (a comment naming |
| + `BoxProvisionConfig`). No unit on the card for Task 12 is missing from |
| + this list, and none listed here for Task 12 is missing from the card; |
| + the seal is unchanged (`78b7e7e3...`). |
| + |
| Root's own row readers (adopt, capability, named units, restart, stage, |
| rootfs, `layoutReversalIncomplete`) change no code and select by |
| `Kind == "instance"`, `IsSidecar()`, `Unit`, `Runtime`, `Backing`, |
diff --git a/internal/host/agent.go b/internal/host/agent.go| index d13a2b653..8d2a63fb4 100644 |
| --- a/internal/host/agent.go |
| +++ b/internal/host/agent.go |
| @@ -3268,7 +3268,7 @@ func fastConvergeLoop(reg *registry.Registry, svc *activator.Service, sd *schedu |
| legs := &passLegs{store: store, reg: reg, pub: pub, optDir: optDir, restart: restart, opts: opts, |
| priv: priv, dd: dd, svc: svc, writes: writes, bs: bs, |
| cfg: func() provision.ReconcileConfig { |
| - return boxProvisionConfig(judge, configure) |
| + return BoxProvisionConfig(reg, os.Getenv, judge, configure) |
| }} |
| d.fullPass = legs.full |
| // The change index (S3 change-index design §4.5): an index-only change |
| @@ -3554,15 +3554,21 @@ func provisionTickConfig(getenv func(string) string) provision.ReconcileConfig { |
| return cfg |
| } |
| -// boxProvisionConfig is one reconcile pass's Config on this box, from |
| -// either provisioning loop (fastConvergeLoop's full pass, instancesLoop): |
| -// provisionTickConfig from the environment, the claim configuration, the |
| -// box's lifetime judge (newBoxJudge; nil with host claims on), the |
| -// process's one app policy cache (armPolicyCache) and the size nudge |
| -// (noteSizeChanged). Pinned by TestProvisioningLoopsShareThePolicyCache |
| -// and TestPolicyChangedNotesTheSize. |
| -func boxProvisionConfig(judge *provision.LifetimeJudge, configure []func(*provision.ReconcileConfig)) provision.ReconcileConfig { |
| - cfg := configuredClaimProvision(provisionTickConfig(os.Getenv), configure) |
| +// BoxProvisionConfig is one reconcile pass's Config on this box, from |
| +// either provisioning loop (fastConvergeLoop's full pass, instancesLoop), |
| +// which both call it with os.Getenv: provisionTickConfig from getenv, the |
| +// claim configuration, the box's lifetime judge (newBoxJudge; nil with host |
| +// claims on), the process's one app policy cache (armPolicyCache) and the |
| +// size nudge (noteSizeChanged). On the hub (hubArmed) it arms the forward |
| +// phase with the owners of reg's fleets table (hubFleetOwners, fleet public |
| +// routes spec §4.3); on every other box FleetOwners stays nil and the phase |
| +// only retires any forward row the box holds. Exported for the root |
| +// package's end-to-end witness, which builds a hub's and a fleet box's pass |
| +// config in one process. Pinned by TestProvisioningLoopsShareThePolicyCache, |
| +// TestPolicyChangedNotesTheSize and |
| +// TestBoxProvisionConfigArmsForwardingOnTheHubOnly. |
| +func BoxProvisionConfig(reg *registry.Registry, getenv func(string) string, judge *provision.LifetimeJudge, configure []func(*provision.ReconcileConfig)) provision.ReconcileConfig { |
| + cfg := configuredClaimProvision(provisionTickConfig(getenv), configure) |
| cfg.Judge = judge |
| cfg.Policies = armedPolicyCache.Load() |
| // A converge that moved a row's policy columns tells the activator, so |
| @@ -3572,6 +3578,9 @@ func boxProvisionConfig(judge *provision.LifetimeJudge, configure []func(*provis |
| // The process's one lifetime index, which the activator reads before |
| // every wake of a provisioned instance (region HA P1a). |
| cfg.Lifetimes = boxLifetimes |
| + if hubArmed(getenv) { |
| + cfg.FleetOwners = hubFleetOwners(reg) |
| + } |
| return cfg |
| } |
| @@ -3866,7 +3875,7 @@ func instancesLoop(reg *registry.Registry, writes hostwrite.Config, bs *buildSta |
| log.Printf("agent: instances loop disabled: %v", err) |
| return |
| } |
| - cfg := boxProvisionConfig(judge, configure) |
| + cfg := BoxProvisionConfig(reg, os.Getenv, judge, configure) |
| backfill := newClaimBackfill(writes, store, cfg.ReleasePub, os.Getenv("CARLOS_DEPLOYMENT_BUCKET")) |
| log.Printf("agent: instances loop armed (5min + jitter), region %q pools %v", cfg.Region, cfg.Pools) |
| // Hub only (fleet public routes spec §4.5 step 4): a fleet box |
diff --git a/internal/host/changeindex_test.go b/internal/host/changeindex_test.go| index a8d7fc7ce..7797d2d2a 100644 |
| --- a/internal/host/changeindex_test.go |
| +++ b/internal/host/changeindex_test.go |
| @@ -754,7 +754,7 @@ func TestBackstopEveryIsJitteredAroundTheBackstop(t *testing.T) { |
| // delivered. Nothing under cafe's prefix, nothing for cafe's build state, |
| // and nothing box-wide (edges files, domain claims, the app policy |
| // backstop's listing of control/app-policy/) is read. The passes share the |
| -// process's policy cache as boxProvisionConfig hands it, and the scoped |
| +// process's policy cache as BoxProvisionConfig hands it, and the scoped |
| // pass runs after the policy backstop fell due (#328, #329): the listing |
| // waits for the next full pass. |
| func TestScopedPassTouchesOnlyMovedApp(t *testing.T) { |
diff --git a/internal/host/fleet_forward_budget_test.go b/internal/host/fleet_forward_budget_test.go| new file mode 100644 |
| index 000000000..a366d2aba |
| --- /dev/null |
| +++ b/internal/host/fleet_forward_budget_test.go |
| @@ -0,0 +1,459 @@ |
| +package host |
| + |
| +// Fleet public routes, Task 12: the hub's instance pass runs the forward |
| +// phase (spec §4.3), and what that costs the bucket (spec §6). |
| +// |
| +// Accounts as in edgesfile_forward_test.go: fpOwner (domains.Sqid(7), "bah") |
| +// owns fleet home, fpOther (domains.Sqid(8), "baj") owns no fleet and runs |
| +// the hub's one platform app. |
| + |
| +import ( |
| + "context" |
| + "crypto/ed25519" |
| + "encoding/json" |
| + "fmt" |
| + "maps" |
| + "path/filepath" |
| + "reflect" |
| + "slices" |
| + "strings" |
| + "sync" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/domains" |
| + "github.com/carlosframework/platform/internal/plans" |
| + "github.com/carlosframework/platform/internal/provision" |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| + "github.com/carlosframework/platform/internal/telemetry" |
| +) |
| + |
| +// TestBoxProvisionConfigArmsForwardingOnTheHubOnly: the hub's pass config |
| +// carries FleetOwners, read from the hub's own fleets table on each call, |
| +// the same owners the edge's fleet arm judges by (fleetArmInputs); every |
| +// other box's config leaves it nil, so its forward phase only retires. |
| +func TestBoxProvisionConfigArmsForwardingOnTheHubOnly(t *testing.T) { |
| + reg := testRegistry(t) |
| + if err := reg.UpsertFleet(registry.Fleet{Name: "home", Account: fpOwner, Bucket: "home-data"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + hub := envOf(map[string]string{"CARLOS_TUNNEL_HOST": fpTunnel}) |
| + cfg := BoxProvisionConfig(reg, hub, nil, nil) |
| + if cfg.FleetOwners == nil { |
| + t.Fatal("the hub's pass config has no FleetOwners: the forward phase is dormant on the hub") |
| + } |
| + got, err := cfg.FleetOwners() |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if want := map[string]string{"home": fpOwner}; !reflect.DeepEqual(got, want) { |
| + t.Fatalf("FleetOwners() = %v, want %v", got, want) |
| + } |
| + |
| + // Read on each call, not once when the config is built: instancesLoop |
| + // builds its config once and runs it for the life of the agent. |
| + if err := reg.UpsertFleet(registry.Fleet{Name: "away", Account: fpOther, Bucket: "away-data"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + got, err = cfg.FleetOwners() |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + // Parity: the owners the edge's fleet arm, the edges file and the alias |
| + // pass judge by on this box (fleetArmInputs), so the phase never mints a |
| + // row the hub's edge refuses for want of an owner, nor the reverse. |
| + edgeOwners, edgeHub, tunnels, err := fleetArmInputs(reg, hub) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if want := map[string]string{"home": fpOwner, "away": fpOther}; !reflect.DeepEqual(got, want) || !reflect.DeepEqual(edgeOwners, want) { |
| + t.Fatalf("after a fleet is added: FleetOwners() = %v, the edge's owners %v, want both %v", got, edgeOwners, want) |
| + } |
| + if !edgeHub || !tunnels { |
| + t.Fatalf("fleetArmInputs on the hub's environment: hub %v, tunnels %v", edgeHub, tunnels) |
| + } |
| + |
| + for name, env := range map[string]map[string]string{ |
| + "a fleet box": {"CARLOS_TUNNEL_HOST": fpTunnel, "CARLOS_FLEET": "home"}, |
| + "neither variable": {}, |
| + "a fleet box with no tunnel host": {"CARLOS_FLEET": "home"}, |
| + "a blank tunnel host": {"CARLOS_TUNNEL_HOST": " "}, |
| + "the hub's region, no tunnel host": {"CARLOS_REGION": "uk"}, |
| + } { |
| + if cfg := BoxProvisionConfig(reg, envOf(env), nil, nil); cfg.FleetOwners != nil { |
| + t.Errorf("%s: FleetOwners set; only the hub forwards", name) |
| + } |
| + } |
| + |
| + // The environment the config is built from is the one it reads, the |
| + // provisioning half included. |
| + if cfg := BoxProvisionConfig(reg, envOf(map[string]string{"CARLOS_REGION": "uk"}), nil, nil); cfg.Region != "uk" { |
| + t.Fatalf("Region = %q, want uk from the getenv given", cfg.Region) |
| + } |
| +} |
| + |
| +// budgetStore counts every call made through it by operation and key while |
| +// counting is on. |
| +type budgetStore struct { |
| + release.Store |
| + mu sync.Mutex |
| + on bool |
| + calls map[string]int |
| +} |
| + |
| +func (s *budgetStore) note(op, key string) { |
| + s.mu.Lock() |
| + defer s.mu.Unlock() |
| + if s.on { |
| + s.calls[op+" "+key]++ |
| + } |
| +} |
| + |
| +func (s *budgetStore) Get(ctx context.Context, key string) ([]byte, string, error) { |
| + s.note("GET", key) |
| + return s.Store.Get(ctx, key) |
| +} |
| + |
| +func (s *budgetStore) Put(ctx context.Context, key string, body []byte, ifMatch string) (string, error) { |
| + s.note("PUT", key) |
| + return s.Store.Put(ctx, key, body, ifMatch) |
| +} |
| + |
| +func (s *budgetStore) List(ctx context.Context, prefix string) ([]string, error) { |
| + s.note("LIST", prefix) |
| + return s.Store.List(ctx, prefix) |
| +} |
| + |
| +func (s *budgetStore) ListDirs(ctx context.Context, prefix string) ([]string, error) { |
| + s.note("LISTDIRS", prefix) |
| + return s.Store.ListDirs(ctx, prefix) |
| +} |
| + |
| +func (s *budgetStore) Delete(ctx context.Context, key string) error { |
| + s.note("DELETE", key) |
| + return s.Store.Delete(ctx, key) |
| +} |
| + |
| +// count runs fn with counting on and returns what it called. |
| +func (s *budgetStore) count(fn func()) map[string]int { |
| + s.mu.Lock() |
| + s.on, s.calls = true, map[string]int{} |
| + s.mu.Unlock() |
| + fn() |
| + s.mu.Lock() |
| + defer s.mu.Unlock() |
| + s.on = false |
| + return s.calls |
| +} |
| + |
| +// budgetCase is what one comparison's bucket holds besides the baseline. |
| +// Both hubs of the comparison, dormant and armed, hold the same. |
| +type budgetCase struct { |
| + // shopHosts are the forward app's instance records, each fleet placed |
| + // on home, owned by its owner, on channel canary/x. |
| + shopHosts []string |
| + // catchall attaches an instance catch-all claim for shop (*.<parent>, |
| + // the parent claimed by the owner). |
| + catchall bool |
| +} |
| + |
| +const budgetCatchallParent = "shops.example.com" |
| + |
| +// budgetWorld is one hub: its bucket, registry and the per-process state |
| +// the production loops keep between passes. |
| +type budgetWorld struct { |
| + s *budgetStore |
| + reg *registry.Registry |
| + judge *provision.LifetimeJudge |
| + bs *buildStates |
| + cache domains.ClaimCache |
| + auth *assetAuthority |
| + pub ed25519.PublicKey |
| + last []byte |
| +} |
| + |
| +// newBudgetWorld is the baseline hub: fleet home owned by fpOwner in its |
| +// fleets table (no binding objects: the bindings pass reads the same on |
| +// both hubs); one platform app of fpOther (blog, |
| +// one instance on the hub) with a retention object; plans on; every object |
| +// of the fleet app (records, manifest, retention, channel pointer) in the |
| +// bucket, so a read of any of them would be counted. |
| +func newBudgetWorld(t *testing.T, c budgetCase) *budgetWorld { |
| + t.Helper() |
| + ctx := context.Background() |
| + dir := t.TempDir() |
| + s := &budgetStore{Store: release.NewDirStore(filepath.Join(dir, "bucket")), calls: map[string]int{}} |
| + reg, err := registry.Open(filepath.Join(dir, "registry.db")) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(func() { reg.Close() }) |
| + if err := reg.UpsertFleet(registry.Fleet{Name: "home", Account: fpOwner, Bucket: "home-data"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + priv, pub := testCanaryKeys(t) |
| + put := func(key string, v any) { |
| + t.Helper() |
| + body, err := json.Marshal(v) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, err := s.Put(ctx, key, body, ""); err != nil { |
| + t.Fatalf("put %s: %v", key, err) |
| + } |
| + } |
| + for id, sqid := range map[int64]string{7: fpOwner, 8: fpOther} { |
| + if _, err := s.Put(ctx, "accounts/"+sqid+"/account.json", |
| + []byte(fmt.Sprintf(`{"id":%d,"sqid":%q,"name":"Account %d","created_at":"2026-08-02T09:00:00Z"}`, id, sqid, id)), ""); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + if _, err := plans.PutMarker(ctx, s, &plans.Marker{Schema: plans.MarkerSchema, Enabled: true}, ""); err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, acct := range []string{fpOwner, fpOther} { |
| + for _, app := range []string{"shop", "blog"} { |
| + if err := provision.PutManifest(ctx, s, acct, app, provision.Manifest{Schema: 1, App: app, Domain: "example.com"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + put(release.RetentionKey(acct, app), release.Retention{Schema: 1, App: app, Keep: release.KeepFloor, SetAt: time.Now().UTC()}) |
| + } |
| + } |
| + |
| + // The platform app the hub runs. |
| + blog := "blog.example.com" |
| + if err := provision.CreateRecord(ctx, s, provision.Record{Schema: 1, Host: blog, Slug: "blog", App: "blog", |
| + Account: fpOther, Channel: "stable", CreatedAt: time.Now().UTC()}); err != nil { |
| + t.Fatal(err) |
| + } |
| + |
| + // The fleet app: its records are in the bucket on every hub, forwarded |
| + // or not (spec §6 "instance pass, record bodies: same"). |
| + for _, h := range c.shopHosts { |
| + if err := provision.CreateRecord(ctx, s, provision.Record{Schema: 1, Host: h, Slug: "shop", App: "shop", |
| + Account: fpOwner, Region: registry.PlacementTarget("home"), Channel: "canary/x", CreatedAt: time.Now().UTC()}); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + writeBackdatedPointer(t, s, priv, fpOwner, "shop", "canary/x", "v1", time.Now()) |
| + if c.catchall { |
| + put(domains.ClaimKey(budgetCatchallParent), domains.Claim{Schema: 1, Host: budgetCatchallParent, Account: fpOwner, App: "site"}) |
| + put(domains.ClaimKey("*."+budgetCatchallParent), domains.Claim{Schema: 1, Host: "*." + budgetCatchallParent, |
| + Account: fpOwner, App: "shop", Instances: true}) |
| + } |
| + |
| + w := &budgetWorld{s: s, reg: reg, judge: provision.NewLifetimeJudge(), auth: newAssetAuthority(time.Now), pub: pub} |
| + w.bs = &buildStates{hibBucket: "hib", prefix: func(h string) string { return "inst/" + h }, |
| + storeFor: storesOf(map[string]release.Store{"hib": s}), reg: reg, optDir: filepath.Join(dir, "opt"), |
| + bakeDir: filepath.Join(dir, "bake"), now: time.Now} |
| + return w |
| +} |
| + |
| +// passSet is the production pass set once, as instancesLoop and the status |
| +// tick run it on the hub, with cfg as the instance pass's config. |
| +func (w *budgetWorld) passSet(t *testing.T, cfg provision.ReconcileConfig) { |
| + t.Helper() |
| + ctx := provision.WithLifetimes(context.Background(), w.judge) |
| + if err := provision.Reconcile(ctx, w.s, w.reg, cfg); err != nil { |
| + t.Fatalf("instance pass: %v", err) |
| + } |
| + w.bs.refreshAll(ctx) |
| + telemetryPass(ctx, w.s, w.reg) |
| + plansPass(ctx, w.s, w.reg, nil) |
| + if err := retentionPass(ctx, w.s, &boxReports{status: w.s}, w.pub, w.reg); err != nil { |
| + t.Fatalf("retention: %v", err) |
| + } |
| + if err := aliasPassReporting(ctx, w.s, w.reg, &w.cache, w.auth, cfg.Region); err != nil { |
| + t.Fatalf("alias pass: %v", err) |
| + } |
| + if err := ReconcileFleetBindings(ctx, w.s, w.reg); err != nil { |
| + t.Fatalf("bindings: %v", err) |
| + } |
| + if err := edgesFilePass(ctx, w.s, w.reg, edgesFile{Box: "box-1"}, "", &w.last); err != nil { |
| + t.Fatalf("edges file: %v", err) |
| + } |
| + routes, err := w.reg.List() |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + countExpiredCanaries(ctx, routes, w.s, w.pub, time.Now()) |
| + if err := domains.Reconcile(ctx, w.s, w.reg, domains.Config{AppsDomain: "example.com", ReleasePub: w.pub}); err != nil { |
| + t.Fatalf("domains pass: %v", err) |
| + } |
| +} |
| + |
| +// budgetRun is one world's pass sets: dormant ones until a pass set writes |
| +// nothing (the hub as it is today, settled), then two with the forward |
| +// phase as armed says. It returns the calls of the first of those (where a |
| +// forward row first appears) and of the second (steady state: nothing |
| +// changing). |
| +func budgetRun(t *testing.T, c budgetCase, armed bool) (first, steady map[string]int, reg *registry.Registry) { |
| + t.Helper() |
| + w := newBudgetWorld(t, c) |
| + cfg := BoxProvisionConfig(w.reg, func(k string) string { |
| + if k == "CARLOS_DATA_DIR" { |
| + return filepath.Join(t.TempDir(), "data") |
| + } |
| + return envOfHub(k) |
| + }, w.judge, nil) |
| + if cfg.FleetOwners == nil { |
| + t.Fatal("BoxProvisionConfig on the hub's environment armed no forward phase") |
| + } |
| + dormant := cfg |
| + dormant.FleetOwners = nil |
| + if !armed { |
| + cfg = dormant |
| + } |
| + for settled := 0; ; settled++ { |
| + if settled == 4 { |
| + t.Fatal("the dormant hub never settles: every pass set writes") |
| + } |
| + if writes(w.s.count(func() { w.passSet(t, dormant) })) == 0 { |
| + break |
| + } |
| + } |
| + first = w.s.count(func() { w.passSet(t, cfg) }) |
| + steady = w.s.count(func() { w.passSet(t, cfg) }) |
| + return first, steady, w.reg |
| +} |
| + |
| +// writes is how many PUTs and DELETEs calls holds. |
| +func writes(calls map[string]int) int { |
| + n := 0 |
| + for k, c := range calls { |
| + if strings.HasPrefix(k, "PUT ") || strings.HasPrefix(k, "DELETE ") { |
| + n += c |
| + } |
| + } |
| + return n |
| +} |
| + |
| +// envOfHub is the hub's environment as the test sets it for the passes |
| +// that read os.Getenv (the alias pass, the edges file). |
| +func envOfHub(k string) string { |
| + switch k { |
| + case "CARLOS_TUNNEL_HOST": |
| + return fpTunnel |
| + } |
| + return "" |
| +} |
| + |
| +// callDiff is after minus before, per call, nonzero entries only. |
| +func callDiff(before, after map[string]int) map[string]int { |
| + out := map[string]int{} |
| + for k, n := range after { |
| + if d := n - before[k]; d != 0 { |
| + out[k] = d |
| + } |
| + } |
| + for k, n := range before { |
| + if _, ok := after[k]; !ok { |
| + out[k] = -n |
| + } |
| + } |
| + return out |
| +} |
| + |
| +func showCalls(m map[string]int) string { |
| + keys := slices.Sorted(maps.Keys(m)) |
| + var b strings.Builder |
| + for _, k := range keys { |
| + fmt.Fprintf(&b, "\n %+d %s", m[k], k) |
| + } |
| + return b.String() |
| +} |
| + |
| +// TestForwardRequestBudget is spec §6's comparative test. Two hubs over |
| +// identical buckets and registries run the production pass set: one with the |
| +// forward phase dormant (today's hub, which skips a fleet-placed record at |
| +// the fleet boundary), one armed by BoxProvisionConfig, which mints shop's |
| +// forward row on fleet home (channel canary/x). The difference per call, in |
| +// steady state, must be exactly the table's A = 1, C = 1 rows: the app's |
| +// trash marker (nothing else of the app's: no manifest, seed, policy, |
| +// retention or channel pointer), the telemetry pair with the index off (the |
| +// account's and the app's objects, 2 x A per pass), and the account's limits |
| +// (C = 1: no other row of the owner's is on the hub). Bindings, build |
| +// states, retention, canary status, the domains pass and the alias pass |
| +// without a catch-all: unchanged. The edges file: one PUT when the row |
| +// appears, none in steady state. |
| +// |
| +// Two more cases (R3-2): an instance catch-all claim for shop adds one List |
| +// of the app's instance records per alias pass (K = 1); two of shop's |
| +// instances sharing a label add both hosts' lifetime observations, the |
| +// record and its incarnation slot each (D = 2). |
| +func TestForwardRequestBudget(t *testing.T) { |
| + setHubEnv(t, fpTunnel, "") |
| + prevSink, prevPlans := analyticsSink.Load(), planLimits.Load() |
| + t.Cleanup(func() { |
| + analyticsSink.Store(prevSink) |
| + planLimits.Store(prevPlans) |
| + }) |
| + setAnalyticsSink(func(map[string]bool) {}) |
| + |
| + marker := "GET " + release.AppTombstoneKey(fpOwner, "shop") |
| + perPass := map[string]int{ |
| + marker: 1, // A x P: the trash-only prefetch, the marker alone |
| + "GET " + telemetry.AccountKey(fpOwner): 1, // telemetry, index off: 2 x A per pass |
| + "GET " + telemetry.AppKey(fpOwner, "shop"): 1, |
| + "GET " + plans.LimitsKey(fpOwner): 1, // plans on: + C per pass |
| + } |
| + with := func(extra map[string]int) map[string]int { |
| + out := maps.Clone(perPass) |
| + maps.Copy(out, extra) |
| + return out |
| + } |
| + list := "LIST apps/" + fpOwner + "/shop/instances/" |
| + observe := func(host string) map[string]int { |
| + return map[string]int{ |
| + "GET " + provision.RecordKey(fpOwner, "shop", host): 1, |
| + "GET " + provision.HostIncarnationKey(host): 1, |
| + } |
| + } |
| + twoHosts := with(map[string]int{list: 1}) |
| + maps.Copy(twoHosts, observe("shop.example.com")) |
| + maps.Copy(twoHosts, observe("shop.example.net")) |
| + |
| + for _, tc := range []struct { |
| + name string |
| + c budgetCase |
| + want map[string]int |
| + }{ |
| + {"one fleet app on a canary channel", budgetCase{shopHosts: []string{"shop.example.com"}}, perPass}, |
| + {"with an instance catch-all claim", budgetCase{shopHosts: []string{"shop.example.com"}, catchall: true}, |
| + with(map[string]int{list: 1})}, |
| + {"two instances sharing a label", budgetCase{shopHosts: []string{"shop.example.com", "shop.example.net"}, catchall: true}, |
| + twoHosts}, |
| + } { |
| + t.Run(tc.name, func(t *testing.T) { |
| + beforeFirst, before, _ := budgetRun(t, tc.c, false) |
| + afterFirst, after, reg := budgetRun(t, tc.c, true) |
| + for _, h := range tc.c.shopHosts { |
| + rt, err := reg.Get(h) |
| + if err != nil || rt == nil || !rt.IsForward() { |
| + t.Fatalf("the armed hub holds no forward row at %s (%+v, %v): the comparison measures nothing", h, rt, err) |
| + } |
| + } |
| + if got := callDiff(before, after); !reflect.DeepEqual(got, tc.want) { |
| + t.Errorf("steady-state difference per pass set:%s\nwant:%s", showCalls(got), showCalls(tc.want)) |
| + } |
| + if writes(before) != 0 || writes(after) != 0 { |
| + t.Errorf("steady state writes: dormant%s\narmed%s", showCalls(before), showCalls(after)) |
| + } |
| + // The pass where the forward row appears: the edges file gains |
| + // exactly one PUT. |
| + edgesPuts := func(m map[string]int) int { |
| + n := 0 |
| + for k, c := range m { |
| + if strings.HasPrefix(k, "PUT ") && strings.Contains(k, "edges") { |
| + n += c |
| + } |
| + } |
| + return n |
| + } |
| + if b, a := edgesPuts(beforeFirst), edgesPuts(afterFirst); a != b+1 { |
| + t.Errorf("edges file PUTs on the pass the forward row appears: %d, want %d (one more than the dormant hub's)%s", a, b+1, showCalls(callDiff(beforeFirst, afterFirst))) |
| + } |
| + }) |
| + } |
| +} |
diff --git a/internal/host/hawake_wiring_test.go b/internal/host/hawake_wiring_test.go| index a1b942a51..dc71be7bb 100644 |
| --- a/internal/host/hawake_wiring_test.go |
| +++ b/internal/host/hawake_wiring_test.go |
| @@ -17,7 +17,8 @@ import ( |
| // Every reconcile pass fills the one lifetime index the activator reads. |
| func TestBoxProvisionConfigCarriesTheLifetimeIndex(t *testing.T) { |
| - if a, b := boxProvisionConfig(nil, nil), boxProvisionConfig(nil, nil); a.Lifetimes == nil || a.Lifetimes != boxLifetimes || b.Lifetimes != boxLifetimes { |
| + reg, noEnv := testRegistry(t), func(string) string { return "" } |
| + if a, b := BoxProvisionConfig(reg, noEnv, nil, nil), BoxProvisionConfig(reg, noEnv, nil, nil); a.Lifetimes == nil || a.Lifetimes != boxLifetimes || b.Lifetimes != boxLifetimes { |
| t.Fatalf("pass configs carry %p and %p, want the box's %p", a.Lifetimes, b.Lifetimes, boxLifetimes) |
| } |
| } |
diff --git a/internal/host/hub.go b/internal/host/hub.go| index 570b80c34..f67dda28a 100644 |
| --- a/internal/host/hub.go |
| +++ b/internal/host/hub.go |
| @@ -28,17 +28,34 @@ func fleetArmInputs(reg *registry.Registry, getenv func(string) string) (owners |
| if !tunnels { |
| return nil, false, false, nil |
| } |
| - fleets, err := reg.ListFleets() |
| + owners, err = hubFleetOwners(reg)() |
| if err != nil { |
| - return nil, false, false, fmt.Errorf("list fleets: %w", err) |
| - } |
| - owners = make(map[string]string, len(fleets)) |
| - for _, f := range fleets { |
| - owners[f.Name] = f.Account |
| + return nil, false, false, err |
| } |
| return owners, hub, true, nil |
| } |
| +// hubFleetOwners is the hub's ReconcileConfig.FleetOwners (fleet public |
| +// routes spec §4.3): each fleet in this box's own fleets table with its |
| +// owning account, read afresh on each call, so a loop that builds its config |
| +// once still sees every fleet created or deleted since. It is also where |
| +// fleetArmInputs reads the owners the edge's fleet arm, the edges file and |
| +// the alias pass judge by, so the forward phase and the edge cannot disagree |
| +// about who owns a fleet. |
| +func hubFleetOwners(reg *registry.Registry) func() (map[string]string, error) { |
| + return func() (map[string]string, error) { |
| + fleets, err := reg.ListFleets() |
| + if err != nil { |
| + return nil, fmt.Errorf("list fleets: %w", err) |
| + } |
| + owners := make(map[string]string, len(fleets)) |
| + for _, f := range fleets { |
| + owners[f.Name] = f.Account |
| + } |
| + return owners, nil |
| + } |
| +} |
| + |
| // fleetRefusedFor is the alias pass's FleetRefused input: edge.FleetArmVerdict |
| // over the listing the pass itself reads (internal/domains cannot import the |
| // edge), with the inputs read here once per pass. It passes the verdict's |
diff --git a/internal/host/lifetime_gating_test.go b/internal/host/lifetime_gating_test.go| index ea91b4847..c5ebec904 100644 |
| --- a/internal/host/lifetime_gating_test.go |
| +++ b/internal/host/lifetime_gating_test.go |
| @@ -510,7 +510,7 @@ func TestBoxJudgeIsSharedAndGated(t *testing.T) { |
| t.Fatalf("the moves worker's judge %p, its view's %p, want %p", w.cfg.Judge, w.cfg.Offline.judge, j) |
| } |
| // The reconcile pass's config. |
| - if cfg := boxProvisionConfig(j, nil); cfg.Judge != j { |
| + if cfg := BoxProvisionConfig(testRegistry(t), func(string) string { return "" }, j, nil); cfg.Judge != j { |
| t.Fatal("the reconcile config does not carry the box's judge") |
| } |
| // The proof binding source sets its own from the same switch. |
diff --git a/internal/host/policycache_wiring_test.go b/internal/host/policycache_wiring_test.go| index 3edf77b4c..82a0a2227 100644 |
| --- a/internal/host/policycache_wiring_test.go |
| +++ b/internal/host/policycache_wiring_test.go |
| @@ -28,12 +28,14 @@ func TestProvisioningLoopsShareThePolicyCache(t *testing.T) { |
| if built == nil { |
| t.Fatal("armPolicyCache built no cache") |
| } |
| - a, b := boxProvisionConfig(nil, nil), boxProvisionConfig(nil, nil) |
| + reg := testRegistry(t) |
| + noEnv := func(string) string { return "" } |
| + a, b := BoxProvisionConfig(reg, noEnv, nil, nil), BoxProvisionConfig(reg, noEnv, nil, nil) |
| if a.Policies != built || b.Policies != built { |
| t.Fatalf("pass configs carry caches %p and %p, want the armed %p in both", a.Policies, b.Policies, built) |
| } |
| - // Both loops build their pass config through boxProvisionConfig, and |
| + // Both loops build their pass config through BoxProvisionConfig, and |
| // RunAgent arms the cache after the change index (syntactic: a loop |
| // that builds its config another way fails here). |
| src, err := os.ReadFile("agent.go") |
| @@ -42,10 +44,10 @@ func TestProvisioningLoopsShareThePolicyCache(t *testing.T) { |
| } |
| text := string(src) |
| if n := strings.Count(text, "configuredClaimProvision(provisionTickConfig("); n != 1 { |
| - t.Fatalf("agent.go builds a pass config outside boxProvisionConfig (%d sites, want 1)", n) |
| + t.Fatalf("agent.go builds a pass config outside BoxProvisionConfig (%d sites, want 1)", n) |
| } |
| - if n := strings.Count(text, "boxProvisionConfig(judge, configure)"); n != 2 { |
| - t.Fatalf("agent.go has %d boxProvisionConfig(judge, configure) calls, want 2 (fastConvergeLoop and instancesLoop)", n) |
| + if n := strings.Count(text, "BoxProvisionConfig(reg, os.Getenv, judge, configure)"); n != 2 { |
| + t.Fatalf("agent.go has %d BoxProvisionConfig(reg, os.Getenv, judge, configure) calls, want 2 (fastConvergeLoop and instancesLoop)", n) |
| } |
| for _, loop := range []string{"func fastConvergeLoop(", "func instancesLoop("} { |
| i := strings.Index(text, loop) |
| @@ -56,8 +58,8 @@ func TestProvisioningLoopsShareThePolicyCache(t *testing.T) { |
| if j := strings.Index(body[1:], "\nfunc "); j >= 0 { |
| body = body[:j+1] |
| } |
| - if !strings.Contains(body, "boxProvisionConfig(judge, configure)") { |
| - t.Fatalf("%s...) does not build its pass config with boxProvisionConfig", loop) |
| + if !strings.Contains(body, "BoxProvisionConfig(reg, os.Getenv, judge, configure)") { |
| + t.Fatalf("%s...) does not build its pass config with BoxProvisionConfig", loop) |
| } |
| } |
| arm, cache := strings.Index(text, "armChangeIndex(agentCtx"), strings.Index(text, "\t\tarmPolicyCache()") |
diff --git a/internal/host/sizestatus_test.go b/internal/host/sizestatus_test.go| index aa6e70272..91ac44c55 100644 |
| --- a/internal/host/sizestatus_test.go |
| +++ b/internal/host/sizestatus_test.go |
| @@ -239,7 +239,7 @@ func TestSizeCommittedSumsAwakeEffectiveSizes(t *testing.T) { |
| } |
| // TestPolicyChangedNotesTheSize pins the hook both provisioning loops get |
| -// through boxProvisionConfig: a converge that moved a row's policy columns |
| +// through BoxProvisionConfig: a converge that moved a row's policy columns |
| // tells the armed activator, and before the activator is armed the hook |
| // does nothing. RunAgent arms the source where it builds the Service. Not |
| // parallel: it swaps the armed source. |
| @@ -248,15 +248,16 @@ func TestPolicyChangedNotesTheSize(t *testing.T) { |
| t.Cleanup(func() { armedSizeSource.Store(prev) }) |
| armedSizeSource.Store(nil) |
| - cfg := boxProvisionConfig(nil, nil) |
| + reg, noEnv := testRegistry(t), func(string) string { return "" } |
| + cfg := BoxProvisionConfig(reg, noEnv, nil, nil) |
| if cfg.PolicyChanged == nil { |
| - t.Fatal("boxProvisionConfig sets no PolicyChanged") |
| + t.Fatal("BoxProvisionConfig sets no PolicyChanged") |
| } |
| cfg.PolicyChanged("shop-a.example.com") // nothing armed: no panic, nothing to tell |
| svc := &fakeSizeStater{} |
| armedSizeSource.Store(&sizeSource{svc: svc, cgroupRoot: t.TempDir()}) |
| - boxProvisionConfig(nil, nil).PolicyChanged("shop-a.example.com") |
| + BoxProvisionConfig(reg, noEnv, nil, nil).PolicyChanged("shop-a.example.com") |
| if got := svc.notes(); !reflect.DeepEqual(got, []string{"shop-a.example.com"}) { |
| t.Fatalf("NoteSize calls = %v, want [shop-a.example.com]", got) |
| } |
diff --git a/internal/provision/reconcile.go b/internal/provision/reconcile.go| index e91e7cf90..6840c3cd6 100644 |
| --- a/internal/provision/reconcile.go |
| +++ b/internal/provision/reconcile.go |
| @@ -140,7 +140,7 @@ type ReconcileConfig struct { |
| // (control/app-policy/, #328, #329; apppolicy_cache.go), which keeps the |
| // policy reads inside spec §3a's budget: no read per pass when nothing |
| // changed. Production builds one per process and hands the same pointer |
| - // to every pass (the host's boxProvisionConfig). Nil (tests, tools) |
| + // to every pass (the host's BoxProvisionConfig). Nil (tests, tools) |
| // never lists control/app-policy/: the backstop listing belongs to the |
| // agent's one cache, so a pass with none reads each of its apps' policy |
| // with one GET instead, every pass: correct, never cheap. |