carlos / platform Public

db forward task 17: census overlay db-region-forward-1 (PROPOSED, loaded last), 9B8 entries, test weight

The overlay loads after console-brand-name; the seal moves from 78e18e22
to d57f153e. Proposal: docs/superpowers/notes/census-proposal-db-region-forward-1.md,
for the census owner's ruling on #280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 1760ea5fc0f2e625435e9fc71d865080eeba5fa5 parent 860fce8
6 files changed, +168 −1
  • .amadan/test-weights.tsv +1 −0
  • docs/superpowers/notes/census-proposal-db-region-forward-1.md +88 −0
  • internal/provision/db_region_forward_census_test.go +18 −0
  • internal/provision/plan14_root_reads_test.go +18 −0
  • internal/provision/plan9_b8_census_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-db-region-forward-1.tsv +42 −0

CI passed — run details

diff --git a/.amadan/test-weights.tsv b/.amadan/test-weights.tsv
index eb56aab72..83c530611 100644
--- a/.amadan/test-weights.tsv
+++ b/.amadan/test-weights.tsv
@@ -11,6 +11,7 @@ github.com/carlosframework/platform/internal/console TestClaimProbeRunnerDetects
github.com/carlosframework/platform/internal/console TestClaimPurgeMailRecordRefusesBeforeEffects 2.5
github.com/carlosframework/platform/internal/console TestDestroyedLocalOnlyLogsNoMoveEvent 2.4
github.com/carlosframework/platform/internal/console TestSystemOperatorRollsSignedReleases 2.3
+github.com/carlosframework/platform/internal/console TestDBReadsParityWithTheInRegionDoor 2.3
github.com/carlosframework/platform/internal/console TestSystemDoorsRefuseAPreLayoutMoveWhileABoxIsNested 2.2
github.com/carlosframework/platform/internal/console TestSystemStatusAndRollback 2.2
github.com/carlosframework/platform/internal/console TestTodaysFleetWithNoLayoutFieldKeepsRollbackAndUpdate 2.2
diff --git a/docs/superpowers/notes/census-proposal-db-region-forward-1.md b/docs/superpowers/notes/census-proposal-db-region-forward-1.md
new file mode 100644
index 000000000..5f6f13fa0
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-db-region-forward-1.md
@@ -0,0 +1,88 @@
+# Census: db region forward, plan 1 (the box side and the wire, dark)
+
+Status: PROPOSED. Every row carries `rev3=PROPOSED-db-region-forward-1`, and
+the H3 removal names `census-ruling-db-region-forward-1 (PROPOSED, ...)`.
+The ruling is asked of the census owner on #280.
+
+The branch is `db-region-forward-1`, cut from `design-db-region-forward`
+(e765d57d, which already holds main at 5f341f33). It builds plan 1 of
+`docs/superpowers/specs/2026-10-22-db-region-forward-design.md` (rev 6):
+`internal/dbquery` (the query runner moved out of `db.go`),
+`internal/dbreads` (the wire, the box's db-reads agent and the db-read
+worker), `dbdoor` planning over any replica reader, the two
+`carlos-dbread` units installed and armed by `ensureSystemUnits`, and the
+`db-read-1` capability. Nothing runs unless a console asks, and no console
+asks until plan 2.
+
+It adds one root-read overlay,
+`internal/provision/testdata/plan14-root-reads-db-region-forward-1.tsv`,
+loaded last in `TestPlan14RootReadCensus`, after `console-brand-name` (the
+overlay main loads last at 5f341f33). Its record-write entries are layered
+on `plans2WriteCensusInventory` in
+`internal/provision/db_region_forward_census_test.go`.
+
+## Root reads
+
+Executing identities, named once:
+
+- **the agent**: `/opt/carlos/carlos agent`, `carlos-edge.service`, user `carlos`.
+- **the worker**: `carlos system db-worker`, `carlos-dbread@.service`, a
+ `DynamicUser` with `PrivateNetwork=yes`, `RestrictAddressFamilies=AF_UNIX`,
+ its own `PrivateTmp`, `/data`, `/var/lib`, `/opt/carlos` and `/run/carlos`
+ empty, `/etc/carlos` inaccessible. It reads only the files the agent sent
+ and its own scratch.
+- **the CLI**: `carlos db query` on a person's machine, as the person.
+
+| unit | change | executing identity | proposed disposition |
+|---|---|---|---|
+| `db.go` `runQueryContext` | still declared; reads nothing now: a one-line call to `dbquery.RunContext` | the CLI | retired: `@remove` plus `@removed ... H3 census-ruling-db-region-forward-1`, the form the carlos-run H3 removal used |
+| `internal/dbquery/dbquery.go` `RunContext` | new: `runQueryContext`'s body moved unchanged but for the `immutable=1` open option the worker passes | the CLI and the worker; neither is root | legacy, accepted-legacy, J4 (`basis=root-input`, main's footing for the same body), both callers named |
+| `internal/dbreads/agent.go` `nonce` | new: 16 bytes from `crypto/rand` for `picked`'s attempt nonce (the scanner reads `rand.Read` as a read) | the agent | legacy, J1/J4 route-and-input, as the offline move's agent units |
+| `internal/dbreads/read.go` `sendFile` | new: reads one planned LTX file whole from the box's own region replica (read-only reader), between identity checks A and B, and frames it to the worker undecoded | the agent | legacy, J1/J4 route-and-input |
+| `internal/dbreads/seal.go` `open` | new: AES-GCM open of a sealed chunk or summary (`cipher.AEAD.Open`, read by the scanner as `Open`) | the CLI (plan 2); no production caller in plan 1 | legacy, J4 |
+| `internal/dbreads/worker.go` `SelfView` | new: `/proc/self/net/dev`, a listing of `/data`, an open of `/etc/carlos/host.env`, only to report what the sandbox hides | the worker | legacy, J4 |
+| `internal/dbreads/worker.go` `ServeWorker` | new: stats the restored copy in its private `/var/tmp` for the size cap | the worker | legacy, J4 |
+| `internal/dbreads/worker.go` `receiveFile` | new: creates each planned file, exclusively, under its private `/var/tmp` | the worker | legacy, J4 |
+| `internal/host/dbreads_linux.go` `dbReadUnits` | new: `systemctl list-units 'carlos-dbread@*.service'`, readable without privilege, for the orphan rule | the agent | legacy, J4 |
+| `internal/host/dbreads_linux.go` `varTmpFree` | new: one `Statfs` of `/var/tmp` for the disk reservation | the agent | legacy, J4 |
+| `internal/host/units/carlos-dbread.socket` `external` | new unit file | written by root's `ensureSystemUnits`; bound by PID 1, owned by carlos | legacy external unit, as `carlos-instance-cmd@.service` took |
+| `internal/host/units/carlos-dbread@.service` `external` | new unit file | the worker's unit | legacy external unit |
+| `internal/dbreads/agent.go` `Agent.probe` | new: the readiness probe, a hello on its own worker connection; the scanner names no read in it, so this is a declaration row | the agent | **diagnostic**, J4: decides only whether the box publishes `db-read-1` |
+| `internal/host/edgesfile.go` `edgesFileLoop` | changed legacy: `db-read-1` joins the capabilities while the armed loop's probe passes; the published draining flag is stored for the loop; read site unchanged, offset moved | the agent | re-frozen at main's disposition (`census-ruling-moves-offline`) with the change appended |
+| `internal/host/agent.go` `fastConvergeLoop` | changed authority: the serial pass nudges the db-reads loop after the runs pass (a channel send) | the agent | re-pinned at main's B3 |
+| `internal/host/agent.go` `runAgent` | changed authority: `armDBReads` beside `armRunsPass` in the activator's Configure step | the agent | re-pinned at main's B,C,D,F |
+| `internal/host/systemunits.go` `ensureSystemUnits` | changed authority: installs the two units, asks one more `is-active`, arms the socket (never the template); the armed list is now `ensureSystemArmed`, which the claim census reads too | root (the adopt pass) | re-pinned at main's F,J4 |
+| `system.go` `runSystem`, `systemVerb` | changed declarations (no reads): dispatch `carlos system db-worker` | the operator CLI and the worker unit | re-pinned at main's authority rows |
+
+Scanner notes for the ruling:
+
+- `internal/dbdoor` `ListLevel`, `PlanFrom`, `finishPlan`, `listing.*` and
+ `RestoreLocal`, which the plan expected to need rows, are not named by the
+ scanner (their I/O goes through replica-client methods it does not
+ match), so they have none. Their package envelope is re-pinned.
+- `internal/console/apidb.go` `listReplicaLevel` and `dbClassRefusal` now
+ delegate to `dbdoor.ListLevel` and `dbreads.ClassRefusal`; the scanner
+ names neither, and the `internal/console` envelope is re-pinned.
+
+Envelopes re-pinned: `.`, `internal/console`, `internal/dbdoor`,
+`internal/dbquery` (new), `internal/dbreads` (new),
+`internal/dbreads/dbreadstest` (new), `internal/host`, `internal/host/units`.
+
+Seal: console-brand-name's `78e18e222a8178bbe16b638c5e3811b8f64c4c2664ffd6649eb4273e72fae24e`
+is checked first; with this overlay's 12 frozen declarations it becomes
+`d57f153e592926e0293ee25f80c15586db125025af722c50cbb8f1c5790bd08a`.
+
+## Record writes (9B8)
+
+| site | class | why |
+|---|---|---|
+| `internal/dbreads/agent.go` `Agent.elect` | nonrecord | the create-only `db-reads/<id>/picked` in the deployment bucket |
+| `internal/dbreads/chunks.go` `putCreateOnly` | nonrecord | create-only sealed chunks and `result.json` under `db-reads/<id>/` |
+| `internal/dbreads/dbreadstest/dbreadstest.go` `Submit` | testsupport | test support imported only by `_test.go` files: the console's two creates for a test with no console, as leasetest's sites are |
+
+No record writer and no `Delete` site is added.
+
+## Not in this plan
+
+The console route (`registerCLIRoutes` key-site, `claim-routes.txt`) and its
+creates (`request.json`, the queue entry, `cancel`) are plan 2's.
diff --git a/internal/provision/db_region_forward_census_test.go b/internal/provision/db_region_forward_census_test.go
new file mode 100644
index 000000000..7940d24ee
--- /dev/null
+++ b/internal/provision/db_region_forward_census_test.go
@@ -0,0 +1,18 @@
+package provision
+
+// Record-write census entries for db region forward plan 1, layered on
+// plans2WriteCensusInventory. Reviewed by the branch author; the census owner
+// rules on #280 (PROPOSED-db-region-forward-1). Every new Put is a
+// conditional create under db-reads/ in the deployment bucket (picked, the
+// sealed chunks, result.json), never an instance or sidecar record:
+// nonrecord. There is no Delete site.
+// - dbreadstest.Submit is test support (internal/dbreads/dbreadstest,
+// imported only by _test.go files): the console's two creates for a
+// test with no console. testsupport, as leasetest's are.
+func dbRegionForward1WriteCensusInventory() []censusEntry {
+ return append(append([]censusEntry(nil), plans2WriteCensusInventory()...),
+ censusEntry{"internal/dbreads/agent.go", "Agent.elect", "nonrecord", "sel:Put", "ca90940a4810e1ba705b661a0908d55527f7e3521efd246f992dbeb0bff3d65e"},
+ censusEntry{"internal/dbreads/chunks.go", "putCreateOnly", "nonrecord", "sel:Put", "4fe92949f63c56079185683fd54d6bc1dc01f95a9f188e654a4332a575b6fe7a"},
+ censusEntry{"internal/dbreads/dbreadstest/dbreadstest.go", "Submit", "testsupport", "sel:Put", "3afa4467aae4a9b2487537d92c737ae62082d73b924269eece2411c38d30c1d9"},
+ )
+}
diff --git a/internal/provision/plan14_root_reads_test.go b/internal/provision/plan14_root_reads_test.go
index 715d31d63..e9168134a 100644
--- a/internal/provision/plan14_root_reads_test.go
+++ b/internal/provision/plan14_root_reads_test.go
@@ -1323,6 +1323,24 @@ func TestPlan14RootReadCensus(t *testing.T) {
t.Fatal(err)
}
seal = "78e18e222a8178bbe16b638c5e3811b8f64c4c2664ffd6649eb4273e72fae24e"
+ // Census overlay db-region-forward-1 (db region forward plan 1: the box
+ // side and the wire, dark), loaded last, after console-brand-name.
+ // PROPOSED-db-region-forward-1, asked of the census owner on #280
+ // (docs/superpowers/notes/census-proposal-db-region-forward-1.md).
+ // db.go runQueryContext is retired by an H3 removal; its body is
+ // internal/dbquery RunContext, accepted legacy at the same J4 footing
+ // with both callers named; the agent's db-reads units are accepted
+ // legacy at J1 and J4, the worker's at J4, the probe is diagnostic, and
+ // the two carlos-dbread units join as external units. Frozen
+ // declarations are added, so the seal moves; console-brand-name's is
+ // checked first.
+ if errs := checkRootReadLegacy(inv, seal); len(errs) != 0 {
+ t.Fatal(errs)
+ }
+ if err = loadRootReadInventory(filepath.Join(root, "internal/provision/testdata/plan14-root-reads-db-region-forward-1.tsv"), &inv, true); err != nil {
+ t.Fatal(err)
+ }
+ seal = "d57f153e592926e0293ee25f80c15586db125025af722c50cbb8f1c5790bd08a"
errs := append(compareRootReads(got, inv), checkRootReadLegacy(inv, seal)...)
errs = append(errs, checkRootReadDeclarations(got, inv)...)
if len(errs) > 0 {
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go
index 3694cedd5..34ddd94bf 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 := plans2WriteCensusInventory()
+ inventory := dbRegionForward1WriteCensusInventory()
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 "))
diff --git a/internal/provision/testdata/plan14-root-reads-db-region-forward-1.tsv b/internal/provision/testdata/plan14-root-reads-db-region-forward-1.tsv
new file mode 100644
index 000000000..4ba9c8a50
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-db-region-forward-1.tsv
@@ -0,0 +1,42 @@
+# Census overlay db-region-forward-1 (db region forward plan 1: the box side and the wire, dark; spec docs/superpowers/specs/2026-10-22-db-region-forward-design.md rev 6, §13), loaded LAST in TestPlan14RootReadCensus, after console-brand-name, the overlay main loads last at 5f341f33. Every row carries rev3=PROPOSED-db-region-forward-1; the ruling is asked of the census owner on #280 (docs/superpowers/notes/census-proposal-db-region-forward-1.md).
+# db.go runQueryContext is retired by an H3 removal: it reads nothing now, and its body is internal/dbquery RunContext, accepted legacy at the same J4 footing with both callers named (the CLI as the person, the db-read worker as a DynamicUser). New agent units are accepted legacy at J1/J4 (route-and-input) or J4, worker units at J4, the two carlos-dbread unit files join as external units, and the readiness probe is one diagnostic declaration row. Changed units are re-pinned at main's class, task and basis with this branch's change appended. Frozen declarations are added, so the seal moves; console-brand-name's seal is checked first.
+@remove db.go runQueryContext
+@removed db.go runQueryContext H3 census-ruling-db-region-forward-1 (PROPOSED, awaiting the census owner on #280): still declared, and reads nothing now: it calls dbquery.RunContext, which holds its former open and query unchanged but for the immutable=1 option, an accepted-legacy row in this overlay. It runs in the carlos CLI as the person.
+@legacy 78e463cd37ab3ed25f092f5de26160011ea66cf7bae90e0ae9de3bfa6f1b8bd3 internal/dbquery/dbquery.go RunContext legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4, the footing main gave db.go runQueryContext); the carlos CLI on a person's machine, as the person, and the db-read worker (carlos system db-worker, carlos-dbread@.service, a DynamicUser with no network): db.go's runQueryContext body moved unchanged but for the immutable=1 open option the worker passes; opens one restored copy read-only (mode=ro, query_only, temp_store(2), no attached databases) and runs one guarded statement; neither caller is root and neither decides anything for root file:Open@164,file:QueryContext@826 4b2af103a84564dd3642552fcc818dcd592ce47cea2e7521a1bded2f9b8901da
+internal/dbquery/dbquery.go RunContext legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4, the footing main gave db.go runQueryContext); the carlos CLI on a person's machine, as the person, and the db-read worker (carlos system db-worker, carlos-dbread@.service, a DynamicUser with no network): db.go's runQueryContext body moved unchanged but for the immutable=1 open option the worker passes; opens one restored copy read-only (mode=ro, query_only, temp_store(2), no attached databases) and runs one guarded statement; neither caller is root and neither decides anything for root file:Open@164,file:QueryContext@826 4b2af103a84564dd3642552fcc818dcd592ce47cea2e7521a1bded2f9b8901da
+@legacy 52f6aaf48a1bf21aef6e22091c7b3216115f34b6bd13dd5b71dede0d8a196665 internal/dbreads/agent.go nonce legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=route-and-input (J1,J4, as the offline move's agent units); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, reads 16 random bytes from crypto/rand for the picked marker's attempt nonce (rand.Read, not a file); makes no root decision file:Read@39 eaeef494190dfb8f52b0182a438d61702afd66eedca77382218fa45038de7e03
+internal/dbreads/agent.go nonce legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=route-and-input (J1,J4, as the offline move's agent units); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, reads 16 random bytes from crypto/rand for the picked marker's attempt nonce (rand.Read, not a file); makes no root decision file:Read@39 eaeef494190dfb8f52b0182a438d61702afd66eedca77382218fa45038de7e03
+@legacy b4774dc0262f2fb27a04a90838c8706c18b3adc8b938615bac986c65feba80a4 internal/dbreads/read.go sendFile legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=route-and-input (J1,J4, as the offline move's agent units); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, reads one planned LTX file whole from this box's own region replica through the read-only replica reader, between identity checks A and B, and frames it to the worker without decoding it; makes no root decision file:Read@386 e14405e19aeb8806ea1c4798bf5cf1460152dca1c27728b4687c2282ec103fc9
+internal/dbreads/read.go sendFile legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=route-and-input (J1,J4, as the offline move's agent units); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, reads one planned LTX file whole from this box's own region replica through the read-only replica reader, between identity checks A and B, and frames it to the worker without decoding it; makes no root decision file:Read@386 e14405e19aeb8806ea1c4798bf5cf1460152dca1c27728b4687c2282ec103fc9
+@legacy 0a632ce515eae795aea44b7a035b5a7144ecb42c2cdfddf32f24faa54ad73853 internal/dbreads/seal.go open legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the carlos CLI on a person's machine, as the person (plan 2's forwarded query; plan 1 has no production caller): new, AES-GCM open of one sealed chunk or summary with the CLI's own ephemeral key (cipher.AEAD.Open, not a file); decides nothing for root file:Open@476 5c1f46770835c16c08b320bd1b2d297c05c05f4e0ff8d8ae93f6473c19745403
+internal/dbreads/seal.go open legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the carlos CLI on a person's machine, as the person (plan 2's forwarded query; plan 1 has no production caller): new, AES-GCM open of one sealed chunk or summary with the CLI's own ephemeral key (cipher.AEAD.Open, not a file); decides nothing for root file:Open@476 5c1f46770835c16c08b320bd1b2d297c05c05f4e0ff8d8ae93f6473c19745403
+@legacy 45358f4c76de6b6f37e70adb7ca111e96db81d3a7fc382cb2cccee7bae036b56 internal/dbreads/worker.go SelfView legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the db-read worker (carlos system db-worker, carlos-dbread@.service, a DynamicUser with no network, PrivateTmp, /data and /etc/carlos hidden): new, reads /proc/self/net/dev, lists /data and opens /etc/carlos/host.env only to report what its sandbox hides, for the agent's readiness probe; reads only the files the agent sent and its own scratch data-literal@275,data-literal@402,file:Open@442,file:ReadDir@264,file:ReadFile@82 2003801d3ece96004be7f62d9d2827f52758ec74aa5a7d978d9e170ea168e92c
+internal/dbreads/worker.go SelfView legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the db-read worker (carlos system db-worker, carlos-dbread@.service, a DynamicUser with no network, PrivateTmp, /data and /etc/carlos hidden): new, reads /proc/self/net/dev, lists /data and opens /etc/carlos/host.env only to report what its sandbox hides, for the agent's readiness probe; reads only the files the agent sent and its own scratch data-literal@275,data-literal@402,file:Open@442,file:ReadDir@264,file:ReadFile@82 2003801d3ece96004be7f62d9d2827f52758ec74aa5a7d978d9e170ea168e92c
+@legacy 7f5daefd00222637e1e83d083e3b78a8be70d9c9833ee8ffec4ca80958f94f4d internal/dbreads/worker.go ServeWorker legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the db-read worker (carlos system db-worker, carlos-dbread@.service, a DynamicUser with no network, PrivateTmp, /data and /etc/carlos hidden): new, stats the copy it restored in its own private /var/tmp for the restored-size cap; reads only the files the agent sent and its own scratch file:Stat@2223 391e8d92576c045823489e7cf96f0fd3b079dd26a50233a03805905ab757da30
+internal/dbreads/worker.go ServeWorker legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the db-read worker (carlos system db-worker, carlos-dbread@.service, a DynamicUser with no network, PrivateTmp, /data and /etc/carlos hidden): new, stats the copy it restored in its own private /var/tmp for the restored-size cap; reads only the files the agent sent and its own scratch file:Stat@2223 391e8d92576c045823489e7cf96f0fd3b079dd26a50233a03805905ab757da30
+@legacy c876af1009a9bbd9df840fe356cae7566fcfa815c09c9395edf7229172ff8bf5 internal/dbreads/worker.go receiveFile legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the db-read worker (carlos system db-worker, carlos-dbread@.service, a DynamicUser with no network, PrivateTmp, /data and /etc/carlos hidden): new, creates each planned LTX file the agent sent, exclusively, under its own private /var/tmp; reads only the files the agent sent and its own scratch file:OpenFile@171 62b73deebff651b84e5a59400846909c849e4523795af9bbb09d16fb5b9ae615
+internal/dbreads/worker.go receiveFile legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the db-read worker (carlos system db-worker, carlos-dbread@.service, a DynamicUser with no network, PrivateTmp, /data and /etc/carlos hidden): new, creates each planned LTX file the agent sent, exclusively, under its own private /var/tmp; reads only the files the agent sent and its own scratch file:OpenFile@171 62b73deebff651b84e5a59400846909c849e4523795af9bbb09d16fb5b9ae615
+@legacy 3f289f92386f552da552769cbabc56569f0f7e3180e532632c810dd995793eda internal/host/dbreads_linux.go dbReadUnits legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, systemctl list-units of carlos-dbread@ units, readable without privilege, for the orphan rule; makes no root decision file:CommandContext@66 eec3780d161697ba67d285db1c9961356b2d150cce4ad7b4b8c7b8a68ad7c9fc
+internal/host/dbreads_linux.go dbReadUnits legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, systemctl list-units of carlos-dbread@ units, readable without privilege, for the orphan rule; makes no root decision file:CommandContext@66 eec3780d161697ba67d285db1c9961356b2d150cce4ad7b4b8c7b8a68ad7c9fc
+@legacy a0017c90fcc6987d971e85fe9f9c517608fee729b418cb4ae8e5e8909fe28eab internal/host/dbreads_linux.go varTmpFree legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, one Statfs of /var/tmp for the disk reservation; makes no root decision file:Statfs@77 f8028e70b69b019949bdf666818970a2754b6b4a8e434241377e03f3a5b304f9
+internal/host/dbreads_linux.go varTmpFree legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=root-input (J4); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, one Statfs of /var/tmp for the disk reservation; makes no root decision file:Statfs@77 f8028e70b69b019949bdf666818970a2754b6b4a8e434241377e03f3a5b304f9
+@legacy b7eeb7bcfa7674f3ea16533381e90fb2574a3534210216f088428dd0f4b1476f internal/host/units/carlos-dbread.socket external legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=the db-read worker's units (written by root's ensureSystemUnits; carlos-dbread.socket bound by PID 1 and owned by carlos; carlos-dbread@.service runs as a DynamicUser with no network, its own PrivateTmp, /data, /var/lib, /opt/carlos and /run/carlos empty, /etc/carlos inaccessible): new file:external@0 c7d9d19bc8ab349a42cbc5576d7bd77d69db8cf4743451d2f93423a5bae063fe
+internal/host/units/carlos-dbread.socket external legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=the db-read worker's units (written by root's ensureSystemUnits; carlos-dbread.socket bound by PID 1 and owned by carlos; carlos-dbread@.service runs as a DynamicUser with no network, its own PrivateTmp, /data, /var/lib, /opt/carlos and /run/carlos empty, /etc/carlos inaccessible): new file:external@0 c7d9d19bc8ab349a42cbc5576d7bd77d69db8cf4743451d2f93423a5bae063fe
+@legacy b826ca7d2bd138371c3fbd97ba9f469b00b2fd50e44afcbfa624bfb92f150269 internal/host/units/carlos-dbread@.service external legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=the db-read worker's units (written by root's ensureSystemUnits; carlos-dbread.socket bound by PID 1 and owned by carlos; carlos-dbread@.service runs as a DynamicUser with no network, its own PrivateTmp, /data, /var/lib, /opt/carlos and /run/carlos empty, /etc/carlos inaccessible): new file:external@0 a51ff9509ae8438c44f6930a0e2309d4ef021e6f322a6449c71a8483fec6a48a
+internal/host/units/carlos-dbread@.service external legacy accepted-legacy accepted-legacy;rev3=PROPOSED-db-region-forward-1;basis=the db-read worker's units (written by root's ensureSystemUnits; carlos-dbread.socket bound by PID 1 and owned by carlos; carlos-dbread@.service runs as a DynamicUser with no network, its own PrivateTmp, /data, /var/lib, /opt/carlos and /run/carlos empty, /etc/carlos inaccessible): new file:external@0 a51ff9509ae8438c44f6930a0e2309d4ef021e6f322a6449c71a8483fec6a48a
+@legacy 0403b88dca097d2940ee2c7dc9e31598433f57736d54a69c98714f64acc298bd internal/host/edgesfile.go edgesFileLoop legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census-ruling-seeded-instances) with offline-move-1 joining the published capabilities each pass while the armed moves worker is capable (withOfflineCapability), and headroom asked of region HA's capability alone; read site unchanged, offset moved; a report, not a decision;rev3=PROPOSED-db-region-forward-1;basis=db-read-1 joins the published capabilities each pass while the armed db-reads loop's last readiness probe passed (withDBReadCapability), and the published draining flag is stored for that loop; read site unchanged, offset moved; a report, not a decision file:Read@3048 d4cd28e081b2b6ecfea6df5a5ae04b4c98d8e4f9f64539323ff18c59328a83ad
+internal/host/edgesfile.go edgesFileLoop legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census-ruling-seeded-instances) with offline-move-1 joining the published capabilities each pass while the armed moves worker is capable (withOfflineCapability), and headroom asked of region HA's capability alone; read site unchanged, offset moved; a report, not a decision;rev3=PROPOSED-db-region-forward-1;basis=db-read-1 joins the published capabilities each pass while the armed db-reads loop's last readiness probe passed (withDBReadCapability), and the published draining flag is stored for that loop; read site unchanged, offset moved; a report, not a decision file:Read@3048 d4cd28e081b2b6ecfea6df5a5ae04b4c98d8e4f9f64539323ff18c59328a83ad
+internal/host/agent.go fastConvergeLoop authority B3 rev3=census-ruling-moves-offline;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census-ruling-carlos-run) with the offline keep view read before the first reconcile pass (refreshOfflineView); read sites unchanged, offsets moved; main's B3 authority retained;rev3=PROPOSED-db-region-forward-1;basis=the serial pass also nudges the db-reads loop after the runs pass (nudgeDBReads, a channel send); read sites unchanged, offsets moved; main's B3 authority retained whole:Route@9036,whole:Route@9599 c1ee6e325091f52865dd62ad0bcb500ef358e03fbebadbb2a315b833e3d4e3e5
+internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-seeded-instances;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with wireSeedPlacement called in the activator start's Configure step, before armMovesPass, and the startup sweep's result stored for the import rollback in Recover; read sites unchanged, offsets moved; main's B,C,D,F authority retained PROPOSED E46: captured claim selection and root journal mutation; root RPC outside service host exclusion; SQL/route data never grants root authority. Executing identity: service controller; root for inventory/retirement callbacks.;rev3=PROPOSED-325;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=passes the agent's log sink to armRunsPass; reads unchanged;rev3=PROPOSED-db-region-forward-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=arms the db-reads loop (armDBReads) beside armRunsPass in the activator start's Configure step; reads unchanged, offsets moved; main's authority retained file:Exec@13802,file:Open@731,registry:App@10065,whole:Route@10057,whole:Route@23518 bfb4e24179044247af24b91a72b71fa5634fee616394421565c28c237d0779b4
+internal/host/systemunits.go ensureSystemUnits authority F,J4 rev3=PROPOSED-activation-tools;run=27;basis=automated offline transaction removed; retains preceding integrated classification: root-input;kept=F;scope=protected-decision-only;rev3=PROPOSED-db-region-forward-1;identity=root (the adopt pass);basis=installs carlos-dbread.socket and carlos-dbread@.service with the other system units, asks one more is-active and arms the socket, never the service template; read sites unchanged, offsets moved; main's F authority retained file:OpenFile@265,file:ReadFile@3125,file:ReadFile@3258,file:ReadFile@4186,file:Stat@3034 f5e628b842f45f2f6786d93d8118644bbebc843d78f33678ba783802646f50c8
+system.go runSystem authority B,C,D,F,G,J4 rev3=PROPOSED-activation-tools;identity=explicit operator CLI uid 0;basis=adds explicit system claims operator dispatch; every existing command branch unchanged;rev3=PROPOSED-db-region-forward-1;basis=dispatches carlos system db-worker to dbreads.RunWorker (the db-read worker systemd starts per connection; never run by hand); every existing branch unchanged 22334957db7c2e7d3255af1f1c3f2ae69a752dbf6ad7e2cf90b51b02d361bca6
+system.go systemVerb authority B,C,D,F,G,J4 rev3=PROPOSED-activation-tools;identity=explicit operator CLI uid 0;basis=adds explicit system claims operator dispatch; every existing command branch unchanged;rev3=PROPOSED-db-region-forward-1;basis=names db-worker as a system verb; every existing branch unchanged d58c95cca3c473bdcffa99a465a1066068b374d9e8e2353c64e170593f89c895
+internal/dbreads/agent.go Agent.probe diagnostic J4 rev3=PROPOSED-db-region-forward-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=the readiness probe: a hello on its own worker connection and the worker's report of its sandbox; decides only whether this box publishes db-read-1, never any root action; it reads nothing itself (a declaration row) 5b6f355a84ec41b1a6845c1c5ec4b5cb698696a4a0c51f556f2a7a255ddc20f0
+@coverage . 6e6ea47b610ecd2a61ec59a9b03cccbac6c47044eac5b1c8bf875ad66bd81060
+@coverage internal/console e7a502ab8853a864fb16c072f01e2445b100e65a94fad33c0d81a75d91351472
+@coverage internal/dbdoor c668f5bb72d53f71634425ed114c472199524501588aca698af2728abae81165
+@coverage internal/dbquery 09f18b6a1e0f254b4a5215ef29a57c4c467aa2632b7f1b936b5f0a0a75851075
+@coverage internal/dbreads 7f9edfdc5b3e4b31cb64da8bb33cacf37e1d666ee1ebd902b30f3276041012b9
+@coverage internal/dbreads/dbreadstest 55ba434bfd8eac5aebe932e3275a1c535c0ad284727deba3102fb80082ef4f58
+@coverage internal/host de39cbd6d90a27cecc79061def946041e4e8ee8216993f3e719a0c64a14f2a7c
+@coverage internal/host/units ac99f2aaa7f6d15d246bc60a984f427d1277ac8173a794b606565c7318cf86bc