carlos / platform Public

ha: inventory G2 record scan and withdrawal writes

Classify the extracted scan separately and retain the reconcile key-site dispositions. Document the local-only guarded registry deletion.
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev c40ecadb034ba3e16d5db9735b4dead42fc16f91 parent d2d9299
2 files changed, +33 −1
  • internal/provision/plan9_b8_census_test.go +1 −1
  • internal/provision/region_ha_g2_fixes_census_test.go +32 −0
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go
index a0448c5f8..d18ccde3b 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 := agentStartDemo3WriteCensusInventory()
+ inventory := regionHAG2FixesWriteCensusInventory()
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/region_ha_g2_fixes_census_test.go b/internal/provision/region_ha_g2_fixes_census_test.go
new file mode 100644
index 000000000..61c545313
--- /dev/null
+++ b/internal/provision/region_ha_g2_fixes_census_test.go
@@ -0,0 +1,32 @@
+package provision
+
+// Reconcile now calls scanInstanceRecords for its existing judged collection
+// phase. The parser and instances prefix moved there; Reconcile retains only
+// RecordKey. Both remain key-sites, with no object-store record write.
+// Reconcile and ReconcileSidecars call withdrawPools before their normal pass.
+// That helper rereads the record around the stop/release proof and calls
+// Registry.DeleteWithdrawnRoute, which deletes only a matching local SQL row
+// without timers or an import journal. It does not write a bucket record and
+// has no 9B8 site; its SQL reads and deletion are on the G2 root census card.
+// These are author classifications; independent approval is controller-owned.
+func regionHAG2FixesWriteCensusInventory() []censusEntry {
+ entries := append([]censusEntry(nil), agentStartDemo3WriteCensusInventory()...)
+ for _, next := range []censusEntry{
+ {"internal/provision/reconcile.go", "Reconcile", "key-site", "key:RecordKey", "85efb4512f0c2c951200622c98bafec93611a5d0f5ce26742e37f13502f683a1"},
+ {"internal/provision/sidecar_reconcile.go", "ReconcileSidecars", "key-site", "key:ParseSidecarKey,key:SidecarRecordKey,lit:sidecars", "627916fd3ec528b907ac29afc459240250bf2b745b2a10e3c66104a4d7937c2c"},
+ {"internal/provision/reconcile.go", "scanInstanceRecords", "key-site", "key:ParseRecordKey,key:RecordKey,lit:instances", "a735d65ec321af3c04b01b8669b2552eed0d9291308722d3c85c9a7e19356974"},
+ } {
+ found := false
+ for i, old := range entries {
+ if old.File == next.File && old.Unit == next.Unit {
+ entries[i] = next
+ found = true
+ break
+ }
+ }
+ if !found {
+ entries = append(entries, next)
+ }
+ }
+ return entries
+}