census: re-pin the 10 record-write sites the branch changed (Gate A), awaiting the reviewer
rootfsApps4WriteCensusInventory re-pins runRouteHibernate, the move and place doors, SetRecordRegion, both create doors, WriteRecord, Reconcile and FleetDBsWithSkipped: classes and kinds unchanged, each change a refusal or guard before or inside an existing write. The proposal card gains "Record-write re-pins", one row per site with its commit. Not approved: the reviewer rules on #280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+48
−0
docs/superpowers/notes/census-proposal-rootfs-apps-3.md+17 −0internal/provision/rootfs_apps_4_census_test.go+31 −0
CI cancelled — superseded by a newer push — run details
diff --git a/docs/superpowers/notes/census-proposal-rootfs-apps-3.md b/docs/superpowers/notes/census-proposal-rootfs-apps-3.md| index dd7fadd34..dd4ffb2de 100644 |
| --- a/docs/superpowers/notes/census-proposal-rootfs-apps-3.md |
| +++ b/docs/superpowers/notes/census-proposal-rootfs-apps-3.md |
| @@ -229,3 +229,20 @@ New dispositions, which census-propose wrote and the reviewer checks against the |
| Seal: `f5afdacd495705841fcc8441eaefe0efb9db7056de281bb06d1714960a5575b7` → `05388abcaf0b068183872a8112b6202b5615870167ecbaa9678c2bb07bdb3ae7`. |
| Overlay: `internal/provision/testdata/plan14-root-reads-rootfs-apps-3.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
| + |
| +## Record-write re-pins |
| + |
| +Added by hand at Gate A (Plan 3 Task 16). census-propose does not write this section, so a re-run of census-propose drops it and it has to be added again. These rows are re-pinned in `rootfsApps4WriteCensusInventory` (`internal/provision/rootfs_apps_4_census_test.go`), the branch's own layer on main's `plans6bWriteCensusInventory`. No row changes class or kinds: each site's only change is the branch's own change listed below. Main's changes were already pinned by main's layers. PROPOSED, not approved: the cross-model reviewer rules on #280. |
| + |
| +| site | old digest | new digest | commit | what changed | why it is safe | |
| +|---|---|---|---|---|---| |
| +| `cli.go:runRouteHibernate` (key-site) | `c151cae2` | `6b1ef36f` | 1da111ff (Plan 3 Task 2) | Refuses a row with a runtime first, before any dry run or rail: its hibernation is fixed at mint. | Adds a refusal before any write. The sidecar-manifest key use is unchanged. | |
| +| `internal/console/apiinstancemove.go:Server.moveTransitionSaying` (record-writer) | `d1f7162e` | `711b2d4e` | 8c14abe5 (Plan 3 Task 13) | Maps SetRecordMove's rootfs refusal to 409 (RFS-3-C23). | The write is the same SetRecordMove. It only answers a refusal that the write already made. | |
| +| `internal/console/apiinstancemove.go:Server.handleAPIInstanceMoveRequest` (record-writer) | `44507cc5` | `f276e3aa` | 8c14abe5 | Adds refuseRootfsMove beside the seed and HA refusals, before SetRecordMove. | Adds a refusal before the write. The write is unchanged. | |
| +| `internal/provision/provision.go:SetRecordRegion` (record-writer) | `2bd679a6` | `70d7e6b1` | 8c14abe5 | rootfsMoveRefusal runs on the record inside the update, under its CAS, before the HA check. | Adds a refusal inside the write. A rootfs record is never re-homed, whoever wrote it in between. | |
| +| `internal/console/fleets.go:Server.placeAppTarget` (record-writer) | `ddc51fe2` | `3dca2e95` | 8c14abe5, 01f06913, 5ed99f60 (Plan 3 Task 13) | Takes the app lock for the whole place. Refuses a rootfs-kind app (release.EstablishedKind) and any record or route with a runtime before any write. Maps ErrRuntimePlacement and SetRecordRegion's rootfs refusal to 409. The seed and HA checks are split from placeMoveBlock but say the same thing. | Writes only after more refusals. The app lock orders the place against every console instance create. | |
| +| `internal/console/lifetimes_create.go:Server.createRecordWithLifetimeLocked` (key-site) | `f18477b4` | `27810c60` | 953a6494 (Plan 4 Task 2/3) | Runs firstKindRecheck under the caller's app lock before anything is read or persisted. | Adds a refusal before the create. The record key and write are unchanged. | |
| +| `internal/console/hostsused.go:Server.createRecordMarked` (record-writer) | `1c2b1885` | `9b39448c` | 953a6494 | Runs firstKindRecheck under the app lock, before the mark and the create. | Adds a refusal before the write. CreateRecord is unchanged. | |
| +| `internal/provision/record_sequence.go:WriteRecord` (record-primitive) | `d58d1106` | `5b0f8b68` | f5620882, 5773b78b (Plan 3 Task 3) | A create ({} before) with an etag is refused. runtimeFixed refuses a write that changes the runtime, or a rootfs record's hibernation. It checks the body it is handed and again the bytes Put stores. | The one primitive refuses more and writes nothing new. The key check, sequencing, kind guard and Put are unchanged. | |
| +| `internal/provision/reconcile.go:Reconcile` (key-site) | `7a88f0f9` | `403b806f` | d35af56b, 5b166658 (Plan 3 Tasks 2 and 4) | A seeded record over a row with a runtime is skipped. A row with a runtime takes no seed. Runtime and a rootfs row's hibernation are never converged from a record, and a record that claims a runtime its row lacks is not applied. | The box writes less. No record key use or record write changes. | |
| +| `internal/ops/litestream.go:FleetDBsWithSkipped` (key-site) | `f62291df` | `1289226c` | d1474316 (Plan 3 Task 5) | The box-wide litestream exclusion is Route.ActivatorLeased instead of Hibernate, so the activator alone replicates a resident rootfs database. | Same `instances` literal, no record write. One database is never streamed by two writers. | |
diff --git a/internal/provision/rootfs_apps_4_census_test.go b/internal/provision/rootfs_apps_4_census_test.go| index ef0064d9a..ebd3c788d 100644 |
| --- a/internal/provision/rootfs_apps_4_census_test.go |
| +++ b/internal/provision/rootfs_apps_4_census_test.go |
| @@ -23,10 +23,41 @@ package provision |
| // to classifyFleetOwner. Every other arm unchanged: reference. |
| // |
| // No deleteFleetOwner: no fleet removal door exists (Plan 4 amendment 5a.3). |
| +// |
| +// Re-pinned at Gate A (Plan 3 Task 16), the branch's own changes to sites |
| +// main's layers pinned; classes and kinds unchanged, each a refusal or |
| +// guard added before or inside an existing write (table in |
| +// docs/superpowers/notes/census-proposal-rootfs-apps-3.md, "Record-write |
| +// re-pins"); PROPOSED-rootfs-apps-3: |
| +// - runRouteHibernate (cli): refuses a row with a runtime first (1da111ff). |
| +// - Server.handleAPIInstanceMoveRequest, Server.moveTransitionSaying, |
| +// SetRecordRegion: refuse a rootfs record before or inside the move and |
| +// placement writes (8c14abe5). |
| +// - Server.placeAppTarget: refuses a rootfs-kind app or any record or |
| +// route with a runtime under the app lock before any write (8c14abe5, |
| +// 01f06913, 5ed99f60). |
| +// - Server.createRecordWithLifetimeLocked, Server.createRecordMarked: the |
| +// first-kind recheck under the app lock before the create (953a6494). |
| +// - WriteRecord: runtimeFixed on the body and on the stored bytes, and a |
| +// create never carries an etag (f5620882, 5773b78b). |
| +// - Reconcile: no seed and no runtime or rootfs hibernation converge for |
| +// a row with a runtime (d35af56b, 5b166658). |
| +// - FleetDBsWithSkipped: the exclusion is Route.ActivatorLeased (d1474316). |
| func rootfsApps4WriteCensusInventory() []censusEntry { |
| entries := append([]censusEntry(nil), plans6bWriteCensusInventory()...) |
| replacements := []censusEntry{ |
| {"internal/hostops/mutation_classifier.go", "ClassifyMutation", "reference", "str:Put", "03f9ef0e54315c8342aea438dd350759bb6cfc603be6490d90bd3a0532c6bdc7"}, |
| + // Gate A re-pins (PROPOSED-rootfs-apps-3). |
| + {"cli.go", "runRouteHibernate", "key-site", "key:SidecarManifestKey", "6b1ef36f22e6308fb6ddf3df2a704d37cc0d9c9c2d6acff55dcc49481f3874ea"}, |
| + {"internal/console/apiinstancemove.go", "Server.moveTransitionSaying", "record-writer", "key:SetRecordMove", "711b2d4e84e72569760c9d59bcdd2ccbec461edf8ca99f572846943d2808e811"}, |
| + {"internal/console/apiinstancemove.go", "Server.handleAPIInstanceMoveRequest", "record-writer", "key:SetRecordMove,lit:instances", "f276e3aa7a789f4dbe22be215be82b77cfaf7b7fea89910467c1292e269cfd7c"}, |
| + {"internal/ops/litestream.go", "FleetDBsWithSkipped", "key-site", "lit:instances", "1289226caab31a729646c35ad702aaf7f3917552f7e088022080bc3f022d4c39"}, |
| + {"internal/provision/provision.go", "SetRecordRegion", "record-writer", "key:SetRecordRegion,key:updateRecord", "70d7e6b1b39ece28c795c801f67cd019720de0b000c056a65d75bef3d1a59909"}, |
| + {"internal/provision/record_sequence.go", "WriteRecord", "record-primitive", "key:IsRecordKey,key:WriteRecord,key:preparedRecordKey,sel:Put", "5b0f8b687e0b134117f4a82d38aca6ef067fa0bbb37c1cac922734169f56d610"}, |
| + {"internal/provision/reconcile.go", "Reconcile", "key-site", "key:ParseRecordKey,key:RecordKey,lit:instances", "403b806f66e47e20f2a7b9b95846944879c360dab64e5fac27c2cfe7a02b946a"}, |
| + {"internal/console/fleets.go", "Server.placeAppTarget", "record-writer", "key:RecordsPrefix,key:SetRecordRegion", "3dca2e95b42ae382c9ec3ce81fae9b61159b20275920b7128f784c3ee0eca293"}, |
| + {"internal/console/lifetimes_create.go", "Server.createRecordWithLifetimeLocked", "key-site", "key:RecordKey", "27810c6055d86dea23f51f5bd352a6b714720572efc6ed589b51b7c548890742"}, |
| + {"internal/console/hostsused.go", "Server.createRecordMarked", "record-writer", "key:CreateRecord,key:RecordKey", "9b39448ce817867c94e51d5feeff6dd24e4458cb452284ffa637b42c250b28fd"}, |
| } |
| for _, r := range replacements { |
| found := false |