carlos / platform Public

console-perf-hot-routes: re-pin two record-write census key-sites

TestPlan9B8RecordWriteCensus pins handleAPIInstanceList and pageRecords
by digest. Both now read concurrently; neither writes a record, and
neither's class or site kind changes. Re-pinned in a branch overlay
(consolePerfHotRoutesWriteCensusInventory) for the census owner's ruling
on #280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 2f02ad62afebca6bd1d242df4dd1c80f5f4ff7a3 parent f16640d
2 files changed, +33 −1
  • internal/provision/console_perf_hot_routes_census_test.go +32 −0
  • internal/provision/plan9_b8_census_test.go +1 −1

CI passed — run details

diff --git a/internal/provision/console_perf_hot_routes_census_test.go b/internal/provision/console_perf_hot_routes_census_test.go
new file mode 100644
index 000000000..b53727e2a
--- /dev/null
+++ b/internal/provision/console_perf_hot_routes_census_test.go
@@ -0,0 +1,32 @@
+package provision
+
+// Record-write census entries for console-perf-hot-routes, layered on
+// plans6bWriteCensusInventory (main's newest at 5f4df955). Reviewed by the
+// branch author; the census owner rules on #280. No record write is added
+// anywhere, and no class or site kind changes: each unit below is re-pinned
+// because its reads now run concurrently.
+// - Server.handleAPIInstanceList: the record listing, the rollout join's
+// box reports, the edges files and instances.json are read at once
+// (runConcurrently). Same "instances" literal: still key-site.
+// - Server.pageRecords: each listed host's record (and, judged, its slot
+// after it) is read ten hosts at a time, kept in host order. Same
+// RecordsPrefix listing: still key-site.
+func consolePerfHotRoutesWriteCensusInventory() []censusEntry {
+ entries := append([]censusEntry(nil), plans6bWriteCensusInventory()...)
+ replacements := []censusEntry{
+ {"internal/console/apiinstances.go", "Server.handleAPIInstanceList", "key-site", "lit:instances", "75fea29320ab769047d0e36e0a00ed2adbe9a2b4e6e45d1af7786ca3e8c0414d"},
+ {"internal/console/remoteinstances.go", "Server.pageRecords", "key-site", "key:RecordsPrefix", "56021ef9c7f57a3dbbad6da4b61d11a06354e86d4d53199d193b6a9baf6968c9"},
+ }
+ for _, r := range replacements {
+ found := false
+ for i, e := range entries {
+ if e.File == r.File && e.Unit == r.Unit {
+ entries[i], found = r, true
+ }
+ }
+ if !found {
+ panic("console-perf-hot-routes replacement of an unlisted unit " + r.File + ":" + r.Unit)
+ }
+ }
+ return entries
+}
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go
index ed18fb01b..67ed78019 100644
--- a/internal/provision/plan9_b8_census_test.go
+++ b/internal/provision/plan9_b8_census_test.go
@@ -366,7 +366,7 @@ func TestPlan9B8RecordWriteCensus(t *testing.T) {
if len(got) < 100 {
t.Fatalf("census found only %d units under %s; the walk is broken", len(got), root)
}
- inventory := plans6bWriteCensusInventory()
+ inventory := consolePerfHotRoutesWriteCensusInventory()
problems := append(censusDiff(inventory, got), censusPolicy(inventory)...)
if len(problems) > 0 {
t.Fatalf("record-write census rejected %d site(s); update the explicit inventory only after reviewing the source:\n %s", len(problems), strings.Join(problems, "\n "))