| index 4ba9c8a50..3b7dc20cc 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-db-region-forward-1.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-db-region-forward-1.tsv |
| @@ -12,23 +12,23 @@ internal/dbreads/read.go sendFile legacy accepted-legacy accepted-legacy;rev3=PR |
| 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 62dbd596e56469e60268d4cddc1bdf852a775521a00b29ac172b48d44dc3d9f1 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; round 1: it refuses, before writing anything, a plan whose restored-size cap exceeds its own LimitFSIZE or whose files total more than twice that cap file:Stat@2672 49f8ce8058469ac4ebec6dad82b69700d7a00a319550c12372e6266bb9db88cc |
| +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; round 1: it refuses, before writing anything, a plan whose restored-size cap exceeds its own LimitFSIZE or whose files total more than twice that cap file:Stat@2672 49f8ce8058469ac4ebec6dad82b69700d7a00a319550c12372e6266bb9db88cc |
| @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 56b0ddd6b4e1ab709abf86c1a6959a71b45f474ca3030536d33f7d1d7421498c 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; round 1: it listens at /run/carlos/dbread/worker.sock, under the /run/carlos tree every tenant unit hides, and is armed only where host.env arms db reads file:external@0 e21a31b98984fcf3495b24cb615ffb5e3df0638672d3d445bf5e59f5eee4326e |
| +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; round 1: it listens at /run/carlos/dbread/worker.sock, under the /run/carlos tree every tenant unit hides, and is armed only where host.env arms db reads file:external@0 e21a31b98984fcf3495b24cb615ffb5e3df0638672d3d445bf5e59f5eee4326e |
| @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 |
| +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; round 1: arms carlos-dbread.socket only when the installed host.env arms db reads (dbReadsSocketWanted reads its six db-reads keys through readClaimUnitFile, which the scanner does not name), and stops and disables it elsewhere file:OpenFile@265,file:ReadFile@3396,file:ReadFile@3529,file:ReadFile@4688,file:Stat@3305 8b869a274b83ececef1eb2950694fee69866ce9de3111bcf0795a1ed5e77a838 |
| 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 |
| @@ -36,7 +36,7 @@ internal/dbreads/agent.go Agent.probe diagnostic J4 rev3=PROPOSED-db-region-forw |
| @coverage internal/console e7a502ab8853a864fb16c072f01e2445b100e65a94fad33c0d81a75d91351472 |
| @coverage internal/dbdoor c668f5bb72d53f71634425ed114c472199524501588aca698af2728abae81165 |
| @coverage internal/dbquery 09f18b6a1e0f254b4a5215ef29a57c4c467aa2632b7f1b936b5f0a0a75851075 |
| -@coverage internal/dbreads 7f9edfdc5b3e4b31cb64da8bb33cacf37e1d666ee1ebd902b30f3276041012b9 |
| +@coverage internal/dbreads 59c5cccb21ad03bebb4017ba368593a828cbb3ce40540ab9be30778d781a2714 |
| @coverage internal/dbreads/dbreadstest 55ba434bfd8eac5aebe932e3275a1c535c0ad284727deba3102fb80082ef4f58 |
| -@coverage internal/host de39cbd6d90a27cecc79061def946041e4e8ee8216993f3e719a0c64a14f2a7c |
| -@coverage internal/host/units ac99f2aaa7f6d15d246bc60a984f427d1277ac8173a794b606565c7318cf86bc |
| +@coverage internal/host 49e2e0d84508e76f8e0b917bd73513ddb2c58a04e89753445e59c635f9bc12a3 |
| +@coverage internal/host/units 1c3779f6369cfeb7682ed3d8ea5ee906efb6295f2fff799ebc8f3ee1edc4416f |