carlos / platform Public

census: plans 4d-1 record-write layer (NewServer re-digested, the capID const block's sidecars literal)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev c2cf18d15002c1c7ccea1f47884f65947438a099 parent 9e0e208
2 files changed, +34 −1
  • internal/provision/plan9_b8_census_test.go +1 −1
  • internal/provision/plans4d_census_test.go +33 −0
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go
index 1e88e3ae1..06fc5da2f 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 := edgeAssetCache1WriteCensusInventory()
+ inventory := plans4dWriteCensusInventory()
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 "))
diff --git a/internal/provision/plans4d_census_test.go b/internal/provision/plans4d_census_test.go
new file mode 100644
index 000000000..c57d6df1a
--- /dev/null
+++ b/internal/provision/plans4d_census_test.go
@@ -0,0 +1,33 @@
+package provision
+
+// Record-write census entries for plans 4d-1 (plans-4d-lapse), layered on
+// edgeAssetCache1WriteCensusInventory (main's newest at the branch point).
+// No record writer is added: the lapse writes only console SQL and the
+// account's limits record through plans.PutLimits, which is not a
+// provision record.
+// - NewServer registers the keep page's two routes (GET and POST
+// /a/{sqid}/plan/keep); its one "instances" literal is the existing
+// logs/data route pattern, unchanged. Re-digested.
+// - plangrace.go's capID const block gains capSidecars = "sidecars" and
+// capCustomDomains: the stored name of the lapse-only workers cap, a
+// plan_cap_state key, not a bucket key. key-site, like
+// registerCLIRoutes' "sidecars" route literal.
+func plans4dWriteCensusInventory() []censusEntry {
+ entries := append([]censusEntry(nil), edgeAssetCache1WriteCensusInventory()...)
+ replacements := []censusEntry{
+ {"internal/console/server.go", "NewServer", "key-site", "lit:instances", "3d69a7865f93dc4cff178530a8a79457991802eeb1220844a3d8ecc51851cf10"},
+ {"internal/console/plangrace.go", "const#1", "key-site", "lit:sidecars", "77ae90530cb1571fcd224c2aa5a935d7a85dac476775bdb8d0ffe4c2e6afd289"},
+ }
+ 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 {
+ entries = append(entries, r)
+ }
+ }
+ return entries
+}