census: propose the drill's no-database and fleet-box changes
make census-propose NAME=member-backups-drill-nodb over the previous commit: hibernateRun.run keeps its disposition re-frozen with the claim (body change, no read added: a fleet box with no deployment store returns 0 before the registry is opened, and the publisher drops left-out hosts), noDatabase is a new unit reading +file:Lstat of the route's DBPath, written legacy/accepted-legacy, and the internal/ops envelope is re-pinned. TestPlan14RootReadCensus passes with the overlay; it still needs an independent reviewer's verdict on #280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+37
−0
docs/superpowers/notes/census-claims-member-backups-drill-nodb.tsv+5 −0docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md+23 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv+8 −0
CI passed — run details
Intent
Attributed to this commit: 59.3 g CO₂e (5,989,397 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on member-backups-drill-nodb, 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/docs/superpowers/notes/census-claims-member-backups-drill-nodb.tsv b/docs/superpowers/notes/census-claims-member-backups-drill-nodb.tsv| new file mode 100644 |
| index 000000000..31f8c05f4 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-claims-member-backups-drill-nodb.tsv |
| @@ -0,0 +1,5 @@ |
| +# Census claims for the restore drill fix after the first drill night (#898), 2026-11-13. <file>:<unit> TAB <what changed>. |
| +# Who runs what: the drill is carlos-hibernate-verify.service (User=carlos, oneshot). hibernateRun.run still refuses euid 0 first, |
| +# before any monitor file, store or registry is touched, so none of this runs as root in the shipped unit. |
| +internal/ops/ops.go:hibernateRun.run the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The publisher now takes RunResults and drops the hosts the run left out (no database) from the fleet before dbverify.Merge, so its writes to control/verify/<ref>.json and <data>/monitor/verify.json carry fewer hosts; the summary lines count them. |
| +internal/ops/hibernate_verify.go:noDatabase new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record, anything else keeps unverified/nothing_replicated. |
diff --git a/docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md b/docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md| new file mode 100644 |
| index 000000000..71ce5ea81 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md |
| @@ -0,0 +1,23 @@ |
| +# Census approval: member-backups-drill-nodb |
| + |
| +Ruling `census-ruling-member-backups-drill-nodb`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/ops/ops.go` `hibernateRun.run` | body | unchanged (1) | the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The publisher now takes RunResults and drops the hosts the run left out (no database) from the fleet before dbverify.Merge, so its writes to control/verify/<ref>.json and <data>/monitor/verify.json carry fewer hosts; the summary lines count them. | |
| + |
| +Envelopes re-pinned: `internal/ops`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `internal/ops/ops.go` `hibernateRun.run`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root. |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `internal/ops/hibernate_verify.go:noDatabase`: reads +file:Lstat; written legacy, accepted-legacy, frozen |
| + |
| +Seal: `5e8a72175700a3e60c1e283b133c1ee25e36f292e2e319f02a19138f15186376` → `0c41a738ce48edbe0583ae77403a1a38dbb4855bdba985c9a5814a4512930d15`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 96e02662b..0b27ddb9c 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -201,3 +201,4 @@ plan14-root-reads-ha-unclean-marker-waits.tsv 821598970e60a776d4a62138d5adbfa393 |
| plan14-root-reads-ha-unclean-files-only.tsv bc138ce5435f3ab37f6adff46656eea1c20f48168c569550fe94e390c69ba309 |
| plan14-root-reads-edge-ppv2.tsv 44e5745a1d22ea2ddd6e73d775d87759afe7121666212b6ed2563c1518261bc4 |
| plan14-root-reads-static-site-geo-962.tsv 5e8a72175700a3e60c1e283b133c1ee25e36f292e2e319f02a19138f15186376 |
| +plan14-root-reads-member-backups-drill-nodb.tsv 0c41a738ce48edbe0583ae77403a1a38dbb4855bdba985c9a5814a4512930d15 |
diff --git a/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv b/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv| new file mode 100644 |
| index 000000000..f29ddfdb1 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv |
| @@ -0,0 +1,8 @@ |
| +# Census overlay member-backups-drill-nodb, written by census-propose (#369). census-ruling-member-backups-drill-nodb, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md. |
| +# 1 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 9e0ca25bb41e6d70bf22fcda828dce8e434878e957e866bafca02c22aff4745d internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The publisher now takes RunResults and drops the hosts the run left out (no database) from the fleet before dbverify.Merge, so its writes to control/verify/<ref>.json and <data>/monitor/verify.json carry fewer hosts; the summary lines count them. file:Open@2885 03149210c2fbd9448d73d34bfb247726e7458696101a201937615264b6307f52 |
| +@legacy 78f8b28108a816547ade655f2f426c9247c902df1d8b847fcc25cd0a58bde573 internal/ops/hibernate_verify.go noDatabase legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-drill-nodb;basis=new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record, anything else keeps unverified/nothing_replicated. file:Lstat@82 ec15b0796c9978e8d576d127593d64aa0fd757db39e8edc61732b25f6038b44d |
| +internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The publisher now takes RunResults and drops the hosts the run left out (no database) from the fleet before dbverify.Merge, so its writes to control/verify/<ref>.json and <data>/monitor/verify.json carry fewer hosts; the summary lines count them. file:Open@2885 03149210c2fbd9448d73d34bfb247726e7458696101a201937615264b6307f52 |
| +internal/ops/hibernate_verify.go noDatabase legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-drill-nodb;basis=new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record, anything else keeps unverified/nothing_replicated. file:Lstat@82 ec15b0796c9978e8d576d127593d64aa0fd757db39e8edc61732b25f6038b44d |
| +@coverage internal/ops d1844c5b266faef0de4e0aa453bedb00f2be91b40163da27688b1a4d1469cb1e |