carlos / platform Public

Record-write census: admitDBRead re-digested for the Incarnation move

Its writes are the same nonrecord conditional creates under db-reads/;
only the incarnation call moved from hostclaim to provision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 3161e43504cead652b977bd453c7301910cf8068 parent 828f1d0
2 files changed, +31 −1
  • internal/provision/claims_cleanup_r1_census_test.go +30 −0
  • internal/provision/plan9_b8_census_test.go +1 −1

CI failed — run details

diff --git a/internal/provision/claims_cleanup_r1_census_test.go b/internal/provision/claims_cleanup_r1_census_test.go
new file mode 100644
index 000000000..1ec2bd3ab
--- /dev/null
+++ b/internal/provision/claims_cleanup_r1_census_test.go
@@ -0,0 +1,30 @@
+package provision
+
+// Record-write census entries for claims cleanup R1 (branch
+// claims-cleanup-r1: the live slices move out of the claim packages),
+// layered on edgeProtection2WriteCensusInventory (main's newest at
+// 96564cf3). Reviewed by the branch author; the census owner rules on #280
+// with the root-read card.
+// - admitDBRead computes the request's incarnation with
+// provision.Incarnation instead of hostclaim.Incarnation, the same
+// function moved (its golden vectors are incarnation_golden_test.go).
+// Its writes are the same conditional creates under db-reads/ in the
+// deployment bucket: still nonrecord. No write site is added.
+func claimsCleanupR1WriteCensusInventory() []censusEntry {
+ entries := append([]censusEntry(nil), edgeProtection2WriteCensusInventory()...)
+ replacements := []censusEntry{
+ {"internal/console/apidbforward.go", "Server.admitDBRead", "nonrecord", "sel:Put", "cbdbd19a26552c186e582c80342321d7f74fc9719cd78644e6a3f42f4a41b9cd"},
+ }
+ 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
+}
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go
index ba9af913e..545886fc4 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 := edgeProtection2WriteCensusInventory()
+ inventory := claimsCleanupR1WriteCensusInventory()
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 "))