carlos / platform Public

census: propose member-backups-1 root-read overlay (#898)

Envelope-only: re-pins ., internal/dbdoor and the new
internal/backupswords; no census unit changed and the seal is unchanged.
The claims file lists each changed function as a comment, since
census-propose refuses a claim for a unit it does not see. Awaits the
other-family reviewer's approval on #280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 5e345d463cbeba81fff6a2537d5b5594d9ebdf98 parent 216773f
4 files changed, +40 −0
  • docs/superpowers/notes/census-claims-member-backups-1.txt +23 −0
  • docs/superpowers/notes/census-proposal-member-backups-1.md +11 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-member-backups-1.tsv +5 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-claims-member-backups-1.txt b/docs/superpowers/notes/census-claims-member-backups-1.txt
new file mode 100644
index 000000000..103d1a8d1
--- /dev/null
+++ b/docs/superpowers/notes/census-claims-member-backups-1.txt
@@ -0,0 +1,23 @@
+# CLAIMS for census-ruling-member-backups-1 (member backups slice 1, #898).
+# Class of every change: read-only display and a shared listing rule. No
+# root read is added anywhere, and no unit the census tracks changed: the
+# card shows only the envelopes of ., internal/backupswords and
+# internal/dbdoor. census-propose refuses a claim for a unit it does not
+# see, so the changes are listed here as comments for the reviewer to check
+# against the diff.
+#
+# internal/dbdoor (envelope re-pinned):
+# internal/dbdoor/plan_from.go:listLevel (new) ListLevel's former body with a file cap: stops with the new ErrTooManyFiles once a level holds more than limit files; a negative limit is no cap, and ListLevel passes -1, so ListLevel is unchanged for its callers (the console's db door, apidb.go). Lists through the caller's ReplicaReader only (the replica in the bucket); no file, env or registry read
+# internal/dbdoor/plan_from.go:listing.files (new), listing.LTXFiles the listing keeps each level as first listed for the one call it serves (map in memory), so a plan and a history scan in that call see the same listing; past maxFiles it is ErrTooManyFiles. LTXFiles reads through files instead of listing again; the as-of rule is unchanged (ErrNoTimes on a file with no time; the oldest start now decided by isHistoryStart, the same predicate). Fewer bucket lists, never more; nothing else read
+# internal/dbdoor/plan_from.go:PlanFrom, planFrom (new) PlanFrom is now planFrom over a listing with no cap (maxFiles -1): the same plan, the same errors; the BeforeHistoryError boundary comes from historyBoundary, the same expression it inlined. PlanFrom's production caller is dbreads.Agent.serve in the box agent (internal/host/dbreads.go armDBReads, from runAgent), not a root pass
+# internal/dbdoor/plan_from.go:PositionAndHistory (new) plans the newest copy as PlanFrom(ctx, rd, zero) does and, from the same cached listing, the earliest --at (isHistoryStart, historyBoundary); capped at maxFiles listed files (ErrTooManyFiles). Its only production caller is the console (internal/console/backups.go readBackups), outside the root binary's runtime; nothing on a box calls it
+# internal/dbdoor/restore.go:isHistoryStart, historyBoundary (new) pure functions over an LTXFile and a time: the snapshot-or-first-transaction rule and the first whole second after the oldest start, each the expression PlanFrom and the CLI recorder already inlined
+# internal/dbdoor/restore.go:restoreAt, recorder.LTXFiles the inline boundary and start rules replaced by historyBoundary and isHistoryStart, the same results; restoreAt is reached through Restore, RestoreTo and RestoreAsOf (the CLI's db pull and query over the console's door client, the console's seed path); the changed lines only build the BeforeHistoryError of an --at restore; no read added
+#
+# internal/backupswords (new package, envelope pinned):
+# internal/backupswords/words.go, display.go approved copy constants and Show, Date, AtExample: pure functions over an Input struct and a time (stdlib fmt, strings, time only); no file, env, network or registry access. Imported by the CLI command below and the console
+#
+# . (root package, envelope re-pinned):
+# cli.go:instancesCommand one more child, raw("backups", cust, runInstancesBackups); a subcommand registration for a signed-in user, no read
+# instances_backups.go (new): runInstancesBackups, instancesBackups, backupsShow, printBackups, backupsJSON `carlos instances backups`: parses flags, signs in through the existing CLI session, resolves the instance (resolveDBInstance, as db pull does), GETs the console's /instances/{host}/backups door and prints the JSON or the backupswords layout; a user's CLI, never run by the agent or a root pass; no local file read beyond the CLI's existing session config
+# db.go:dbFlags the --instance flag's help string moved into the constant dbInstanceUsage, shared with instances backups; same text, same flag
diff --git a/docs/superpowers/notes/census-proposal-member-backups-1.md b/docs/superpowers/notes/census-proposal-member-backups-1.md
new file mode 100644
index 000000000..97019805e
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-member-backups-1.md
@@ -0,0 +1,11 @@
+# Census approval: member-backups-1
+
+Ruling `census-ruling-member-backups-1`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+Envelopes re-pinned: `.`, `internal/backupswords`, `internal/dbdoor`.
+
+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.
+
+Seal: `40c8459580c3e62a53637e9989f1616e5735ce78796ec6ea1b22655a5eb4ad63` → `40c8459580c3e62a53637e9989f1616e5735ce78796ec6ea1b22655a5eb4ad63`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-member-backups-1.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 c67be335f..a349ee2cb 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -169,3 +169,4 @@ plan14-root-reads-group-capacity-damping.tsv 0c649af234a7b89a75479e59e705307e329
plan14-root-reads-group-verb-followups.tsv 9c74b9876a13a3a3802860fe44406898c8bcbfd3bd22e8172a59a02674c3b4af
plan14-root-reads-group-read-transport-retry.tsv 9c74b9876a13a3a3802860fe44406898c8bcbfd3bd22e8172a59a02674c3b4af
plan14-root-reads-linked-deployments-slice1.tsv 40c8459580c3e62a53637e9989f1616e5735ce78796ec6ea1b22655a5eb4ad63
+plan14-root-reads-member-backups-1.tsv 40c8459580c3e62a53637e9989f1616e5735ce78796ec6ea1b22655a5eb4ad63
diff --git a/internal/provision/testdata/plan14-root-reads-member-backups-1.tsv b/internal/provision/testdata/plan14-root-reads-member-backups-1.tsv
new file mode 100644
index 000000000..5d53bf5cf
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-member-backups-1.tsv
@@ -0,0 +1,5 @@
+# Census overlay member-backups-1, written by census-propose (#369). census-ruling-member-backups-1, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-member-backups-1.md.
+# 0 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@coverage . 12be7c42194ccb37819376f6827959aebfbecd4f96cd9a1740c74623942097e5
+@coverage internal/backupswords b2e10a74facfd0f6841e9220748a7e35dacacb8f30bb8590e3834fd574c87e2f
+@coverage internal/dbdoor a8b3e7af6fb851ad71e678252a55f9f05444135c6bff93ef59ea5733ef94593d