package provision // s3ChangeIndexWriteCensusInventory is the record-write inventory for the S3 // change index (amadan #336; docs/superpowers/specs/2026-10-21-s3-change-index-design.md), // layered on dbRegionForward1WriteCensusInventory (main's newest, which is // itself over plans2WriteCensusInventory). Reviewed by the branch author; // PROPOSED, the census owner rules on #280 (census-ruling-s3-change-index). // // Re-pinned, class and kinds unchanged: // - DirStore.Put, DirStore.PutFrom, S3Store.Put, S3Store.PutFrom: each is // now its old body moved unchanged into an unexported raw method (putRaw, // putFromRaw), then, after a successful write and only on a store opened // with the change index (EnableChangeIndex, NewDeploymentS3Store), a bump // of control/changes.json (bumpAfterMutation). Still record-transport: // they write whatever key the caller names, record keys included. // - Reconcile and ReconcileSidecars: the record walk moves unchanged into a // scan closure over a store argument, and the removal phase into a retire // closure. Over a record view snapshot, a pass that reaches a removal the // snapshot proves by absence (record gone, a sidecar gone or no longer // placeable, the app's trash marker) runs scan again over the bucket and // decides every removal that pass from it, by the walk's own rules // (final review R1, findings 2 and 4); a walk that cannot read cleanly // keeps every row. No record write is added; they stay key-site. // // New: // - snapStore.Put, snapStore.PutFrom: the record view snapshot store // forwards every write, record writes from WriteRecord included, to the // live store unchanged, and remembers the key so later reads of it go to // the bucket: record-transport, like prefixStore.Put. // - uncachedStore.Put: refuses and writes nothing (it backs walkComplete's // read-only walk over the cache): nonrecord, like versionStore.Put. // - RecordView.readApp, RecordView.readScope, RecordView.walk, // walkComplete, ViewSnapshot.list, ViewSnapshot.lookup: the record view's // reads. They name the instances/ and sidecars/ families (and the sidecar // manifest key) to list, fetch and answer them from the snapshot, and // write nothing: key-site. // // Not listed, and not a record write in this census's sense: the bump // itself. bumpAfterMutation and bumpChangeIndex rewrite only // control/changes.json (release.ChangeIndexKey), through the store's raw // put handed in as a function value, so the scanner sees neither, nor the // raw methods (putRaw, putFromRaw, deleteRaw, deleteIfMatchRaw), whose names // are not Put-family names. Every call of a raw put is in its own store's // Put, PutFrom or bump. func s3ChangeIndexWriteCensusInventory() []censusEntry { entries := append([]censusEntry(nil), dbRegionForward1WriteCensusInventory()...) repins := []censusEntry{ {"internal/provision/reconcile.go", "Reconcile", "key-site", "key:ParseRecordKey,key:RecordKey,lit:instances", "b93306e178252e56c67dd2ed58b87250e1b3756bddaa2589c3f7392d03300832"}, {"internal/provision/sidecar_reconcile.go", "ReconcileSidecars", "key-site", "key:ParseSidecarKey,key:SidecarRecordKey,lit:sidecars", "cc2aa4dbcb68f06f1190ad58a37c58e2608517e7388318b5b9e0b4bad0e8b5db"}, {"internal/release/store.go", "DirStore.Put", "record-transport", "def:Put", "63c5ff8af0fd64d30502735306287c489a659863ef3fc8b3f0df48f31c25134e"}, {"internal/release/store.go", "DirStore.PutFrom", "record-transport", "def:PutFrom", "f3f61446f41f15692d7e164b1a1637a8ff213359da3eebd60f574f585b31eb6a"}, {"internal/release/store.go", "S3Store.Put", "record-transport", "def:Put", "cd2fbd84994508f0f920210d6b0b4375a2d0ea1369ef0b73160fc2e0b2de66e9"}, {"internal/release/store.go", "S3Store.PutFrom", "record-transport", "def:PutFrom", "743c0dd30f0b1ea209a518382ab89d175d6e7fa15f0812f1f90e4fe6fd63b621"}, } for _, r := range repins { found := false for i, e := range entries { if e.File == r.File && e.Unit == r.Unit { if e.Class != r.Class || e.Kinds != r.Kinds { panic("s3-change-index re-pin changes the class or kinds of " + e.File + ":" + e.Unit) } entries[i], found = r, true break } } if !found { panic("s3-change-index re-pin of an unlisted unit " + r.File + ":" + r.Unit) } } return append(entries, censusEntry{"internal/provision/recordview_store.go", "snapStore.Put", "record-transport", "def:Put,sel:Put", "3d2e124f1aba407198c881bb86357065bcfd93bec30d913e4a37b503ed131917"}, censusEntry{"internal/provision/recordview_store.go", "snapStore.PutFrom", "record-transport", "def:PutFrom,sel:PutObjectFrom", "469205cdc7b7b3882750731fadf0dfa8822393b8c1c134e4ee2e25c7df08f453"}, censusEntry{"internal/provision/recordview_store.go", "uncachedStore.Put", "nonrecord", "def:Put", "6b84938254d188d730158b529b89cbd040222c1509d5170bcac984bd4e50a2f6"}, censusEntry{"internal/provision/recordview.go", "RecordView.readApp", "key-site", "key:SidecarManifestKey", "09b0c8c11e7c42ed8a31fcc7a6f324b4f4b9a97fef463c5c032797ac6f4547d2"}, censusEntry{"internal/provision/recordview.go", "RecordView.readScope", "key-site", "lit:instances,lit:sidecars", "2820835bc309da9cd98a749106bde435fe6597a1b6b39472adf63908f9b55b7f"}, censusEntry{"internal/provision/recordview.go", "RecordView.walk", "key-site", "lit:instances,lit:sidecars", "ea585c4f5b40c1be6eb0b25d56b1041f8143e2176ca75c9636a959dc988c7184"}, censusEntry{"internal/provision/recordview.go", "walkComplete", "key-site", "lit:instances,lit:sidecars", "2edf70da2e873f69e5186845e19a32d0cec495e038d49bd889409a39ef431735"}, censusEntry{"internal/provision/recordview_store.go", "ViewSnapshot.list", "key-site", "lit:instances,lit:sidecars", "66443ba9b310eff8b59b7340fcc9ceee99e487b37029dce1ca82ea11858e23a5"}, censusEntry{"internal/provision/recordview_store.go", "ViewSnapshot.lookup", "key-site", "lit:instances,lit:sidecars", "25bea5560b69cdde76d3e8affd47ad915d75107cf5a7df6221efc89205191ea2"}, ) }