carlos / platform Public

Claims cleanup R2 task 2: record-write census drops the four deleted write units

Runner.backfillCollect, checkedStore.Put, putAttempts.Put and
publishActivationConsoleReport were deleted with their files in task 1.
Removals only; nothing added or re-pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 916a4d286c492a308e39f3cda9b432b57eedf850 parent 871079c
2 files changed, +30 −1
  • internal/provision/claims_cleanup_r2_census_test.go +29 −0
  • internal/provision/plan9_b8_census_test.go +1 −1
diff --git a/internal/provision/claims_cleanup_r2_census_test.go b/internal/provision/claims_cleanup_r2_census_test.go
new file mode 100644
index 000000000..820fa4128
--- /dev/null
+++ b/internal/provision/claims_cleanup_r2_census_test.go
@@ -0,0 +1,29 @@
+package provision
+
+// claimsCleanupR2WriteCensusInventory is the record-write inventory for
+// claims cleanup R2 (amadan #404), which deletes the claim activation
+// tooling. Removals only: each unit's file is gone from the tree, so none
+// of these writes exists any more, and nothing is added or re-pinned.
+func claimsCleanupR2WriteCensusInventory() []censusEntry {
+ removed := []struct{ file, unit string }{
+ {"internal/claimactivation/backfill.go", "Runner.backfillCollect"},
+ {"internal/claimactivation/runner.go", "checkedStore.Put"},
+ {"internal/host/activation_artifacts_linux.go", "putAttempts.Put"},
+ {"internal/host/activation_console_report_linux.go", "publishActivationConsoleReport"},
+ }
+ entries := append([]censusEntry(nil), edgeProtection2WriteCensusInventory()...)
+ for _, r := range removed {
+ found := false
+ for i, entry := range entries {
+ if entry.File == r.file && entry.Unit == r.unit {
+ entries = append(entries[:i], entries[i+1:]...)
+ found = true
+ break
+ }
+ }
+ if !found {
+ panic("claims cleanup R2 removal 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 ba9af913e..7275e8551 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 := claimsCleanupR2WriteCensusInventory()
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 "))