carlos / platform Public

census: re-pin placeAppTarget for the G6 born-HA place refusal

Task 4 (bcfb3c00) changed Server.placeAppTarget: a born-HA refusal and
an incarnation read, early and under the locks, and a conditional SQLite
placement write. Its record walk (RecordsPrefix, SetRecordRegion) is
unchanged, so it stays record-writer with the same kinds. A new overlay,
g6PoolWriteCensusInventory, re-pins its digest on top of drill 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev c38ea7bf0a517a12553173d94675ed30a43942b2 parent 34e1bd4
2 files changed, +39 −1
  • internal/provision/g6_pool_census_test.go +38 −0
  • internal/provision/plan9_b8_census_test.go +1 −1

CI failed — run details

Intent

Attributed to this commit: 20.1 g CO₂e (2,627,578 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on g6-pool, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/internal/provision/g6_pool_census_test.go b/internal/provision/g6_pool_census_test.go
new file mode 100644
index 000000000..5098afbb1
--- /dev/null
+++ b/internal/provision/g6_pool_census_test.go
@@ -0,0 +1,38 @@
+package provision
+
+// g6PoolWriteCensusInventory is the G6 pool path's (born-HA apps for
+// allowed accounts) review of the record-write census, layered on stateless
+// replicas Plan 4's drill 1 inventory. Self-review only; the independent
+// #280 verdict is the controller's.
+//
+// - Server.placeAppTarget (G6 Task 4, bcfb3c00): the record walk is
+// unchanged: it still lists RecordsPrefix and stamps each record's
+// region through SetRecordRegion, under the same account-then-app locks
+// and with the same refusals. The change adds placeHARefusal (a born-HA
+// app's row carries ha_pool: 409, its region is its pool's) and an
+// incarnation read, once early and again under the locks. Both only
+// read the console's SQLite row and write nothing. It also makes the
+// SQLite placement write conditional on that incarnation and an empty
+// ha_pool (SetAppPlacementIfContext in place of SetAppPlacementContext).
+// The unit refuses more and writes no new record key and no new bucket
+// object. record-writer, kinds as before.
+// - No other unit: at the branch tip (89802a44) the census rejects
+// placeAppTarget alone, so no record writer is new or changed beyond it.
+func g6PoolWriteCensusInventory() []censusEntry {
+ entries := append([]censusEntry(nil), statelessReplicas4Drill1WriteCensusInventory()...)
+ for _, r := range []censusEntry{
+ {"internal/console/fleets.go", "Server.placeAppTarget", "record-writer", "key:RecordsPrefix,key:SetRecordRegion", "0f5d1ea6cce906064cce62f686141d5c107333b86619921af0331bf64441f424"},
+ } {
+ replaced := false
+ for i, e := range entries {
+ if e.File == r.File && e.Unit == r.Unit {
+ entries[i], replaced = r, true
+ break
+ }
+ }
+ if !replaced {
+ 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 cbc9b9701..24b76f516 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 := statelessReplicas4Drill1WriteCensusInventory()
+ inventory := g6PoolWriteCensusInventory()
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 "))