| 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 |