carlos / platform Public

Console plans: Astra round 6 fixes (perf-2, nav)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 4272c75dfcaceac25ee5ac237dcd6ac06f6822ca parent 494209d
2 files changed, +29 −18
  • docs/superpowers/plans/2026-10-25-console-perf-2-fixes.md +18 −11
  • docs/superpowers/plans/2026-10-25-console-ux-nav.md +11 −7

CI failed — run details

diff --git a/docs/superpowers/plans/2026-10-25-console-perf-2-fixes.md b/docs/superpowers/plans/2026-10-25-console-perf-2-fixes.md
index 9198765b9..86fd6f0f9 100644
--- a/docs/superpowers/plans/2026-10-25-console-perf-2-fixes.md
+++ b/docs/superpowers/plans/2026-10-25-console-perf-2-fixes.md
@@ -236,10 +236,10 @@ Spec §2.4 C rows "Settings, `populateAppSettings`", "`appDeployEmpty`" and "`en
**Files:**
- Create: `internal/console/viewcache.go`; Test: `internal/console/viewcache_test.go`
- Create: `internal/console/viewloaders.go` (every loader lives here; empty but for the probe's in this task); Test: `internal/console/viewloaders_test.go` (`TestViewLoadersAreRestricted`)
-- Modify: `internal/console/server.go` (`Server.views *viewCache`, set in `NewServer` to `newViewCache(s.now, viewCacheMax)`; `Server.now func() time.Time`, `time.Now` by default, the clock every request-time derivation in Tasks 9 to 14 reads)
+- Modify: `internal/console/server.go` (`Server.views *viewCache`, set in `NewServer` to `newViewCache(func() time.Time { return s.now() }, viewCacheMax)`, an indirection that reads the field on every call, so a test that replaces `s.now` after construction moves the cache's clock too; `Server.now func() time.Time`, `time.Now` by default, the clock every request-time derivation in Tasks 9 to 14 reads and the source of `viewLoadEnv.ReadAt`. *(Astra round 6, finding 4.)*)
- Modify: `internal/console/perfwalk_test.go` (`perfQuiesce = func(fx *consoleFixture) { fx.srv.waitBackground() }`; `perfColdReset = func(fx *consoleFixture) { fx.srv.resetForColdView() }`; `newPerfFixture` sets `fx.clock` and points `fx.srv.now` at it)
- Modify: `internal/console/metricsview.go:361`, `internal/console/economicsview.go:288-300` (their own background sweeps run through `s.bg.Go`, Task 2's `bgWork`, as view loads do from this task on).
-- Create: `internal/console/viewreset_test.go`: `func (s *Server) waitBackground()` (test-only: `s.bg.Wait()`) and `func (s *Server) resetForColdView()` (test-only), which first waits for background work and then gives the server what a restart would: a fresh `newViewCache(s.now, viewCacheMax)`, an empty `manifestSeen`, an unset edge fold, and empty inner caches in `LoadMetrics` and `LoadEconomics`. `perfQuiesce` is `fx.srv.waitBackground()`, so counts and resets never run while a request-triggered worker is still reading. *(Astra round 3, finding 9.)*
+- Create: `internal/console/viewreset_test.go`: `func (s *Server) waitBackground()` (test-only: `s.bg.Wait()`) and `func (s *Server) resetForColdView()` (test-only), which first waits for background work and then gives the server what a restart would: an emptied view cache, reset **in place** by `s.views.reset()` (every entry, read set and in-flight generation dropped; the same `*viewCache`, so Task 8's tracker, bound to it once in `NewServer`, keeps invalidating the cache that serves pages), an empty `manifestSeen`, an unset edge fold, and empty inner caches in `LoadMetrics` and `LoadEconomics`. `perfQuiesce` is `fx.srv.waitBackground()`, so counts and resets never run while a request-triggered worker is still reading. *(Astra round 3, finding 9.)*
**Interfaces:**
- Produces:
@@ -259,6 +259,7 @@ Spec §2.4 C rows "Settings, `populateAppSettings`", "`appDeployEmpty`" and "`en
- read sets: every entry carries `type readSet struct { keys map[string]bool; prefixes []string }`, the object keys its load read and the prefixes it listed, filled while the load runs by Task 8's tracker through the load's context (`withReadSet(ctx, *readSet) context.Context`). An entry keeps two: the **published** set, of the value it is serving, and the **in-flight** set, of the load running now. A load starts with an empty in-flight set. Only a successful publish replaces the published set with the in-flight one. A failed or discarded load drops its in-flight set and leaves the published set alone. *(Astra round 4, finding 1: a refresh that has not yet reached a key must not hide that the value being served depends on it.)*
- `func (c *viewCache) touched(key string) []viewKey`: for every entry whose published or in-flight read set holds `key` or a prefix of it (an entry exists, with its set, from the moment its first load starts), bump its generation and mark it invalid; a load that started at an older generation, first load or refresh, then discards its result. Returns the entries it invalidated.
- `func (c *viewCache) reread(ctx context.Context, keys []viewKey) (failed int)`: for each key that has an entry, start a load at its current generation; all run concurrently under `ctx`, and `reread` waits for them. A success publishes; a failure leaves the entry invalid and counts in `failed`.
+ - `func (c *viewCache) reset()`: drops every entry under the cache's lock, after `waitBackground` (a load that ends afterwards finds no entry and discards its result).
- `func (c *viewCache) snapshot() []viewEntryInfo` (test-only: key, generation, valid, read set), for Task 8's coverage check.
- `func asOfText(now, at time.Time) string`: CPF-20 with CPF-21 to CPF-25 (under a minute, 1 minute, n minutes, 1 hour, n hours).
@@ -279,13 +280,15 @@ The rules the implementation keeps:
- `TestWriteAfterAFailedRefreshStillInvalidates`: a warm entry whose published set holds `b`; a refresh that fails after reading only `a`; the entry still serves its old value (stale) with its published set intact; `touched("b")` invalidates it.
- `TestTouchedCoversExactKeysAndListedPrefixes`: three entries, one that read `a/x`, one that listed `a/`, one that read `b/y`; `touched("a/x")` invalidates the first two and not the third; `touched("a/z")` invalidates only the lister.
- `TestRereadFailureLeavesEntryInvalid`: the re-read fails; `failed == 1`; the next peek is a miss, not the pre-write value.
+ - `TestFixtureClockDrivesExpiry`: on `newPerfFixture`, warm an entry; move `fx.clock` past its window; the next peek reports it stale and starts exactly one refresh.
+ - `TestWriteAfterColdResetInvalidatesTheLiveCache`: warm an entry with a recorded read set; `resetForColdView`; warm it again; write its key through the observed store; the next read misses and answers the new value, and the tracker's `touched` reached the live cache, not a discarded one.
- `TestBackgroundWaitCoversEveryWorker`: a view load, a `bg.Go` worker and a held loader; `waitBackground` returns only after all three end.
- `TestHungLoadIsBoundedAndRetried`: with `viewLoadTimeout` shortened to 50 ms, a loader that blocks until its context ends; while it runs, peeks start no second goroutine; after it ends, the next peek of the stale entry starts one.
- `TestViewKeysAreAccountScoped`: `{Acct: "a", App: "api"}` and `{Acct: "b", App: "api"}` hold different values.
- `TestViewCacheEvictsLeastRecentlyUsed`: `max` 3; four keys loaded; the least recently peeked is gone; an entry mid-load is not evicted.
- `TestViewValuesAreCopies`: changing a slice element of a peeked value does not change the next peek's value.
- `TestAsOfText`: 20 s → CPF-20 with CPF-21; 60 s → CPF-22; 150 s → CPF-23 with 2; 1 h → CPF-24; 3 h → CPF-25 with 3 (approved text verbatim).
-- [ ] **Step 2: Run** `go test ./internal/console/ -run 'TestView|TestLoadInFlight|TestWriteToADependency|TestWriteAfterAFailedRefresh|TestTouched|TestRereadFailure|TestBackgroundWait|TestHungLoad|TestAsOfText' -count=1 -race`. Expected: FAIL.
+- [ ] **Step 2: Run** `go test ./internal/console/ -run 'TestView|TestLoadInFlight|TestWriteToADependency|TestWriteAfterAFailedRefresh|TestTouched|TestRereadFailure|TestFixtureClockDrivesExpiry|TestWriteAfterColdReset|TestBackgroundWait|TestHungLoad|TestAsOfText' -count=1 -race`. Expected: FAIL.
- [ ] **Step 3: Implement**; add CPF-20 to CPF-25 to `consolePerfCopyBuilt`; set `perfQuiesce` and the fixture clock.
- [ ] **Step 4: Run** Step 2's command and `go test . -run TestConsolePerfCopy -count=1`. Expected: PASS.
- [ ] **Step 5: Commit**, message `console: in-process view cache: view-triggered single-flight refresh, read sets, generations that cover in-flight loads, immutable values`, ending with the Co-Authored-By line.
@@ -353,7 +356,7 @@ Admission falls out of the design. A refused request (session, CSRF, owner, conf
- Create: `internal/console/viewtrack.go`; Test: `internal/console/viewtrack_test.go`
- Modify: `internal/console/server.go` (`Config.Track`; `NewServer` binds it), `internal/console/claim_routes.go:59-69` (`registerRoute`: non-GET, non-HEAD requests get a write set and the re-read writer)
- Modify: `cmd/console/main.go` (`openStore` sets the observer on the store it opens; `serve()` passes the tracker in `Config.Track`); Test: `cmd/console/perfs3_test.go` (extend)
-- Modify: `internal/console/claim_invariant_world_test.go` (`newClaimCaseWith`: when an option sets `Config.Track`, the claim world's `DirStore` gets its observer), `internal/console/claim_invariant_test.go` (`runClaimDoor`: the coverage check)
+- Modify: `internal/console/claim_invariant_world_test.go` (`newClaimCaseWith`: when an option sets `Config.Track`, the claim world's `DirStore` gets its observer), `internal/console/view_test.go:51` (`deletableStore.Delete` keeps its key validation, then forwards to the underlying `DirStore.Delete(ctx, key)` with the caller's context instead of calling `os.Remove`, so every fixture write reaches the observed store; *Astra round 6, finding 3*), `internal/console/claim_invariant_test.go` (`runClaimDoor`: the coverage check)
**Interfaces:**
- Consumes: `viewCache.touched`, `viewCache.reread`, `viewCache.snapshot`, `withReadSet`, plan 2 Task 2's `perfLatency.Keys`.
@@ -382,9 +385,10 @@ Admission falls out of the design. A refused request (session, CSRF, owner, conf
- `TestInstanceCreateRefreshesHostsAndEnvs`: Logs' host picker (`partRecordHosts`) and Environments (`partEnvs`) warm; create an instance through the CLI door; the picker lists the new host and Environments shows it (its host join is per request, rule (a)).
- `TestScenarioActivationRefreshesArchitecture`: Architecture warm; activate a scenario through the economics door; Architecture's rate card is the new scenario's.
- `TestRefusedWritesInvalidateNothing`: a CSRF failure, a non-member, a plain member on an owner door, a validation error, and a promote stopped at its confirmation page. For each, the fake saw no write and every entry's generation is unchanged.
+ - `TestFixtureStoresForwardEveryWrite`: for `deletableStore` and the claim world's `claimRawStore`, each write method (`Put`, `PutFrom`, `Delete`, `DeleteIfMatch`) produces one write observation on the underlying `DirStore` with the caller's context; the method list comes from `reflect` over each type, so a new write-shaped method without forwarding fails it.
- `TestReadSetsCoverEveryRead`: on `newPerfFixture`, for each target plan 1's `perfWalkTargets(fx)` gives (every screen in `perfInventory` with its defaults expanded exactly as the walk expands them, `skip` records excluded; Astra round 4, finding 6): `resetForColdView`, `ResetKeys`, `getAssembled`, `waitBackground`. Every `GetObject` key and `ListObjectsV2` prefix the fake saw is held by some entry's read set, or is on a short allowlist of reads the cache does not hold: the account-manifest check, the change index, and reads that plan 1's warm walk already allows by a `calls` record.
- - The coverage check inside `TestClaimConsoleMutationInvariant`. The suite builds its door consoles with `newClaimCaseWith(t, func(c *Config) { c.Track = NewStoreTracker() })`; `newClaimCaseWith`, seeing `Track` set after the options run, calls `dir.SetObserver(cfg.Track.Observe)` on the claim world's `DirStore` (`claim_invariant_world_test.go:464`). Every other `newClaimCase` user stays untracked and reads inline, unchanged. In each door's `setup`, outside every measured window, `runClaimDoor` assembles every app tab, settings section and account page of the door's account and app, then calls `waitBackground` and `snapshot`. After each run, it calls `waitBackground` and `snapshot` and runs `assertWriteCoverage` with that run's written keys from the suite's own raw-store recorder (`claimRawStore`'s events: an oracle the tracker does not feed). For a foreign run (`check(…, false)`), which writes nothing, no generation may move.
-- [ ] **Step 2: Run** `go test ./internal/release/ -run 'TestStoreObserver' -count=1`, `go test ./internal/console/ -run 'TestReadRecordedBefore|TestUntrackedServer|TestShipRefreshes|TestInstanceCreateRefreshes|TestScenarioActivation|TestRefusedWrites|TestReadSetsCoverEveryRead' -count=1 -race`, `go test ./cmd/console/ -run TestProductionStoreIsObserved -count=1`. Expected: FAIL.
+ - The coverage check inside `TestClaimConsoleMutationInvariant`. The suite builds its door consoles with `newClaimCaseWith(t, func(c *Config) { c.Track = NewStoreTracker() })`; `newClaimCaseWith`, seeing `Track` set after the options run, calls `dir.SetObserver(cfg.Track.Observe)` on the claim world's `DirStore` (`claim_invariant_world_test.go:464`). Every other `newClaimCase` user stays untracked and reads inline, unchanged. In each door's `setup`, outside every measured window, `runClaimDoor` assembles every app tab, settings section and account page of the door's account and app, then calls `waitBackground` and `snapshot`. After each run, it calls `waitBackground` and `snapshot` and runs `assertWriteCoverage` with that run's written keys from the suite's own raw-store recorder (`claimRawStore`'s events: an oracle the tracker does not feed). For a foreign run (`check(…, false)`), which writes nothing, no generation may move. The door fixtures include a warmed canary retirement (`POST …/canary/retire`, whose handler deletes the channel pointer, `server.go:5353`): the warmed core entry's generation must move, which fails if any fixture delete bypasses the observer.
+- [ ] **Step 2: Run** `go test ./internal/release/ -run 'TestStoreObserver' -count=1`, `go test ./internal/console/ -run 'TestReadRecordedBefore|TestFixtureStoresForwardEveryWrite|TestUntrackedServer|TestShipRefreshes|TestInstanceCreateRefreshes|TestScenarioActivation|TestRefusedWrites|TestReadSetsCoverEveryRead' -count=1 -race`, `go test ./cmd/console/ -run TestProductionStoreIsObserved -count=1`. Expected: FAIL.
- [ ] **Step 3: Implement.** Some of these tests need screens converted later (Logs in Task 12, Architecture in Task 15). Write them now with `t.Skip("cached in Task N")` and remove the skip in that task. Every other case runs here, with the probe part standing in for a cached screen.
- [ ] **Step 4: Run** Step 2's commands, the gate-order tests `go test ./internal/console/ -run 'NonMember|CSRF|StepUp|FreshAuth|TestEveryCLIDoorNamesItsRoles|TestAuthCLIFamily|TestPromoteFlow|TestRollbackFlow' -count=1`, and `nice -n 19 go test ./internal/console/ -run '^TestClaimConsoleMutationInvariant$' -count=1`. The claim run's background reads happen in setup, outside measured windows. A door's own re-reads are reads inside its window. If the suite's recorder treats them as anything but the door's reads, record them as the door's reads; never silence the check. Expected: PASS.
- [ ] **Step 5: Prove the check bites.** Make one loader read a key without recording it (an `env.Store` call on `context.Background()` instead of `env.Ctx`, with the AST rule against it temporarily disabled). `TestReadSetsCoverEveryRead` must name that key, and the matching warm-before-write case must fail. Restore, then commit with message `console: writes invalidate what they touched, by read set; the writing request re-reads it before answering`, ending with the Co-Authored-By line.
@@ -464,7 +468,7 @@ Spec §2.4 C row `instances.Report`: HTTP to the app host, 30 s cache, blocks up
- Produces:
- parts `instances`, `instance` (its `Gate` checks `?host=` against the app's own routes exactly as the page checks `{host}`, else 404), and `instances-report` (the self-report section alone).
- The app's self-report: the host is chosen per request by `instances.Report`'s existing rule (first ready, non-static, non-sidecar, non-hibernating route, `instances.go:83-101`, over the request's routes), and becomes part of the key, `{sqid, app, partAppReport + ":" + host}`, `liveWindow`, loader `loadAppReport(env, key, host string)` calling `env.AppHost`. A different eligible host (one went to sleep) is a different entry; no eligible host is no read at all, as today. `instanceFetcher` keeps host choice and its client; its cache map goes. A miss of the report alone renders the rest of the tab and a placeholder for `instances-report` only (the part the spec names).
- - Reads through `viewGet`: `appResourceMetrics` (Task 9's key), the edge files as raw facts (`{"", "", partEdges}`, `liveWindow`, loader `loadEdgeFiles`: the read half of `edgesfile.ReadSnapshot`, `control/edges/` listed and each file read, split out and put on `viewLoaderCallees`); `liveEdges`' freshness and its clock-dependent box completeness (`edgesfile/snapshot.go:152`) are computed per request from those facts, the `partBoxes` snapshot and `s.now()` by the split's pure half, `platformBoxes` (Task 9's `partBoxes`, the whole `boxSnapshot`), the instance manifest (Task 10's key), the instance page's fleet boxes (`{sqid, "", "fleet-boxes:<fleet>"}`, `liveWindow`, a `boxSnapshot` each), `updatesPage`'s record and manifest (`{sqid, app, "updates:<host>"}`, `liveWindow`), the GeoIP inventory as facts only: the platform boxes (`partBoxes`) and one heartbeat snapshot per fleet (`{"", "", fleetBoxesPart(fleet)}`, the same entries as the instance page's fleet boxes). The expected inventory (which fleets and boxes exist, `ListFleets`/`ListFleetBoxes`, `apisystemgeoip.go:281`) is read from the registry per request, and selects which fleet entries the request needs. A fleet registered since is then a miss for its own entry, never absent from a stale aggregate. The region line's reads go through the same entries. Registry and SQLite reads stay direct.
+ - Reads through `viewGet`: `appResourceMetrics` (Task 9's key), the edge files as raw facts (`{"", "", partEdges}`, `liveWindow`, loader `loadEdgeFiles`: the read half of `edgesfile.ReadSnapshot`, `control/edges/` listed and each file read, split out and put on `viewLoaderCallees`); `liveEdges`' freshness and its clock-dependent box completeness (`edgesfile/snapshot.go:152`) are computed per request from those facts, the `partBoxes` snapshot and `s.now()` by the split's pure half, `platformBoxes` (Task 9's `partBoxes`, the whole `boxSnapshot`), the instance manifest (Task 10's key), every fleet's heartbeat snapshot under one canonical key, `{"", "", fleetBoxesPart(fleet)}` (`liveWindow`, a `boxSnapshot` each, loader `loadFleetBoxes`), shared by the instance page's system-wide box view (`systemBoxes`), its account rollout join (`loadRolloutJoin`), the GeoIP inventory and the account pages (Task 14). Which fleets a consumer may see is decided per request from the registry: the rollout join and the account pages keep only fleets whose `Account` is the viewer's account, exactly as `apiinstances.go:514-570` filters today, so the shared deployment-wide entry never widens what an account sees *(Astra round 6, finding 2)*, `updatesPage`'s record and manifest (`{sqid, app, "updates:<host>"}`, `liveWindow`), the GeoIP inventory as facts only: the platform boxes (`partBoxes`) and one heartbeat snapshot per fleet (`{"", "", fleetBoxesPart(fleet)}`, the same entries as the instance page's fleet boxes). The expected inventory (which fleets and boxes exist, `ListFleets`/`ListFleetBoxes`, `apisystemgeoip.go:281`) is read from the registry per request, and selects which fleet entries the request needs. A fleet registered since is then a miss for its own entry, never absent from a stale aggregate. The region line's reads go through the same entries. Registry and SQLite reads stay direct.
- [ ] **Step 1: Write the failing tests:**
- `TestRunningWarmMakesNoRemoteCalls` and `TestInstancePageWarmMakesNoRemoteCalls`.
@@ -472,9 +476,10 @@ Spec §2.4 C row `instances.Report`: HTTP to the app host, 30 s cache, blocks up
- `TestAppReportNeverWakesAHibernatingHost`: with every route `Hibernate`, no host call is ever made (the rule at `instances.go:83-92`).
- `TestEdgeFreshnessCrossesItsBoundaryWithoutARefresh`: warm Running with fresh edge files; move `fx.clock` past the edges' freshness bound with no store change (the cached facts are now stale but served); the region line's freshness-dependent text changes on that very view, while a refresh is held with `HoldNext("list", …)`.
- `TestFleetAddedOrRemovedReachesGeoipInventory`: warm the instance page's update section; register a new fleet and box in the registry (no object-store write); the next view lists it (its own entry loads); remove it from the registry; the next view drops it, with no store write either way.
+ - `TestInstancePageReadsEachFleetOnce`: two fleets, one owned by the viewer's account and one by another; a cold instance page, then `waitBackground`: each fleet's heartbeat prefix appears once in `Keys()` (one entry serving both the system-wide view and the rollout join), and the assembled page's rollout section shows only the owned fleet.
- `TestAppReportIsKeyedByHost`: two eligible routes; the report is fetched from the first; mark it hibernating; the next view fetches from the second (a new entry) and never polls the hibernating one.
- `TestInstancePartRefusesAForeignHost`: `/apps/kass/part/instance?host=otherapp.carlosapp.dev` (the fixture's other app's route) is the same 404 the page gives for that host, with no S3 call.
-- [ ] **Step 2: Run** `go test ./internal/console/ -run 'TestRunningWarm|TestInstancePageWarm|TestRunningTabNeverWaits|TestAppReportNeverWakes|TestEdgeFreshnessCrosses|TestFleetAddedOrRemoved|TestAppReportIsKeyedByHost|TestInstancePartRefuses|TestRunningTabTimesTheAppHost|TestDeferredAppReportCountsAsBackground' -count=1`. Expected: FAIL.
+- [ ] **Step 2: Run** `go test ./internal/console/ -run 'TestRunningWarm|TestInstancePageWarm|TestRunningTabNeverWaits|TestAppReportNeverWakes|TestEdgeFreshnessCrosses|TestFleetAddedOrRemoved|TestInstancePageReadsEachFleetOnce|TestAppReportIsKeyedByHost|TestInstancePartRefuses|TestRunningTabTimesTheAppHost|TestDeferredAppReportCountsAsBackground' -count=1`. Expected: FAIL.
- [ ] **Step 3: Implement.** This task's existing tests run unchanged on the untracked fixture. Plan 1's `TestRunningTabTimesTheAppHost` stays meaningful there: the report is fetched inline on the request, so the `box` span is in its `Server-Timing`. Add `TestDeferredAppReportCountsAsBackground`: on `newPerfFixture`, a cold Running tab's sample has no `box` call, `PerfBackground()["box"]` rose by one, and the `instances-report` part's assembled body has the report. Update the claim probes whose markers moved into a part.
- [ ] **Step 4: Run** Step 2's command, `go test ./internal/console/ -run 'TestInstancesTab|TestRunningTab|TestRunningLeftovers|TestInstancePage|TestBrowserRestart|TestBrowserUpdates|TestInstanceReport|TestClaimRead' -count=1`, and the walk with `CI=1`.
- [ ] **Step 5: Delete** the `over:` records for `/instances` and `/instances/{host}`; walk (PASS); commit, message `console: Running and the instance page read through the view cache; the app's self-report is a deferred part`, ending with the Co-Authored-By line.
@@ -515,15 +520,16 @@ Spec §2.4 C rows `settingsGates` (cache), `aliasReadings`/`LoadBoxes` (cache, o
- Test: `internal/console/viewscreens_test.go` (extend)
**Interfaces:**
-- Produces: parts `settings` (its `Gate` reads `?section=` and refuses one not in `appSettingsSections`, as the page refuses the path) and `domain-readings` (the box readings on Domains alone, deferred on a miss of `partBoxes` while the rest of Domains renders). Reads through `viewGet`, keyed `{sqid, app, …}` with `writtenWindow` unless marked live: `settingsGates`' records (`partGates`; the plan limits shown beside them, `EffectiveLimits`, are SQLite and joined per request), the claims listing (`partClaims`; `ClaimCache` stays underneath), `warmRecords` (`partCertWarm`, live), catch-all facts, not views (Astra round 4, finding 4): the release manifest each catch-all claim derives from (`{sqid, app, partCatchall}`, `writtenWindow`, loader `loadCatchallManifests`), and each proof TXT answer (`{"", "", "dns:" + name}`, `liveWindow`, loader `loadCatchallTXT` through `env.LookupTXT`: DNS is outside the object store, so its entry has no read set and is refreshed by its window alone, which is the same freshness the live check has today). The catch-all rows (`domaincatchall.go:279-320`) are built per request from those facts, the current `partBoxes` readings, the certificate records and `s.now()`, `appDeployEmpty` (`partDeployEmpty`), `envCards` (`partEnvs`: the config bundles and store records only; the route-derived host list each card shows is joined per request from `p.Detail.Routes`, rule (a)), `storeCard` and `storeEnvCards` (`partStore`), `mailCard` (`partMail`), `featuresCard` (`partFeatures`), `telemetry.Resolve` on `errors-analytics` (Task 12's key), `loadSwapPolicy` (`partSwap`); `aliasReadings` reads the shared `partBoxes` entry. Placement is local and stays direct. The pipeline section reads the core's pipeline (Task 9).
+- Produces: parts `settings` (its `Gate` reads `?section=` and refuses one not in `appSettingsSections`, as the page refuses the path) and `domain-readings` (the box readings on Domains alone, deferred on a miss of `partBoxes` while the rest of Domains renders). Reads through `viewGet`, keyed `{sqid, app, …}` with `writtenWindow` unless marked live: `settingsGates`' records (`partGates`; the plan limits shown beside them, `EffectiveLimits`, are SQLite and joined per request), the claims, without `ClaimCache` (the server-owned incremental cache at `domains/claimcache.go:47`, which a restricted loader can neither be handed nor capture): an index entry `{"", "", partClaims}` (`writtenWindow`, loader `loadClaimIndex`: one `ListMod` of the claims prefix, keys and modification times), and one entry per claim at the modification time listed, `{"", "", "claim:" + key + "@" + modtime}` (`writtenWindow`, loader `loadClaim`: one `Get`). Per request the index selects the entries; an unchanged claim is a hit, and a changed one has a new modification time, so it is a new entry and one `Get`. That is `ClaimCache`'s read cost, one listing plus a `Get` per changed claim, kept by the view cache instead of a second cache. Superseded entries age out by the LRU. `ClaimCache` stays for its other callers (the domain doors and passes). *(Astra round 6, finding 1.)*, `warmRecords` (`partCertWarm`, live), catch-all facts, not views (Astra round 4, finding 4): the release manifest each catch-all claim derives from (`{sqid, app, partCatchall}`, `writtenWindow`, loader `loadCatchallManifests`), and each proof TXT answer (`{"", "", "dns:" + name}`, `liveWindow`, loader `loadCatchallTXT` through `env.LookupTXT`: DNS is outside the object store, so its entry has no read set and is refreshed by its window alone, which is the same freshness the live check has today). The catch-all rows (`domaincatchall.go:279-320`) are built per request from those facts, the current `partBoxes` readings, the certificate records and `s.now()`, `appDeployEmpty` (`partDeployEmpty`), `envCards` (`partEnvs`: the config bundles and store records only; the route-derived host list each card shows is joined per request from `p.Detail.Routes`, rule (a)), `storeCard` and `storeEnvCards` (`partStore`), `mailCard` (`partMail`), `featuresCard` (`partFeatures`), `telemetry.Resolve` on `errors-analytics` (Task 12's key), `loadSwapPolicy` (`partSwap`); `aliasReadings` reads the shared `partBoxes` entry. Placement is local and stays direct. The pipeline section reads the core's pipeline (Task 9).
- [ ] **Step 1: Write the failing tests:**
+ - `TestClaimsCostOneListingAndChangedGets`: 20 claims, Domains warm; change one claim through its door; between the warm view and the next Domains view (the write's re-read included) the claims prefix is listed once and one claim is fetched, the same count an uncached `ClaimCache` makes for one changed claim over the same store (measured in the test).
- `TestEverySettingsSectionWarmMakesNoCalls` (one sub-test per key of `appSettingsSections`, with the populated seeds).
- `TestDomainsArrivesBeforeBoxReadings`: cold, latency on, 50 fresh box snapshots seeded: Domains answers within 150 ms with a `data-part` for `domain-readings`.
- `TestDomainAttachShowsTheNewDomain`: warm Domains; attach `shop.example.com`; the redirect target shows it with zero S3 calls.
- `TestPipelineSaveShowsTheNewPipeline`: warm the pipeline section; save a changed pipeline; the redirect target shows it with zero S3 calls.
- `TestRenameFailureRerendersWithoutStaleData`: the existing rename-failure re-render (`renderAppSettingsForm`) still shows its message and the current values.
-- [ ] **Step 2: Run** `go test ./internal/console/ -run 'TestEverySettingsSection|TestDomainsArrives|TestDomainAttachShows|TestPipelineSaveShows|TestRenameFailureRerenders' -count=1`. Expected: FAIL.
+- [ ] **Step 2: Run** `go test ./internal/console/ -run 'TestClaimsCostOneListing|TestEverySettingsSection|TestDomainsArrives|TestDomainAttachShows|TestPipelineSaveShows|TestRenameFailureRerenders' -count=1`. Expected: FAIL.
- [ ] **Step 3: Implement.** Existing settings tests run unchanged on the untracked fixture; run the nav plan's `TestAppSettingsSectionRoutes` and `TestErrorsAndAnalyticsSection` on `newPerfFixture` too. Remove the skips of `TestShipRefreshesDeployEmpty` and `TestInstanceCreateRefreshesHostsAndEnvs` (Task 8). Update the `settings/{section}` claim probe if its marker moved.
- [ ] **Step 4: Run** Step 2's command, `go test ./internal/console/ -run 'TestAppSettings|TestBucketless|TestDomain|TestAppGate|TestAppRateLimit|TestStoreDestroy|TestPipeline|TestAppSwap|TestControlPlane|TestErrorsAndAnalyticsSection|TestClaimRead' -count=1`, and the walk with `CI=1`.
- [ ] **Step 5: Delete** the `over:` records for the settings sections and `/settings`; walk (PASS); commit, message `console: settings sections read through the view cache; box readings deferred on Domains`, ending with the Co-Authored-By line.
@@ -536,7 +542,7 @@ Spec §2.4 C rows `settingsGates` (cache), `aliasReadings`/`LoadBoxes` (cache, o
- Test: `internal/console/viewscreens_test.go` (extend)
**Interfaces:**
-- Produces: parts in `accountParts`: `apps` (the account home's app list; each app's channels through Task 9's per-app `partCore` entries, so the home page and the app tabs share them), `settings` (its `Fill` keeps the owner-only panes behind the role check the page uses), `fleet`, `fleets` (its `Gate` reads `?fleet=` and runs `resolveOwnedFleet` as the page does), `trash` (the delete form for owners only, as the page), `new-app`. Reads through `viewGet`: `fleet.json` (`{"", "", partFleetJSON}`, `liveWindow`), each owned fleet's boxes (Task 11's key), the store entitlement (`{sqid, "", partEntitlement}`, `writtenWindow`), the account telemetry (`{sqid, "", partAccountTelemetry}`, `writtenWindow`), tombstones, one entry per trashed app (`{sqid, "", trashPart(app)}`, `writtenWindow`, loader `loadTombstone`; the list of trashed apps is SQLite, read per request, rule (b); a delete's tombstone write primes the new app's entry through Task 8's one primer, so the redirect's Trash view makes no read), the region picker's edges snapshot and boxes (the shared `partEdges` and `partBoxes`). Minting a first account (`server.go:2382`) is a write, unchanged.
+- Produces: parts in `accountParts`: `apps` (the account home's app list; each app's channels through Task 9's per-app `partCore` entries, so the home page and the app tabs share them), `settings` (its `Fill` keeps the owner-only panes behind the role check the page uses), `fleet`, `fleets` (its `Gate` reads `?fleet=` and runs `resolveOwnedFleet` as the page does), `trash` (the delete form for owners only, as the page), `new-app`. Reads through `viewGet`: `fleet.json` (`{"", "", partFleetJSON}`, `liveWindow`), each owned fleet's boxes (Task 11's canonical `fleetBoxesPart(fleet)` entries, filtered per request to fleets the account owns), the store entitlement (`{sqid, "", partEntitlement}`, `writtenWindow`), the account telemetry (`{sqid, "", partAccountTelemetry}`, `writtenWindow`), tombstones, one entry per trashed app (`{sqid, "", trashPart(app)}`, `writtenWindow`, loader `loadTombstone`; the list of trashed apps is SQLite, read per request, rule (b); a delete's tombstone write primes the new app's entry through Task 8's one primer, so the redirect's Trash view makes no read), the region picker's edges snapshot and boxes (the shared `partEdges` and `partBoxes`). Minting a first account (`server.go:2382`) is a write, unchanged.
- `app_new.html`'s region and timezone initializer (today an inline script in the body using `document.currentScript`, `templates/app_new.html:22`) moves into the frame. It runs once on `DOMContentLoaded` and again on `carlos:part` for the `new-app` part, and finds the hidden timezone input and the automatic-region label by id inside the root it is given. The fragment carries no script. *(Astra round 3, finding 5.)*
- [ ] **Step 1: Write the failing tests:**
@@ -629,6 +635,7 @@ Spec §2.4 C last row: `SetMaxOpenConns(1)` (`store.go:99`, `store_gate.go:1828`
- **Spec coverage.** §2.4 C, row by row: account manifest (Task 2, now off the response path), `SetLastAccount` (Task 2), `AccountsFor` and `registry.List` once (Task 2), `assembleChannels` (Task 9), `dnsTargets` fold (Task 3), Overview `Versions` bounded and cached (Tasks 3, 9), pipeline once (Task 3), `instances.Report` (Task 11), `populateAppSettings` (Task 4), `appDeployEmpty` (Task 4), `settingsGates` (Task 13), `aliasReadings` (Task 13), `envCards` + `storeEnvCards` (Task 4), console DB (Task 16). Concurrency as a fallback: part endpoints start every missing load before waiting (Task 7). §2.4 A: serve cached, background refresh single flight (Task 6), miss renders a placeholder (Tasks 7, 9 to 14), read your own writes declared at the mutation, generations covering in-flight loads, re-read in the request, invalidated on failure (Tasks 6, 8; end to end in Tasks 10, 13, 14, 15), refresh only on view (Global Constraints, Task 6), windows (Task 6), "as of" (Tasks 6, 7). §2.4 B: fetch parts following the Logs pattern, HTML fragments from the same templates, no framework, usable without JavaScript, gated like their page (Task 7; Logs through its own data endpoint in Task 12). §2.5 step 3 order: C (Tasks 2 to 5), then A and B (Tasks 6 to 15). §2.6: Task 17. Every task that makes a screen fast deletes its `over:` records; Task 17 ends with none and with a lower whole-session S3 total.
- **Review round 1 (Astra, at `e9f42e19`), findings that applied here:** 1 parts run their page's own gate, no operator part routes, refused store operator tested (Tasks 7, 15); 2 effects declared per door with cross-scope rules (Task 8; Tasks 14, 15 tests); 3 generations cover first loads and refreshes in flight (Task 6); 4 marking at the mutation after admission and success, refusals tested (Task 8); 5 immutable values with `viewClone` and a concurrent `-race` render test (Tasks 6, 9); 6 the production flag cached, the route-dependent view derived per request (Task 9); 7 claim route, fixture and probe entries (Task 7); 8 `HoldNext` keeps the read's result and holds one read only (Tasks 2, 10); 10 page and `/logs/data` share the first window (Task 12); 11 the manifest check off the response path, tested with a held read (Task 2); 12 written against the nav plan's code, test conversion owned here, Live now survives a failed listing (Branch notes, Tasks 9, 10); 13 `boxSnapshot` keeps completeness (Task 5); 14 whole-session S3 ceiling (Task 17, with plan 1 Task 10).
+- **Astra round 6 (`CODEX-FINDINGS-CONSOLE-PLANS-R6.md`):** 1 claims cached as an index plus per-claim entries keyed by modification time, `ClaimCache`'s cost without a second cache (Task 13); 2 one canonical `fleetBoxesPart(fleet)` key, account filtering per request, and a two-consumer witness (Tasks 11, 14); 3 fixture deletes forwarded through the observed store, a forwarding test and a warmed canary-retirement case (Task 8); 4 the cache reads `s.now` through an indirection and is reset in place, so the tracker stays bound (Task 6).
- **Astra round 5 (`CODEX-FINDINGS-CONSOLE-PLANS-R5.md`):** 1 bills per month and fleet meters per fleet, box and day, selected per request, with rollover and period-switch witnesses (Task 15); 2 edge files and per-fleet snapshots cached as raw facts, liveness and the expected inventory derived per request, and a reviewed callee list for cross-package calls (Tasks 6, 11); 3 the app-host capability `env.AppHost`, host chosen per request and keyed (Tasks 6, 11); 4 errors cached as text (Tasks 5, 6, 9); 5 the `carlos:part` payload stated as the contract (Task 7).
- **Astra round 4 (`CODEX-FINDINGS-CONSOLE-PLANS-R4.md`):** rule (a) made structural, `viewLoadEnv` and `TestViewLoadersAreRestricted` (Task 6); 1 published and in-flight read sets, published replaced only on success (Task 6); 2 economics caches per-day usage, scenario, bill and fleet-meter facts, with tiers, accounts, registry and period derived per request, plus a tier-save witness (Task 15); 3 one metrics entry, loader, type and window (Task 9, consumed by Task 15); 4 catch-all caches manifest and TXT facts, rows per request (Task 13); 5 a tombstone primer (Tasks 8, 14); 6 the coverage oracle walks `perfWalkTargets` (Task 8).
- **Astra round 3 (`CODEX-FINDINGS-CONSOLE-PLANS-R3.md`):** the class behind R1-2, R2-4 and R3-3 is fixed by invalidating by read set (Task 8), checked by the coverage oracle in `TestClaimConsoleMutationInvariant` and the warm-before-write cases (deploy-empty on ship, record hosts and environments on instance create, Architecture on scenario activation); the scripts class (R2-3, R3-5) by the no-script-in-fragments rule, the `carlos:part` event and `app_new.html`'s initializer (Tasks 7, 14); 2 operator records kept until operator-pages Task 13 in both orders (Task 15); 4 the host picker is its own part (Task 12); 6 untracked fixtures read inline, so plan 1's instrumentation tests keep their meaning, and background attribution is asserted (Tasks 8, 9, 11); 9 `bgWork` and `waitBackground` cover every request-triggered worker (Task 6); R2-6 `Assemble` takes `now` (Task 9).
diff --git a/docs/superpowers/plans/2026-10-25-console-ux-nav.md b/docs/superpowers/plans/2026-10-25-console-ux-nav.md
index 8be691b43..7354346d3 100644
--- a/docs/superpowers/plans/2026-10-25-console-ux-nav.md
+++ b/docs/superpowers/plans/2026-10-25-console-ux-nav.md
@@ -19,7 +19,7 @@
- **Copy deck first.** Task 1 builds `docs/superpowers/plans/2026-10-25-console-ux-nav-copy.md`: every new or changed user-facing string with id, where, old, new, checked by, status. A Luna pass (codex, `gpt-5.6-luna`) reviews it before any template changes. Later tasks use the approved deck text **verbatim** and add their ids to `navCopyBuilt` (Task 1's gate). A string not in the deck is not written.
- **House voice.** No em dashes in new or changed strings: use a full stop and a new sentence, continuing in lower case where the string is CLI or error text, normal sentence case in page prose. Human text only. Error fragments, diagnostics, JSON keys and URLs stay out of the deck. No tenant names in code, tests, fixtures or copy: new tests and examples use neutral names (`shop`, `example.com`, `web-1.example.com`). Existing fixtures (`kass`, `titogo`) are reused as they are, never newly introduced.
- **Copy scope trap.** Before applying a rewrite, count the string's occurrences at the base commit (`git grep -n '<text>' 0d2e2762 -- internal/console`) and change only the occurrences the deck row names. "Instances" as a column header or a count noun ("Instances: 3 / 4") stays.
-- **URLs keep working.** Old URLs answer with a 303 redirect, never a 404: `/deployments` to `/releases`, `/pipeline` (GET) to `/settings/pipeline`, `/settings/advanced` to `/settings`. `POST /pipeline`, `POST /place`, and every other POST keep their path and behaviour. No new routes are registered, so `testdata/claim-routes.txt` does not change.
+- **URLs keep working.** Old URLs answer with a 303 redirect, never a 404: `/deployments` to `/releases`, `/pipeline` (GET) to `/settings/pipeline`, `/settings/advanced` to `/settings`. `POST /pipeline`, `POST /place`, and every other POST keep their path and behaviour. No new routes are registered, so `testdata/claim-routes.txt` does not change. **The perf walk moves with them:** perf plan 1 (landed first) walks every screen in `TestConsoleScreensMeetTheBudget` through `perfTargets` in `internal/console/perfwalk_test.go` (`type perfTarget struct { Path string; Expect int; Anonymous bool }`, keyed by route pattern) and checks every target's status, `over` records included. The commit that turns a page into a 303 also changes that screen's `perfTargets` entry to `Expect: 303` and adds a 200 target for the canonical page when the walk does not already reach it (Tasks 3, 5, 7). A new target whose warm call count exceeds the screen's allowance gets a `perf-budgets.txt` record with a reason, in perf 1's grammar, never a `skip`.
- **Gate order unchanged.** Console security gates stay session, CSRF, owner (byte-identical 404), `requireFreshAuth` last. Redirects run the session and membership gate (`accountApp`) before answering, so a non-member gets the same 404 an unknown account gets, never a 303.
- **Part 2 seam.** This plan lands first (see Merge order). Perf plan 2 later edits `handleAppInstances`, `handleAppSettings`/`populateAppSettings` and `handleAppReleases`, so keep each page's data flow explicit: Task 3 names every `p.Detail` field and store read the Releases page uses, in one place, so perf 2 can move them behind its cache without re-deriving them. Put new logic in named helpers. Behaviour perf 2 must keep: a failed version listing costs only the Versions part, never Live now (`TestReleasesLiveNowSurvivesListingFailure`). Do not add caching or timing here, and do not touch `instances.Report` or `assembleChannels`.
- **Tests.** Run only touched packages' tests, with `-run`. Never full `make test` locally; CI does the full run. `gofmt -l internal/console` prints nothing; `go vet ./internal/console/` is clean; `GOOS=darwin go build ./...` and `GOOS=windows go build ./...` pass. Leave `GOCACHE` at its default. Heavy runs (`TestClaimConsoleMutationInvariant`) go through `nice -n 19`, once per task that changes its tables.
@@ -224,7 +224,7 @@ Open each PNG with the Read tool. Pass: nine tabs in order with Overview (or Log
- Delete: `internal/console/templates/app_deployments.html`
- Modify: `internal/console/templates/app_overview.html:55,69,71,75`, `app_settings.html:563` (`DeploymentsCopy.History` becomes `.Title`; NAV-C36 to C39 text)
- Modify: `internal/console/templates/layout.html` (`.reveal > summary h2 { display: inline; font-size: inherit; margin: 0; }`)
-- Test: `internal/console/deployments_test.go`, `server_test.go` (`TestReleasesTab`), `pipelinepage_test.go:23-60,129-180`, `claim_invariant_fixtures_test.go:792`, `claim_invariant_probes_read_test.go:124`
+- Test: `internal/console/deployments_test.go`, `server_test.go` (`TestReleasesTab`), `pipelinepage_test.go:23-60,129-180`, `claim_invariant_fixtures_test.go:792`, `claim_invariant_probes_read_test.go:124`, `perfwalk_test.go` (`perfTargets`)
**Interfaces:**
- Produces: `func (s *Server) appRedirect(sub string) http.HandlerFunc` in `appredirect.go`. Calls `s.accountApp(w, r)`; on `ok` answers `http.Redirect(w, r, "/a/"+url.PathEscape(acct.Sqid)+"/apps/"+url.PathEscape(app)+sub, http.StatusSeeOther)`. No flash, query string dropped. Task 7 reuses it.
@@ -263,7 +263,8 @@ Open each PNG with the Read tool. Pass: nine tabs in order with Overview (or Log
- [ ] **Step 4: Implement** per the Interfaces block. Add `VersionCandidatesPage` and `VersionsPage`; in `handleAppReleases` replace the `Versions(r.Context(), …)` call with `VersionsPage(r.Context(), s.cfg.Releases, acct.Sqid, p.AppName, versionsPageParam(r))` and set `VersionsPageNum`, `VersionsMore`. Delete the `/deployments` branch, set `p.DeploymentTargets = liveNowTargets(p.Detail, assembleDeploymentTargets(p.Detail, acct.Sqid))` and load `p.Pending` exactly as the deleted branch did, before the existing release reads. Register the redirect. Point the activity channel link at `/releases`. Swap `DeploymentsCopy.History` for `.Title` and apply NAV-C36 to C39. Delete `app_deployments.html` and the `solorollback` define.
- [ ] **Step 5: Run** the Step 3 commands plus `go test ./internal/console/ -run 'TestAppTabBarIsOneLevel|TestNavCopyDeck|TestActivity|TestOverview|TestAPIVersion|TestRetention' -count=1` and `go test ./internal/release/ -run 'TestVersionCandidates|TestProgram|TestRootfsShip' -count=1` and `nice -n 19 go test ./internal/console/ -run '^TestClaimConsoleMutationInvariant$' -count=1`. Expected: PASS. Add NAV-C21 to C39 and NAV-C45 to `navCopyBuilt` first.
- [ ] **Step 6: Visual check.** Snapshot `releases` at 1280 and 390 (Task 2 Step 7 commands). Pass: callout, Live now, Versions open; three closed folds whose summaries read as headings; one Roll back.
-- [ ] **Step 7: Commit:** `git commit -m "Console: Releases is one page; /deployments redirects to it"`.
+- [ ] **Step 6b: Update the perf walk in this commit.** In `perfTargets`: `"GET /a/{sqid}/apps/{app}/deployments"` becomes `[]perfTarget{{Path: "/a/" + fx.sqid + "/apps/kass/deployments", Expect: 303}}`; `"GET /a/{sqid}/apps/{app}/releases"` becomes two targets, `/a/<sqid>/apps/kass/releases` and `/a/<sqid>/apps/kass/releases?page=2`, both `Expect: 200` (the fixture's page 2 is the empty-page state, which still runs the listing). Run `go test ./internal/console/ -run '^TestConsoleScreensMeetTheBudget$' -count=1`. Expected: PASS, structural checks clean and every status matching. If `?page=2`'s warm call count exceeds the releases screen's allowance, record it per the Global Constraints.
+- [ ] **Step 7: Commit:** `git commit -m "Console: Releases is one page; /deployments redirects to it"` (includes `perfwalk_test.go` and any `perf-budgets.txt` line).
---
@@ -310,7 +311,7 @@ Open each PNG with the Read tool. Pass: nine tabs in order with Overview (or Log
- Modify: `internal/console/server.go:3692-3702` (remove the Placement block from `handleAppInstances`; keep the region line), `server.go:3980-4024` (`handleAppSettings` calls the helper for `placement`; nav item)
- Modify: `internal/console/fleets.go:812-815` (`handleAppPlace` back to `/settings/placement`)
- Modify: `internal/console/templates/app_instances.html:60-79` (the region line stays, without the `<h2>Placement</h2>`), `app_settings.html` (new `placement` section)
-- Test: `internal/console/fleets_test.go:1243-1410`
+- Test: `internal/console/fleets_test.go:1243-1410`. `perfwalk_test.go` needs no edit: the `settings/{section}` targets derive from `appSettingsSections`, so adding `placement` adds `/settings/placement` with `Expect: 200`.
**Interfaces:**
- Produces: `func (s *Server) populateAppPlacement(p *page, acct *Account)` in `fleets.go`, beside `appPlacementSection`. It sets `AppPlacement`, `OwnedFleetNames`, `AppPlacementKnown`, and `FlashErr` from the warning when `FlashErr` is empty (the lines removed from `handleAppInstances`, moved verbatim).
@@ -325,6 +326,7 @@ Open each PNG with the Read tool. Pass: nine tabs in order with Overview (or Log
- [ ] **Step 2: Run** `go test ./internal/console/ -run 'TestAppPlacePage|TestAppSettingsPlacement|TestInstancesTabRegionLine|TestFleetPagePlaceForm' -count=1`. Expected: the three retargeted tests FAIL (404 on the section).
- [ ] **Step 3: Implement** per Interfaces. Add the `placement` nav item after Domains in `setAppSettingsSection` with the approved NAV-C40 label (Task 7 finishes the order).
- [ ] **Step 4: Run** the Step 2 command plus `-run 'TestAppSettingsSectionRoutes|TestClaimConsoleMutationInvariant'` (the claim run under `nice -n 19`). Expected: PASS; `TestAppSettingsSectionRoutes` may still list the old nav until Task 7 and must not fail here (it checks presence, not order). Add NAV-C40 to `navCopyBuilt`.
+- [ ] **Step 4b: Run the perf walk:** `go test ./internal/console/ -run '^TestConsoleScreensMeetTheBudget$' -count=1`. Expected: PASS, with `/settings/placement` answering 200. Over-allowance calls get a budgets record per the Global Constraints.
- [ ] **Step 5: Commit:** `git commit -m "Console: Placement moves from Running to Settings"`.
---
@@ -361,7 +363,7 @@ Open each PNG with the Read tool. Pass: nine tabs in order with Overview (or Log
- Modify: `internal/console/errorsview.go:310` (`handleAppErrorLevel`'s `back`) and `internal/console/analyticsview.go:99` (`handleAppAnalyticsSetting`'s `back`): `appSettingsURL(acct.Sqid, app, "general")` becomes `appSettingsURL(acct.Sqid, app, "errors-analytics")`. That one variable carries every success and refusal redirect in each handler (errorsview.go:316,321,329,334; analyticsview.go:105,110,118,126). The account-level handlers below them are unchanged.
- Test: `internal/console/apianalytics_test.go:73-91` (`TestSettingsPagesShowAnalyticsSwitch` reads `/settings`)
- Modify: `internal/console/templates/app_settings.html:356-404` (Errors and Analytics blocks move to `errors-analytics`), `:521-551` (Control plane card moves to the end of General), `app_errors.html:78` (NAV-C43), `app_analytics.html:10-13` (NAV-C44), `app_releases.html` one-channel hint (already `/settings/pipeline` from Task 3)
-- Test: `internal/console/appsettings_sections_test.go`, `controlplane_test.go:58,346,359,442,450,495,928,1135,1188`, `claim_invariant_probes_read_test.go:130,133`, `claim_invariant_fixtures_test.go:798`
+- Test: `internal/console/appsettings_sections_test.go`, `controlplane_test.go:58,346,359,442,450,495,928,1135,1188`, `claim_invariant_probes_read_test.go:130,133`, `claim_invariant_fixtures_test.go:798`, `perfwalk_test.go` (`perfTargets`)
**Interfaces:**
- Consumes: `appRedirect` (Task 3).
@@ -381,7 +383,8 @@ Open each PNG with the Read tool. Pass: nine tabs in order with Overview (or Log
- [ ] **Step 2: Run** `go test ./internal/console/ -run 'TestAppSettings|TestErrorsAndAnalyticsSection|TestTelemetryHints|TestTelemetrySaves|TestSettingsPagesShowAnalyticsSwitch|TestAppErrorLevel|TestAppAnalytics|TestPipelineSettings|TestControlPlane|TestBucketlessSettings' -count=1`. Expected: new and rewritten tests FAIL.
- [ ] **Step 3: Implement** per Interfaces; apply NAV-C41 to C44 verbatim. Moved blocks move unchanged.
- [ ] **Step 4: Run** the Step 2 command, then `nice -n 19 go test ./internal/console/ -run '^TestClaimConsoleMutationInvariant$' -count=1`. Expected: PASS. Add NAV-C41 to C44 to `navCopyBuilt`.
-- [ ] **Step 5: Commit:** `git commit -m "Console: settings sidebar gains Placement and Errors and analytics; Advanced folds into General"`.
+- [ ] **Step 4b: Update the perf walk in this commit.** In `perfTargets`: `"GET /a/{sqid}/apps/{app}/pipeline"` becomes `[]perfTarget{{Path: "/a/" + fx.sqid + "/apps/kass/pipeline", Expect: 303}}`; `"GET /a/{sqid}/apps/{app}/settings/{section}"` keeps its targets derived from `appSettingsSections` (now walking `errors-analytics` and `placement`, still walking `pipeline` as `/settings/pipeline`, no longer deriving `advanced`) and appends one explicit `{Path: "/a/" + fx.sqid + "/apps/kass/settings/advanced", Expect: 303}`. Run `go test ./internal/console/ -run '^TestConsoleScreensMeetTheBudget$' -count=1`. Expected: PASS, with 303 for `/pipeline` and `/settings/advanced` and 200 for `/settings/pipeline`, `/settings/errors-analytics` and `/settings/placement`.
+- [ ] **Step 5: Commit:** `git commit -m "Console: settings sidebar gains Placement and Errors and analytics; Advanced folds into General"` (includes `perfwalk_test.go`).
---
@@ -430,6 +433,7 @@ GOOS=darwin go build ./... && GOOS=windows go build ./...
go test ./internal/console/ -run 'TestNavCopyDeck|TestAppTabBar|TestReleases|TestDeployment|TestRunning|TestToolbar|TestLogsToolbar|TestAppSettings|TestErrorsAndAnalytics|TestTelemetryHints|TestPipelineSettings|TestControlPlane|TestPageHeads|TestTrash|TestAccountSettings|TestHeaderWraps|TestOneChannelApp|TestAppPlace|TestInstancePage|TestVersionsPage|TestTelemetrySaves' -count=1
go test ./internal/release/ -run 'TestVersionCandidates' -count=1
nice -n 19 go test ./internal/console/ -run '^TestClaimConsoleMutationInvariant$' -count=1
+go test ./internal/console/ -run '^TestConsoleScreensMeetTheBudget$' -count=1
```
Expected: all clean and PASS. Confirm `navCopyBuilt` holds every deck id.
@@ -440,7 +444,7 @@ Expected: all clean and PASS. Confirm `navCopyBuilt` holds every deck id.
## Self-review notes
- **Spec coverage.** 1.1: Task 2 (tabs, no sub-tabs), Task 9 (390 px header). 1.2: Task 4 (heading, Restart app, toolbar, All count, leftovers), Task 5 (BYO pointer now says Settings, Placement). 1.3: Task 3. 1.4: Tasks 5 and 7; "each section is built on its own" is Part 2's (spec 2.4, `populateAppSettings`), named in the Part 2 seam constraint. 1.5: out of scope by instruction. 1.6: toolbar (Tasks 4, 6; economics excluded), danger style (Tasks 3, 8; store Decline excluded as a `/fleet*` page; app delete and Roll back already use it), page heads (Task 8; operator pages excluded), account settings rows (Task 8), help-text pointers (Tasks 7, 8), Trash per-row delete (Task 8). 1.3's "link to older ones": Task 3's pager.
-- **Astra review (e9f42e19) dispositions.** Finding 9: accepted, Task 3 now pages Versions (`VersionsPage`, `?page=`) and tests that version 21 onward is reachable; cost stays one listing plus 20 manifest reads per page. Finding 15: accepted, Task 7 moves both app-level POST handlers' redirects and asserts them. Round 2 finding 2: accepted, `VersionsPage` and `VersionCandidatesPage` take `ctx` and the plan uses perf 1's `Versions(ctx, …)`. Finding 12: merge order stated in the header; Task 3 lists the Releases data flow for perf 2; perf 2 owns the fragment-test conversion.
+- **Astra review (e9f42e19) dispositions.** Finding 9: accepted, Task 3 now pages Versions (`VersionsPage`, `?page=`) and tests that version 21 onward is reachable; cost stays one listing plus 20 manifest reads per page. Finding 15: accepted, Task 7 moves both app-level POST handlers' redirects and asserts them. Round 6 finding 5: accepted, Tasks 3, 5 and 7 update `perfTargets` in the commit that changes each status (303 for `/deployments`, `/pipeline`, `/settings/advanced`; 200 targets for `/releases`, `/releases?page=2`, `/settings/pipeline`, `/settings/errors-analytics`, `/settings/placement`). Round 2 finding 2: accepted, `VersionsPage` and `VersionCandidatesPage` take `ctx` and the plan uses perf 1's `Versions(ctx, …)`. Finding 12: merge order stated in the header; Task 3 lists the Releases data flow for perf 2; perf 2 owns the fragment-test conversion.
- **Spec citations re-checked against 0d2e2762.** The Overview pointer is now `app_overview.html:69,71,75` (spec says :62) and the tile heading at :55; the settings pointer is `app_settings.html:563` (spec says :494); `fleet_byo.html:76-77`; `lognav` now holds Availability as a fourth sub-tab; an extra leftover link sits at `app_settings.html:202`; the activity feed links channel targets to `/deployments` at `server.go:3965`.
## Decisions taken as my call