carlos / platform Public

Census proposal for named-unit-delivery-114 redone after round 4: overlay, chain line, card and claims

make census-card, the CLAIMS file updated for round 4 (ensureDropInDir,
reap, applyStamped, planStamped, SyncWithCallbacks and prepareStamped
re-described; rootread.go:rootRead, declaredHostRefusal,
rootstate.OpenTrustedDirFrom and OpenTrustedFileFrom new; the deleted
rootread_unix.go:rootRead takes no claim), make census-propose with the
same NAME: the overlay, its chain line and the card rewritten; the
internal/rootstate envelope is re-pinned. Nothing here is a verdict: the
card goes to the independent reviewer.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Summary

Redoes the root-read census proposal after round 4; the verdicts are the independent reviewer's.
claude agent, operated by paul@keymail.dev f9ad96e47ae4a22a37f567e8b9fd4b81180eb21c parent 975a38f
4 files changed, +46 −28
  • docs/superpowers/notes/census-named-unit-delivery-114-claims.md +10 −6
  • docs/superpowers/notes/census-proposal-named-unit-delivery-114.md +11 −6
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-named-unit-delivery-114.tsv +24 −15

CI passed — run details

diff --git a/docs/superpowers/notes/census-named-unit-delivery-114-claims.md b/docs/superpowers/notes/census-named-unit-delivery-114-claims.md
index 66de62c15..fc14aa1f2 100644
--- a/docs/superpowers/notes/census-named-unit-delivery-114-claims.md
+++ b/docs/superpowers/notes/census-named-unit-delivery-114-claims.md
@@ -7,7 +7,7 @@ internal/appconfig/syncexec.go:AwaitingRestart stamped routes (stampedForDeliver
internal/appconfig/syncexec.go:SyncExecWithCallbacks the stale-file notice loop gains the stamped case: os.Stat of ConfigEnvPath(dataDir, rt), the path the exec-addr case already stats, and a notice line; no write, no new path
cli.go:hibernateRail new: refuses hibernation when the row names a unit; reads Host and Unit; a refusal only
internal/appconfig/dropin.go:dirIsPlain new: Lstat of <DropInRoot>/<unit>.d; a symlink or non-directory is not entered
-internal/appconfig/dropin.go:ensureDropInDir new: Lstat then Mkdir 0755 of /etc/systemd/system/<unit>.d; refuses a symlink or a non-directory (#114 §3.2 rail, codex R1-2, R2-1)
+internal/appconfig/dropin.go:ensureDropInDir new: Lstat then Mkdir 0755 of /etc/systemd/system/<unit>.d, then trustedDir (rootstate.OpenTrustedDirFrom anchored at /): the directory and every directory above it root-owned, not group- or other-writable, no symlink, before any write into it (round 4, census E3); refuses a symlink or a non-directory
internal/appconfig/dropin.go:hasPending new: Lstat of <unit>.d/carlos-env.pending, the reload-owed marker
internal/appconfig/dropin.go:unitDirs new: ReadDir of /etc/systemd/system listing *.service.d, symlinked entries reported and never entered
internal/appconfig/stamped.go:StampShape new: wraps stampShapeReason as an error; whole Route
@@ -18,8 +18,8 @@ internal/appconfig/stamped.go:unitDelivered new: syncable with unit backing, or
internal/appconfig/sync.go:finishHost new: the ack and restart half of the former syncHostClaimed; reads moved from it, none added
internal/appconfig/sync.go:prepareHost new: the read, hostname rail, key-loss guard and render half of the former syncHostClaimed (file:ReadFile of <envDir>/<host>.env); reads moved from it, none added; shared by the stamped path
internal/appconfig/syncexec.go:BlockedStamps new: the door-side rails (shape, name, hostname, one-route-per-unit) over the box's routes for the notice; registry reads only, fixed reason strings
-internal/appconfig/unitsync.go:planStamped new: the stamped rail before anything is touched: shape, name, hostname, one-route-per-unit, then the declaration (invariant A: loadDeclarations through rootRead of /etc/carlos/named-units.json, DeclaredBinding must name this unit, host, account and app; a registry row alone never authorises; an unreadable file refuses all), then ops.Probe (one systemctl show -p Id,LoadState,EnvironmentFiles), then readDropIn through rootRead for the unmanaged-file guard; declared units no route names are listed as idle; refuses on any failure; reads Host and Unit of rows already listed
-internal/appconfig/unitsync.go:prepareStamped new: DeclaredBinding again before any write (invariant A), then prepareHost, the carriage-return rail, the overlap rail (envFileNames of the base file through rootRead, names only, invariant B's grammar), ensureDropInDir, readDropIn through rootRead (marker-owned or refused), writePending before any mutation, commitHost of <envDir>/<host>.env, writeDropIn; reads Host and Unit of the row
+internal/appconfig/unitsync.go:planStamped new: the stamped rail before anything is touched: shape, name, hostname, one-route-per-unit, then the declaration (invariant A: loadDeclarations through rootRead of /etc/carlos/named-units.json, one JSON document with nothing after it, DeclaredBinding must name this unit, host, account and app; a registry row alone never authorises; an unreadable file refuses all), the declaration digest kept for the guard, then ops.Probe (one systemctl show -p Id,LoadState,EnvironmentFiles), then readDropIn through rootRead for the unmanaged-file guard; declared units no route names are listed as idle; refuses on any failure; reads Host and Unit of rows already listed
+internal/appconfig/unitsync.go:prepareStamped new: DeclaredBinding again before any write (invariant A), then prepareHost, the carriage-return rail, the overlap rail (envFileNames of the base file through rootRead, names only, invariant B's printable-ASCII grammar), ensureDropInDir (trusted directory), readDropIn through rootRead (marker-owned or refused), then the declaration digest re-checked before the pending marker, the env write and the drop-in write (declGuard); commitHost of <envDir>/<host>.env, writeDropIn; reads Host and Unit of the row
internal/host/unitops.go:daemonReload new: exec systemctl daemon-reload, once per pass when a marker exists
internal/host/unitops.go:lockConfigSync new: OpenFile <envDir>/.sync.lock (0644, create) and an exclusive flock for the whole config pass
internal/host/unitops.go:probeUnits new: exec systemctl show -p Id,LoadState,EnvironmentFiles <units>, unit names already passed DeliverableUnitName; parsed positionally, a count mismatch is an error
@@ -27,8 +27,12 @@ internal/host/unitops.go:systemctlRestartUnit new: exec systemctl restart <unit>
cli.go:runAdd registry opened before the stamp guards (the nested-evidence read reuses the handle, so one file:Open fewer); reads the existing row's Unit; StampShape on the row that would result
cli.go:unitRail validates the row that would result from the proposed unit (StampShape); clearing a stamp always allowed
internal/appconfig/routefingerprint.go:ConfigRouteFingerprints the unit row is gated on unitDelivered and carries Unit, so a re-stamp moves the digest (#114 §3.5)
-internal/appconfig/sync.go:SyncWithCallbacks takes ops.Lock for the pass; both eligibility gates admit Stamped routes; the instance overlay is fetched for a stamped route as for a unit-backed one; the stampedForDelivery branch prints plan refusals or prepares the route; reapDropIns (keyed on the declarations, never on rows) and applyStamped after the loop; reads Host and Unit of rows already listed
+internal/appconfig/sync.go:SyncWithCallbacks takes ops.Lock for the pass; a host the declaration names is admitted only as its declaration's own deliverable stamp (declaredHostRefusal, round 4 P1-1): any other row for it is refused before any bundle is read and before either writer, its env file untouched; with the declaration file unreadable nothing is delivered to any host and nothing reaped; both eligibility gates admit Stamped routes; the instance overlay is fetched for a stamped route as for a unit-backed one; the stampedForDelivery branch prints plan refusals or prepares the route; reapDropIns and applyStamped after the loop; the env reaper keeps declared hosts and runs only with the declarations read and unchanged; reads Host, Backing and Unit of rows already listed
internal/appconfig/syncexec.go:execRouteBase excludes a route naming a unit (rt.Unit != "") from every exec shape (#114 §3.1)
internal/appconfig/declarations.go:declarations.DeclaredBinding new: THE decider for invariant A: the declaration (from /etc/carlos/named-units.json, loaded through rootRead) that names rt.Unit must name rt.Host, release.RouteAccount(rt) and rt.App exactly, or an error with the reason; reads Host, App, Unit and whole Route of the row; nothing else is read
-internal/appconfig/rootread_unix.go:rootRead new: the one reader for invariant C: Lstat of every component from the configured directory down (a symlink or non-directory refuses), syscall.Open with O_RDONLY|O_NOFOLLOW|O_CLOEXEC, Fstat on the descriptor (regular file, owned by the trusted uid which is 0 in production, mode without group/other write), ReadAll from that descriptor capped at 1 MiB; used for the base file, the declaration and an existing drop-in; nothing else opens those files
-internal/appconfig/unitsync.go:applyStamped new: spec §3.2 steps 3-7: prints the idle declared units, one reload if a marker exists, per marked unit readDropIn through rootRead, post-reload probe, the two-path EnvironmentFiles check, DeclaredBinding again before the restart (invariant A), then restart and clear the marker; drift reported for unmarked units; reads whole Route of the prepared work
+internal/appconfig/unitsync.go:applyStamped new: spec §3.2 steps 3-7: prints the idle declared units; before the daemon-reload, and before each restart, the declaration file is re-read through the trusted reader and its digest compared with planning's (declGuard, round 4 P1-3), a change abandoning the rest of the pass; per marked unit readDropIn through rootRead, post-reload probe, the two-path EnvironmentFiles check, DeclaredBinding again, then restart and clear the marker; drift reported for unmarked units; reads whole Route of the prepared work
+internal/appconfig/sync.go:reap keeps every host the named-units declaration names as well as every registry host (round 4 P1-2, census E2); called only when the declaration file was read and unchanged since planning; the same ReadDir/Remove of <envDir> as main, no read added
+internal/appconfig/rootread.go:rootRead new: the one reader for invariant C, a thin wrapper: rootstate.OpenTrustedFileFrom anchored at / (every component root-owned, not group/other writable, O_NOFOLLOW by directory descriptor; the file a one-link regular file with the same checks) then ReadAll from that descriptor capped at 1 MiB; used for the base file, the declaration and an existing drop-in; nothing else opens those files
+internal/appconfig/unitsync.go:stampedPlan.declaredHostRefusal new: invariant A at the dispatch (round 4 P1-1): for a host the declaration names, the row must be a deliverable stamp bound by DeclaredBinding or the host is refused with the reason and its env file left untouched; reads Host, Backing, Unit and whole Route of the row; nothing else is read
+internal/rootstate/file_linux.go:OpenTrustedDirFrom new: Open's descriptor walk (descend) anchored at a caller-held directory whose owner (Fstat) is the trusted owner: the anchor opened O_RDONLY|O_DIRECTORY|O_NOFOLLOW, every component below it by Openat with the same flags and trusted() (owner, directory, no group/other write, world r-x); the release path's OpenTrustedFile is unchanged; config delivery anchors at / so the chain is OpenTrustedFile's
+internal/rootstate/file_linux.go:OpenTrustedFileFrom new: OpenTrustedFileFrom = OpenTrustedDirFrom of the file's directory, then safefile.OpenFileAt by descriptor and trusted() for a one-link regular file owned by the anchor's owner and not group/other writable; the release path's OpenTrustedFile is unchanged
diff --git a/docs/superpowers/notes/census-proposal-named-unit-delivery-114.md b/docs/superpowers/notes/census-proposal-named-unit-delivery-114.md
index 9442f4354..b6ba1ec5c 100644
--- a/docs/superpowers/notes/census-proposal-named-unit-delivery-114.md
+++ b/docs/superpowers/notes/census-proposal-named-unit-delivery-114.md
@@ -1,10 +1,11 @@
# Census approval: named-unit-delivery-114
-Ruling `census-ruling-named-unit-delivery-114`. The independent reviewer approves or rejects every change below, 27 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+Ruling `census-ruling-named-unit-delivery-114`. The independent reviewer approves or rejects every change below, 30 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
| unit | change | read sites | what changed |
|---|---|---|---|
| `cli.go` `runRouteUnit` | body | unchanged (8) | calls unitRail with the proposed unit so the door validates the row that would result (#114 spec §3.1, codex R3-5); read sites unchanged |
+| `internal/appconfig/sync.go` `reap` | body | unchanged (4) | keeps every host the named-units declaration names as well as every registry host (round 4 P1-2, census E2); called only when the declaration file was read and unchanged since planning; the same ReadDir/Remove of <envDir> as main, no read added |
| `internal/host/agent.go` `runAdoptUnderRootRelease` | body | unchanged (4) | config sync is appconfig.SyncUnits with productionUnitOps (drop-in root /etc/systemd/system, base dir /etc/carlos/units, the declaration file /etc/carlos/named-units.json, systemctl probe/reload/restart, the config flock); no proof binding and no bucket read for delivery (Paul's ruling on #114: a root-owned declaration decides); the comment at the restart callback rewritten; read sites unchanged |
| `cli.go` `runRouteHibernate` | sites | +registry:Host, +whole:Route | hibernateRail refuses hibernation on a stamped row before the daemon check (#114 §3.1, codex R3-5); reads Host and Unit of the row already read; a refusal only, no read added |
| `internal/appconfig/sync.go` `UnitConfigApps` | sites | -registry:Backing | gates on unitDelivered (a carlos-app@ backing or a unit stamp) instead of the inline Backing test; the Backing read moved into unitDelivered; no read added |
@@ -12,13 +13,14 @@ Ruling `census-ruling-named-unit-delivery-114`. The independent reviewer approve
| `internal/appconfig/syncexec.go` `AwaitingRestart` | sites | +registry:Environment, +registry:Host ×6, +whole:Route ×2 | stamped routes (stampedForDelivery) in the notice: a BlockedStamps reason reported after the environment narrowing and the owned-environment boundary, the default bundle loaded for a stamped route whatever the exec-delivery opt-in and the instance overlay loaded through the loader the pass already uses, a failure of either reported Unresolved, an un-opted addr route reported Undelivered; reads Host, Environment and whole Route of rows already listed; no new bucket key |
| `internal/appconfig/syncexec.go` `SyncExecWithCallbacks` | sites | +file:Stat, +registry:Host, +whole:Route ×2 | the stale-file notice loop gains the stamped case: os.Stat of ConfigEnvPath(dataDir, rt), the path the exec-addr case already stats, and a notice line; no write, no new path |
-Envelopes re-pinned: `.`, `internal/appconfig`, `internal/host`.
+Envelopes re-pinned: `.`, `internal/appconfig`, `internal/host`, `internal/rootstate`.
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. Escalate 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. An escalation goes to the census owner as a decision.
Recorded dispositions, which each change must still satisfy:
- `cli.go` `runRouteUnit`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
+- `internal/appconfig/sync.go` `reap`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1,J4;basis=route-and-input
- `internal/host/agent.go` `runAdoptUnderRootRelease`: authority, task B3,E1,E2,E3. Basis: rev3=census-ruling-self-serve-moves-1;basis=root claim/adopt/update controller uid 0: builds root's lifetime judge once from the host-claim switch and hands it to both productionRestartRequestPass calls; read sites unchanged, offsets moved; the preceding B3,E1,E2,E3 classification retained;rev3=census-ruling-claims-cleanup-r1;basis=claims cleanup R1: the claims shutdown timeout is the host constant claimsShutdownLimit (120s) instead of hostbox.RequestLimit (120s); no read added or changed
- `cli.go` `runRouteHibernate`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2: carlos route hibernate refuses a row with a runtime first (its hibernation is fixed at mint), before any dry run or other rail; reads Host and Runtime of the row already read; a refusal only
- `internal/appconfig/sync.go` `UnitConfigApps`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
@@ -34,7 +36,7 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/appconfig/dropin.go:ensureDropInDir`: reads +file:Lstat; written legacy, accepted-legacy, frozen
- new `internal/appconfig/dropin.go:hasPending`: reads +file:Lstat; written legacy, accepted-legacy, frozen
- new `internal/appconfig/dropin.go:unitDirs`: reads +file:ReadDir; written legacy, accepted-legacy, frozen
-- new `internal/appconfig/rootread_unix.go:rootRead`: reads +file:Fstat, +file:Lstat, +file:Open, +file:ReadAll; written legacy, accepted-legacy, frozen
+- new `internal/appconfig/rootread.go:rootRead`: reads +file:ReadAll; written legacy, accepted-legacy, frozen
- new `internal/appconfig/stamped.go:StampShape`: reads +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/appconfig/stamped.go:Stamped`: reads +registry:App, +registry:Kind ×2, +registry:Status ×2, +registry:Unit; written legacy, accepted-legacy, frozen
- new `internal/appconfig/stamped.go:stampShapeReason`: reads +registry:Addr, +registry:Addrs, +registry:Hibernate, +registry:Socket, +registry:Unit ×3; written legacy, accepted-legacy, frozen
@@ -45,17 +47,20 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/appconfig/syncexec.go:BlockedStamps`: reads +registry:App, +registry:Environment, +registry:Host ×7, +registry:Unit ×6, +whole:Route ×8; written legacy, accepted-legacy, frozen
- new `internal/appconfig/unitsync.go:applyStamped`: reads +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/appconfig/unitsync.go:planStamped`: reads +registry:Host ×7, +registry:Unit ×3, +whole:Route ×6; written legacy, accepted-legacy, frozen
-- new `internal/appconfig/unitsync.go:prepareStamped`: reads +registry:Host ×14, +registry:Unit, +whole:Route ×4; written legacy, accepted-legacy, frozen
+- new `internal/appconfig/unitsync.go:prepareStamped`: reads +registry:Host ×17, +registry:Unit, +whole:Route ×4; written legacy, accepted-legacy, frozen
+- new `internal/appconfig/unitsync.go:stampedPlan.declaredHostRefusal`: reads +registry:Backing, +registry:Host ×3, +registry:Unit, +whole:Route ×2; written legacy, accepted-legacy, frozen
- new `internal/host/unitops.go:daemonReload`: reads +file:Command; written legacy, accepted-legacy, frozen
- new `internal/host/unitops.go:lockConfigSync`: reads +file:OpenFile; written legacy, accepted-legacy, frozen
- new `internal/host/unitops.go:probeUnits`: reads +file:Command; written legacy, accepted-legacy, frozen
- new `internal/host/unitops.go:systemctlRestartUnit`: reads +file:Command; written legacy, accepted-legacy, frozen
+- new `internal/rootstate/file_linux.go:OpenTrustedDirFrom`: reads +file:Fstat, +file:OpenFile; written legacy, accepted-legacy, frozen
+- new `internal/rootstate/file_linux.go:OpenTrustedFileFrom`: reads +file:Fstat; written legacy, accepted-legacy, frozen
- reads `cli.go:runAdd`: -file:Open, +registry:Unit ×2, +whole:Route ×2; keeps legacy, task accepted-legacy
- reads `cli.go:unitRail`: +registry:Unit, +whole:Route ×2; keeps legacy, task accepted-legacy
- reads `internal/appconfig/routefingerprint.go:ConfigRouteFingerprints`: -registry:Backing, +registry:Unit; keeps legacy, task accepted-legacy
-- reads `internal/appconfig/sync.go:SyncWithCallbacks`: +registry:Host ×5, +registry:Unit, +whole:Route ×6; keeps legacy, task accepted-legacy
+- reads `internal/appconfig/sync.go:SyncWithCallbacks`: +registry:Host ×9, +registry:Unit, +whole:Route ×10; keeps legacy, task accepted-legacy
- reads `internal/appconfig/syncexec.go:execRouteBase`: +registry:Unit; keeps legacy, task accepted-legacy
-Seal: `b6f3a369ca91563f1d28a9855b242125fab0e3215066c0fd88a93d731459e43b` → `2d01750b089d5b91662b1552e9396ee4d074cc8886799940b5dff300dd9deec5`.
+Seal: `b6f3a369ca91563f1d28a9855b242125fab0e3215066c0fd88a93d731459e43b` → `6d5f8a7436b3cf3b29f75b18904f8cc4e15248995c3dc9bea2bfb1a3cfedc502`.
Overlay: `internal/provision/testdata/plan14-root-reads-named-unit-delivery-114.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 6c69a831d..e6a1a3e98 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -20,4 +20,4 @@ plan14-root-reads-region-ha-p1b1.tsv 185170fe393cb565d18a3359dee5ace12676b3e1ade
plan14-root-reads-rootfs-apps-3.tsv 4337475617b84cadf26e62a31387b7de1b6e9174bf5e6fa4d191f2d2a024e930
plan14-root-reads-retire-join-units-on-adopt.tsv 9e0c4a0c3c5299f68a046e989f49f35cfd2af82dbc76f2e5f00d15512f101a9d
plan14-root-reads-team-scoped-credentials.tsv b6f3a369ca91563f1d28a9855b242125fab0e3215066c0fd88a93d731459e43b
-plan14-root-reads-named-unit-delivery-114.tsv 2d01750b089d5b91662b1552e9396ee4d074cc8886799940b5dff300dd9deec5
+plan14-root-reads-named-unit-delivery-114.tsv 6d5f8a7436b3cf3b29f75b18904f8cc4e15248995c3dc9bea2bfb1a3cfedc502
diff --git a/internal/provision/testdata/plan14-root-reads-named-unit-delivery-114.tsv b/internal/provision/testdata/plan14-root-reads-named-unit-delivery-114.tsv
index d54fd21f7..0eb7e6eb3 100644
--- a/internal/provision/testdata/plan14-root-reads-named-unit-delivery-114.tsv
+++ b/internal/provision/testdata/plan14-root-reads-named-unit-delivery-114.tsv
@@ -1,14 +1,15 @@
# Census overlay named-unit-delivery-114, written by census-propose (#369). census-ruling-named-unit-delivery-114, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-named-unit-delivery-114.md.
-# 2 body, 5 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
-# 27 new dispositions: 5 reads re-frozen at their disposition with the claim, 22 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+# 3 body, 5 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 30 new dispositions: 5 reads re-frozen at their disposition with the claim, 25 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
@legacy 131db254cbdf33342a7292c9bb5fe226dc90935deaae7c8ef643f060a242d545 cli.go runRouteUnit legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=calls unitRail with the proposed unit so the door validates the row that would result (#114 spec §3.1, codex R3-5); read sites unchanged registry:Host@1070,registry:Host@161,registry:Host@348,registry:Host@421,registry:Host@541,registry:Unit@267,registry:Unit@559,whole:Route@107 d2f2d94904e4fc87a572d56982b18114ff1fdbff7e7681f5753c7c864810077e
+@legacy 7f724aaef403042e9c3b95e0ad0b812fdf2837b2c0aed3a2e61737b1825d7d4e internal/appconfig/sync.go reap legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-named-unit-delivery-114;basis=keeps every host the named-units declaration names as well as every registry host (round 4 P1-2, census E2); called only when the declaration file was read and unchanged since planning; the same ReadDir/Remove of <envDir> as main, no read added file:ReadDir@92,registry:Host@234,whole:Route@175,whole:Route@218 2244e9b3f55645ecf0517dfaee84e7e249100caab8ee4c9b95a43f1488e244e4
@legacy fb57253c5df7995d72db5ee037f3fc7b9d447cdc985c679a9dc8bc7c7fe3a6c7 cli.go hibernateRail legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: refuses hibernation when the row names a unit; reads Host and Unit; a refusal only registry:Host@260,registry:Unit@251,registry:Unit@50 c7b235783315042a44675dedf7f44502c665645019c4252fc59da7caaf0dbff9
@legacy b9fafe76eacb36296845789c2a059ddd38bec519d4f0b61e97052a42b404e0eb internal/appconfig/declarations.go declarations.DeclaredBinding legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: THE decider for invariant A: the declaration (from /etc/carlos/named-units.json, loaded through rootRead) that names rt.Unit must name rt.Host, release.RouteAccount(rt) and rt.App exactly, or an error with the reason; reads Host, App, Unit and whole Route of the row; nothing else is read registry:App@235,registry:App@470,registry:Host@215,registry:Host@435,registry:Unit@100,registry:Unit@189,registry:Unit@398,whole:Route@281,whole:Route@465 75d780079996ee68505f851b32becdf7d2405d53e98f518ad69d9e008c8cc700
@legacy 69bb7cf5c821b9a6b3959b7c464e16b89f32d6977d28bd76b3e695deed3eb41c internal/appconfig/dropin.go dirIsPlain legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Lstat of <DropInRoot>/<unit>.d; a symlink or non-directory is not entered file:Lstat@47 f27da3a5aaab58aee69179dd7cf52b0ec9cf572e1ed6cc4e6599e3cdced78d59
-@legacy 38e9f80db771b789a409c64dd2a5c4f3b8f96cf986f14f316f04be3c5f1375ac internal/appconfig/dropin.go ensureDropInDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Lstat then Mkdir 0755 of /etc/systemd/system/<unit>.d; refuses a symlink or a non-directory (#114 §3.2 rail, codex R1-2, R2-1) file:Lstat@90 a97dbcf5787ba49513462e80717b85248fdd527be253f871398f1843d8084dc6
+@legacy ea1f41202767f2ced44bdb6ef97582e3079d642fb9c1935a69264ded9b6cd0dc internal/appconfig/dropin.go ensureDropInDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Lstat then Mkdir 0755 of /etc/systemd/system/<unit>.d, then trustedDir (rootstate.OpenTrustedDirFrom anchored at /): the directory and every directory above it root-owned, not group- or other-writable, no symlink, before any write into it (round 4, census E3); refuses a symlink or a non-directory file:Lstat@108 7e02409aad01382657dfef0bb4b362f9a7d3af1a140b7d67942efc6c1399fae9
@legacy 423cff0df4767cb23a5d9c7f48b37f255e767c143455c6dbc28c565aa972af39 internal/appconfig/dropin.go hasPending legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Lstat of <unit>.d/carlos-env.pending, the reload-owed marker file:Lstat@53 bc3e359c355a5476d06ef8eb4e593dcea63707c6347579fe6460412244f4014f
@legacy d2d3aa8635955422ddb0a95f4c559abced65ce70ef7ce77b4f8384fb25e4231e internal/appconfig/dropin.go unitDirs legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: ReadDir of /etc/systemd/system listing *.service.d, symlinked entries reported and never entered file:ReadDir@69 2b0f8c17563054dc9c7e3c654682d457700c60962c65beb33e4f53ba5635beb3
-@legacy d7d1b4fc59a7d651cefd6aa88deb2d2f3136fc424c36465a248900415f9ef531 internal/appconfig/rootread_unix.go rootRead legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the one reader for invariant C: Lstat of every component from the configured directory down (a symlink or non-directory refuses), syscall.Open with O_RDONLY|O_NOFOLLOW|O_CLOEXEC, Fstat on the descriptor (regular file, owned by the trusted uid which is 0 in production, mode without group/other write), ReadAll from that descriptor capped at 1 MiB; used for the base file, the declaration and an existing drop-in; nothing else opens those files file:Fstat@1340,file:Lstat@590,file:Open@917,file:ReadAll@1809 651afe4a4488a39518a06800b6c125cc44fd627363fff682986261544d946146
+@legacy 685d04e183e01a6b26c5d8b6e7941b5550653888c9d67ecb152d674aec0ff712 internal/appconfig/rootread.go rootRead legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the one reader for invariant C, a thin wrapper: rootstate.OpenTrustedFileFrom anchored at / (every component root-owned, not group/other writable, O_NOFOLLOW by directory descriptor; the file a one-link regular file with the same checks) then ReadAll from that descriptor capped at 1 MiB; used for the base file, the declaration and an existing drop-in; nothing else opens those files file:ReadAll@273 22a70b3d2a0522bbbe85c03808e714cabff83d9c6f83d4baa4c6c4fc04e9e3bc
@legacy 8ae1f8ff103eab8aec944ffd43807cfdc91a6e18d2e0b46528131ab1c2cb834c internal/appconfig/stamped.go StampShape legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: wraps stampShapeReason as an error; whole Route whole:Route@69 623c049e3ce08e71fed6640151d4f9d34713425b4381bd713223dda6a2d5736e
@legacy c31d8a98e1d73052596e7099742b629a9575e42ee5f264371feba326ff16c08d internal/appconfig/stamped.go Stamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the stamped predicate on Unit, App, Kind and Status (#114 §3.1) registry:App@64,registry:Kind@108,registry:Kind@83,registry:Status@136,registry:Status@155,registry:Unit@47 4de90bac814075c17c5048c43229f9f66a6e4898f344c44f45432b4ddf3329eb
@legacy 768e9e50512c2026affe8e44bf724d3dfca55c94370b5303c21b12de8554c435 internal/appconfig/stamped.go stampShapeReason legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the supported shape rail (addr upstream, no socket, no hibernate) as a fixed string per rail; reads Socket, Addr, Addrs, Hibernate, Unit registry:Addr@229,registry:Addrs@246,registry:Hibernate@340,registry:Socket@66,registry:Unit@214,registry:Unit@325,registry:Unit@468 5e530f8530bee39d8fdcb7cf008cd05d0290c91013c5730b95b2666df13a2a23
@@ -17,17 +18,20 @@
@legacy 656f499ed708bf7aca46cf83a9551e61dcd227081ecaf7f19f8b6d7f8e96f376 internal/appconfig/sync.go finishHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the ack and restart half of the former syncHostClaimed; reads moved from it, none added registry:Hibernate@2060,registry:Host@1144,registry:Host@1796,registry:Host@2009,registry:Host@2265,registry:Host@2355,registry:Host@2574,registry:Host@569,whole:Route@593,whole:Route@713 75b74fbe948d169dca1d5a2c987d5492afdabb82229ac118cd3a19a0021b6aad
@legacy d0b3d52369d4338a0e7504867e689a69644c09eb4bcf53b74add3e4d96b8d5af internal/appconfig/sync.go prepareHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the read, hostname rail, key-loss guard and render half of the former syncHostClaimed (file:ReadFile of <envDir>/<host>.env); reads moved from it, none added; shared by the stamped path file:ReadFile@622,registry:App@3625,registry:App@3646,registry:App@3994,registry:App@4052,registry:Environment@3010,registry:Environment@3074,registry:Host@353,registry:Host@3616,registry:Host@370,registry:Host@388,registry:Host@3985,registry:Host@407,registry:Host@4200,registry:Host@432,registry:Host@532,registry:Host@593,registry:Host@739,whole:Route@4136 8573fdebae572097d992d0f1aeb52fb5f7aeeaf02489b47bb3985e56ca4064e7
@legacy f94a1602396134285fbc9331c9dad506fbf5bd32790c7d0895db06cbb0ccd3b2 internal/appconfig/syncexec.go BlockedStamps legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the door-side rails (shape, name, hostname, one-route-per-unit) over the box's routes for the notice; registry reads only, fixed reason strings registry:App@375,registry:Environment@465,registry:Host@252,registry:Host@701,registry:Host@804,registry:Host@860,registry:Host@903,registry:Host@927,registry:Host@999,registry:Unit@1097,registry:Unit@220,registry:Unit@273,registry:Unit@755,registry:Unit@828,registry:Unit@952,whole:Route@135,whole:Route@168,whole:Route@186,whole:Route@334,whole:Route@368,whole:Route@413,whole:Route@657,whole:Route@727 d6124f7570e1ecd4a15f79ceeca1c345ba027791af6d52d748941a2d704e4d68
-@legacy c3f5e8971539dcbb6eac619b766d0aa6c14ffb3b34cbb10f197d7576d3eb7e49 internal/appconfig/unitsync.go applyStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: spec §3.2 steps 3-7: prints the idle declared units, one reload if a marker exists, per marked unit readDropIn through rootRead, post-reload probe, the two-path EnvironmentFiles check, DeclaredBinding again before the restart (invariant A), then restart and clear the marker; drift reported for unmarked units; reads whole Route of the prepared work whole:Route@2336 253958b5f91f9ba35d54a9f8a4fb63270fec0b42833a5eae57d665b017906d42
-@legacy 21dc9be1e1887980a770809507f580e8de1734eb2acd5cb17d05fda6daf1e364 internal/appconfig/unitsync.go planStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the stamped rail before anything is touched: shape, name, hostname, one-route-per-unit, then the declaration (invariant A: loadDeclarations through rootRead of /etc/carlos/named-units.json, DeclaredBinding must name this unit, host, account and app; a registry row alone never authorises; an unreadable file refuses all), then ops.Probe (one systemctl show -p Id,LoadState,EnvironmentFiles), then readDropIn through rootRead for the unmanaged-file guard; declared units no route names are listed as idle; refuses on any failure; reads Host and Unit of rows already listed registry:Host@406,registry:Host@475,registry:Host@562,registry:Host@610,registry:Host@634,registry:Host@660,registry:Host@729,registry:Unit@529,registry:Unit@694,registry:Unit@719,whole:Route@1236,whole:Route@342,whole:Route@376,whole:Route@400,whole:Route@417,whole:Route@447 6aac6170e7c315b82225d958222b3ee92c8243a3134e9a539a932b2cf825aec0
-@legacy 7a666682746431ccfee6af661279d4001b41cb3d4a0351311f83be06c1067c41 internal/appconfig/unitsync.go prepareStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: DeclaredBinding again before any write (invariant A), then prepareHost, the carriage-return rail, the overlap rail (envFileNames of the base file through rootRead, names only, invariant B's grammar), ensureDropInDir, readDropIn through rootRead (marker-owned or refused), writePending before any mutation, commitHost of <envDir>/<host>.env, writeDropIn; reads Host and Unit of the row registry:Host@1119,registry:Host@1635,registry:Host@188,registry:Host@1924,registry:Host@2095,registry:Host@2298,registry:Host@2451,registry:Host@2587,registry:Host@2914,registry:Host@2978,registry:Host@3157,registry:Host@3240,registry:Host@3321,registry:Host@512,registry:Unit@435,whole:Route@197,whole:Route@201,whole:Route@416,whole:Route@562 57dc690bf3180e614222d56f091afe644ec6a92e2d60b49dd68daffac40dafed
+@legacy b08cf30bd3bf7f3070cb3735138235dc83ff2832d1354f92abeb4ecb43d609c0 internal/appconfig/unitsync.go applyStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: spec §3.2 steps 3-7: prints the idle declared units; before the daemon-reload, and before each restart, the declaration file is re-read through the trusted reader and its digest compared with planning's (declGuard, round 4 P1-3), a change abandoning the rest of the pass; per marked unit readDropIn through rootRead, post-reload probe, the two-path EnvironmentFiles check, DeclaredBinding again, then restart and clear the marker; drift reported for unmarked units; reads whole Route of the prepared work whole:Route@2423 5702dc25c67519d536d4e8e1ba30f1adf8ed7c15416fb5d5e461c58d5a5951f2
+@legacy e8b765fa8d2bd746fd465ccd4380f30a26f678680d0cb4e6b1cce2f4639d3f79 internal/appconfig/unitsync.go planStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the stamped rail before anything is touched: shape, name, hostname, one-route-per-unit, then the declaration (invariant A: loadDeclarations through rootRead of /etc/carlos/named-units.json, one JSON document with nothing after it, DeclaredBinding must name this unit, host, account and app; a registry row alone never authorises; an unreadable file refuses all), the declaration digest kept for the guard, then ops.Probe (one systemctl show -p Id,LoadState,EnvironmentFiles), then readDropIn through rootRead for the unmanaged-file guard; declared units no route names are listed as idle; refuses on any failure; reads Host and Unit of rows already listed registry:Host@473,registry:Host@542,registry:Host@629,registry:Host@677,registry:Host@701,registry:Host@727,registry:Host@796,registry:Unit@596,registry:Unit@761,registry:Unit@786,whole:Route@1303,whole:Route@409,whole:Route@443,whole:Route@467,whole:Route@484,whole:Route@514 bbb366baf596b3df488fc4af7ca4d7bb24e75e3a5321a4ee37b29d2f075bd5ea
+@legacy e7aa66b878de19daafcc43e528cd14604468d9fc677ada4e8d945beef0d16411 internal/appconfig/unitsync.go prepareStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: DeclaredBinding again before any write (invariant A), then prepareHost, the carriage-return rail, the overlap rail (envFileNames of the base file through rootRead, names only, invariant B's printable-ASCII grammar), ensureDropInDir (trusted directory), readDropIn through rootRead (marker-owned or refused), then the declaration digest re-checked before the pending marker, the env write and the drop-in write (declGuard); commitHost of <envDir>/<host>.env, writeDropIn; reads Host and Unit of the row registry:Host@1119,registry:Host@1608,registry:Host@188,registry:Host@1897,registry:Host@2075,registry:Host@2251,registry:Host@2404,registry:Host@2540,registry:Host@2921,registry:Host@3085,registry:Host@3230,registry:Host@3277,registry:Host@3435,registry:Host@3585,registry:Host@3668,registry:Host@3749,registry:Host@512,registry:Unit@435,whole:Route@197,whole:Route@201,whole:Route@416,whole:Route@562 4f05dc82324b0efc15edc75f6d740d3579d808df7e93aa2b44ce2ce6ff4016b8
+@legacy 3c2e9307099e989f66091fe0ac996345869190a3a7e7a06a039947ba31edac96 internal/appconfig/unitsync.go stampedPlan.declaredHostRefusal legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: invariant A at the dispatch (round 4 P1-1): for a host the declaration names, the row must be a deliverable stamp bound by DeclaredBinding or the host is refused with the reason and its env file left untouched; reads Host, Backing, Unit and whole Route of the row; nothing else is read registry:Backing@478,registry:Host@136,registry:Host@441,registry:Host@761,registry:Unit@490,whole:Route@200,whole:Route@540 e1548b63ba6184209dd8d86126e2e7c93705c49e3bca82d331be2f8b8f785b36
@legacy a5acd79601a6b02d3f53e134f2ee7d1bf33f9bca674b76f5cf7ba38563dfc3f9 internal/host/unitops.go daemonReload legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: exec systemctl daemon-reload, once per pass when a marker exists file:Command@41 f8a106f3a32e5fcbe3fb9a9225b51caaf70e15537071b56c62fca5e5c1b9437a
@legacy b154b7b002875296a8e6c95171090b8b59d569eb9ee8ce73b3b3e89859d70009 internal/host/unitops.go lockConfigSync legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: OpenFile <envDir>/.sync.lock (0644, create) and an exclusive flock for the whole config pass file:OpenFile@73 f928ef83094cc4ef541439864c6bb2602f700024755de2efd43821f18de25184
@legacy 6b179fdbca98258f8f70c3fa96332e01def4567170b6561159a00e1156c6ee20 internal/host/unitops.go probeUnits legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: exec systemctl show -p Id,LoadState,EnvironmentFiles <units>, unit names already passed DeliverableUnitName; parsed positionally, a count mismatch is an error file:Command@170 b13aded711feeec8bfab26d90f24aebf1628bd057229c2dce6de78fe3750b095
@legacy 73002325bd7770952f20ab312455538c2bd4c535f7f02298e1e7d3864ffd1cb1 internal/host/unitops.go systemctlRestartUnit legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: exec systemctl restart <unit>, only for a unit root bound to the route through Bind after a successful reload and an exact EnvironmentFiles match file:Command@60 a8adaa6c8afb33821e99a2907317ebb8a4ace5af7801abb4b742eb8a414b4480
+@legacy d6c96b4bc95e7bb800745d5ad1043699a85f9f32f81d169dbbb61287bba1af3c internal/rootstate/file_linux.go OpenTrustedDirFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Open's descriptor walk (descend) anchored at a caller-held directory whose owner (Fstat) is the trusted owner: the anchor opened O_RDONLY|O_DIRECTORY|O_NOFOLLOW, every component below it by Openat with the same flags and trusted() (owner, directory, no group/other write, world r-x); the release path's OpenTrustedFile is unchanged; config delivery anchors at / so the chain is OpenTrustedFile's file:Fstat@528,file:OpenFile@370 e7aa24fad38f830dd6b8b953ed79b796bb9ee39787c61e927f830a03ad748c81
+@legacy 15f5eedbe5ca093e7b9e4fb9477a1f8b2ba791700745612e3aa0bc8a865043bd internal/rootstate/file_linux.go OpenTrustedFileFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: OpenTrustedFileFrom = OpenTrustedDirFrom of the file's directory, then safefile.OpenFileAt by descriptor and trusted() for a one-link regular file owned by the anchor's owner and not group/other writable; the release path's OpenTrustedFile is unchanged file:Fstat@319 57cb5766ce657bf5e65cef9940a74aa362ae42e498693e1107da58343da26aee
@legacy 7211fbcd6af550432532e111dac1af34e35ce88a061b89423fa3a46c54e1773b cli.go runAdd legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2: carlos add refuses a host whose existing row has a runtime (refuseAddRootfs) and writes through addWrite (Registry.UpsertUnlessRootfs, which refuses in the same statement if a rootfs row appeared meanwhile); addBeforeWrite is a nil test seam; adds refusals only;rev3=census-ruling-named-unit-delivery-114;basis=registry opened before the stamp guards (the nested-evidence read reuses the handle, so one file:Open fewer); reads the existing row's Unit; StampShape on the row that would result file:Open@3515,registry:Addr@12427,registry:Addr@12440,registry:Addrs@11964,registry:Addrs@12311,registry:Addrs@12345,registry:Addrs@12373,registry:Health@12358,registry:Health@12389,registry:Replicas@13659,registry:Replicas@13676,registry:Steering@12878,registry:Steering@12895,registry:Unit@14118,registry:Unit@3726,whole:Route@10127,whole:Route@10211,whole:Route@10546,whole:Route@14110,whole:Route@14182,whole:Route@14445,whole:Route@14490,whole:Route@3690,whole:Route@6650 d11d9db4f6e2663621fdf8592eb1f0af515d6682a53f77f03ec6be78bc3ea06a
@legacy bf2404aa5b99f4f42f47d30df3c5960e939f2ce82eee3b3f4c3d766d6e406f9f cli.go unitRail legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=validates the row that would result from the proposed unit (StampShape); clearing a stamp always allowed registry:Backing@91,registry:Host@436,registry:Unit@465,whole:Route@461,whole:Route@518 f4f74c1698cb7e2a1a08e7c8c75182aa83bd717f25aef3abbf98aef1fddf882c
@legacy 8b160e29b567c38a56320d5cd5d1deef23bdc1d35bb1388026eb0cbddbb3fee8 internal/appconfig/routefingerprint.go ConfigRouteFingerprints legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=the unit row is gated on unitDelivered and carries Unit, so a re-stamp moves the digest (#114 §3.5) registry:App@558,registry:Environment@573,registry:Host@509,registry:Unit@998,whole:Route@129,whole:Route@546,whole:Route@606,whole:Route@631,whole:Route@696 eaff18a4b31d56a3222e94eba44fd288b096c45a78c05033dd0507bffe4bd0a7
-@legacy cd9bd7ed8ea2860a545129cd2e76488903f56f451ae3deff2256f7d39337ed35 internal/appconfig/sync.go SyncWithCallbacks legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-named-unit-delivery-114;basis=takes ops.Lock for the pass; both eligibility gates admit Stamped routes; the instance overlay is fetched for a stamped route as for a unit-backed one; the stampedForDelivery branch prints plan refusals or prepares the route; reapDropIns (keyed on the declarations, never on rows) and applyStamped after the loop; reads Host and Unit of rows already listed data-literal@12121,registry:App@4383,registry:App@6486,registry:Backing@1031,registry:Backing@12070,registry:Backing@8413,registry:Environment@4391,registry:Environment@6494,registry:Environment@6751,registry:Host@11111,registry:Host@11181,registry:Host@11244,registry:Host@1128,registry:Host@11302,registry:Host@11393,registry:Host@1222,registry:Host@12238,registry:Host@12305,registry:Host@1257,registry:Host@6894,registry:Host@8533,registry:Host@9439,registry:Host@9987,registry:Unit@11120,whole:Route@1000,whole:Route@1024,whole:Route@10529,whole:Route@11451,whole:Route@12315,whole:Route@12842,whole:Route@12906,whole:Route@1608,whole:Route@4278,whole:Route@4303,whole:Route@4318,whole:Route@4378,whole:Route@6381,whole:Route@6406,whole:Route@6421,whole:Route@6481,whole:Route@8459 02bec14579fe77107d85a30d531191c0ea0780a3b198e67c814eed8c616740db
+@legacy 986cdd82bf550e19a73b443d3b387b8b8860baa7cc5b96a1ae230a1122a002bc internal/appconfig/sync.go SyncWithCallbacks legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-named-unit-delivery-114;basis=takes ops.Lock for the pass; a host the declaration names is admitted only as its declaration's own deliverable stamp (declaredHostRefusal, round 4 P1-1): any other row for it is refused before any bundle is read and before either writer, its env file untouched; with the declaration file unreadable nothing is delivered to any host and nothing reaped; both eligibility gates admit Stamped routes; the instance overlay is fetched for a stamped route as for a unit-backed one; the stampedForDelivery branch prints plan refusals or prepares the route; reapDropIns and applyStamped after the loop; the env reaper keeps declared hosts and runs only with the declarations read and unchanged; reads Host, Backing and Unit of rows already listed data-literal@13410,registry:App@5400,registry:App@7775,registry:Backing@1031,registry:Backing@13359,registry:Backing@9702,registry:Environment@5408,registry:Environment@7783,registry:Environment@8040,registry:Host@10728,registry:Host@11276,registry:Host@1128,registry:Host@1222,registry:Host@12400,registry:Host@12470,registry:Host@12533,registry:Host@1257,registry:Host@12591,registry:Host@12682,registry:Host@13527,registry:Host@13594,registry:Host@2335,registry:Host@5216,registry:Host@7501,registry:Host@7567,registry:Host@8183,registry:Host@9822,registry:Unit@12409,whole:Route@1000,whole:Route@1024,whole:Route@11818,whole:Route@12740,whole:Route@13604,whole:Route@14131,whole:Route@14700,whole:Route@1608,whole:Route@2245,whole:Route@2295,whole:Route@5118,whole:Route@5143,whole:Route@5158,whole:Route@5281,whole:Route@5395,whole:Route@7398,whole:Route@7423,whole:Route@7438,whole:Route@7648,whole:Route@7770,whole:Route@9748 4cafcf12ddc25f2b8e3f146dda40c6bd23a195aae5c16d54351e3b86d82f25f2
@legacy 49b042bc6dadca1c4b50e81c833438f4f59bddae7c4158d76f5609caf0dba584 internal/appconfig/syncexec.go execRouteBase legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=excludes a route naming a unit (rt.Unit != "") from every exec shape (#114 §3.1) registry:App@98,registry:Backing@179,registry:Kind@54,registry:Platform@115,registry:Status@133,registry:Status@152,registry:Unit@219 7e7f23f29bd585146a96c396a4336e488d149cff3b7474c01ce4a900c8872721
@legacy ed56b1b5abc55ec6a4cacb8f2df6ab40018934b96cc69445cef68402dd953dfc cli.go runRouteHibernate legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2: carlos route hibernate refuses a row with a runtime first (its hibernation is fixed at mint), before any dry run or other rail; reads Host and Runtime of the row already read; a refusal only;rev3=census-ruling-named-unit-delivery-114;basis=hibernateRail refuses hibernation on a stamped row before the daemon check (#114 §3.1, codex R3-5); reads Host and Unit of the row already read; a refusal only, no read added registry:App@2812,registry:Hibernate@3557,registry:Hibernate@3844,registry:Host@1052,registry:Host@2748,registry:Host@2908,registry:Host@3227,registry:Host@3320,registry:Host@3646,registry:Host@3712,registry:Host@3835,registry:Host@525,registry:Provisioned@1086,registry:Replication@4467,registry:Replication@4638,registry:Runtime@345,whole:Route@2807,whole:Route@2859,whole:Route@3061,whole:Route@3066,whole:Route@3407,whole:Route@564 48565b382ceb8a48814fdaac42260a8a05c599ced7ecb356e9d2cf7d067168f2
@legacy 0603f75e5df0b0d771066e7d6a2db73c1d37294ceae960548e494445484ec34a internal/appconfig/sync.go UnitConfigApps legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=gates on unitDelivered (a carlos-app@ backing or a unit stamp) instead of the inline Backing test; the Backing read moved into unitDelivered; no read added registry:App@224,whole:Route@130,whole:Route@159,whole:Route@219 2413026f4d60335f3fc14f729634d2ee98e97280bae4213cb0ab98cf4f6c9672
@@ -35,14 +39,15 @@
@legacy f43f55a886ca4c1776368d6fdb8ff8234f9b35363f081dc7d4368d4758b4b0c0 internal/appconfig/syncexec.go AwaitingRestart legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-team-scoped-credentials;basis=team-scoped credentials (#449 §3): a route bound to an OWNED environment bundle is skipped for a default-bundle write (it reads none of it) and its exec_delivery is resolved through standaloneDefault (no inheritance); the same bundle reads as before, no read site added;rev3=census-ruling-named-unit-delivery-114;basis=stamped routes (stampedForDelivery) in the notice: a BlockedStamps reason reported after the environment narrowing and the owned-environment boundary, the default bundle loaded for a stamped route whatever the exec-delivery opt-in and the instance overlay loaded through the loader the pass already uses, a failure of either reported Unresolved, an un-opted addr route reported Undelivered; reads Host, Environment and whole Route of rows already listed; no new bucket key registry:App@1785,registry:Environment@2175,registry:Environment@2262,registry:Environment@2301,registry:Environment@3088,registry:Environment@6220,registry:Host@2970,registry:Host@3041,registry:Host@3177,registry:Host@3584,registry:Host@3729,registry:Host@4612,registry:Host@4691,registry:Host@4762,registry:Host@5130,registry:Host@6069,registry:Host@6145,registry:Host@6419,registry:Unit@6434,whole:Route@1695,whole:Route@1736,whole:Route@1765,whole:Route@1823,whole:Route@481 447c2590381de09be0bfe206d9b9870d0c7ceea7fd761f5ea740c55a0a3cacf1
@legacy 92eb3e264ce5a7d3557586b76b226f2ee0725b5c9c077bf3bab4aec16e0b9a83 internal/appconfig/syncexec.go SyncExecWithCallbacks legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline-fixes;basis=route-and-input (J1,J4, main's disposition); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), through syncExecSerialized: main's body, with a nested row whose write found no instance directory named and skipped (errInstanceDirAbsent, WhenInstanceDirAbsent) instead of failing the pass, and each in-scope host reported done or not done (WithHostOutcome) once the pass has gone through every route; no new read site;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=the scoped pass's route filter (WithRouteFilter, syncOptions.kept) is checked in its three route loops, so a route the filter leaves out is out of scope before anything is read for it; three whole-Route sites added, each passing rt to kept; no bucket or file read added;rev3=census-ruling-team-scoped-credentials;basis=team-scoped credentials (#449 §3): checkOptedIn's default-bundle thunk answers no default bundle for an OWNED environment bundle, so its exec_delivery is its own and never inherited; the same bundle reads as before, no read site added;rev3=census-ruling-named-unit-delivery-114;basis=the stale-file notice loop gains the stamped case: os.Stat of ConfigEnvPath(dataDir, rt), the path the exec-addr case already stats, and a notice line; no write, no new path file:Stat@28893,file:Stat@30122,registry:App@10596,registry:App@10811,registry:App@16357,registry:App@28773,registry:Environment@10604,registry:Environment@10819,registry:Environment@16365,registry:Environment@28781,registry:Host@1031,registry:Host@1066,registry:Host@1495,registry:Host@15865,registry:Host@16192,registry:Host@16290,registry:Host@17122,registry:Host@17473,registry:Host@18408,registry:Host@18949,registry:Host@21876,registry:Host@22093,registry:Host@22651,registry:Host@22841,registry:Host@22850,registry:Host@22869,registry:Host@25770,registry:Host@26387,registry:Host@26439,registry:Host@26595,registry:Host@29290,registry:Host@30440,registry:Host@866,registry:Host@937,whole:Route@10366,whole:Route@10424,whole:Route@10489,whole:Route@10550,whole:Route@10591,whole:Route@10708,whole:Route@10742,whole:Route@10806,whole:Route@1447,whole:Route@1476,whole:Route@15777,whole:Route@15827,whole:Route@16352,whole:Route@25366,whole:Route@25780,whole:Route@26484,whole:Route@28641,whole:Route@28663,whole:Route@28721,whole:Route@28768,whole:Route@28873,whole:Route@29331,whole:Route@30102,whole:Route@30681,whole:Route@30754,whole:Route@693,whole:Route@721,whole:Route@750,whole:Route@776,whole:Route@811 5bc7e65e01b7022357d9359f3b20c69edc73d05146963060746a3594d7239d04
cli.go runRouteUnit legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=calls unitRail with the proposed unit so the door validates the row that would result (#114 spec §3.1, codex R3-5); read sites unchanged registry:Host@1070,registry:Host@161,registry:Host@348,registry:Host@421,registry:Host@541,registry:Unit@267,registry:Unit@559,whole:Route@107 d2f2d94904e4fc87a572d56982b18114ff1fdbff7e7681f5753c7c864810077e
+internal/appconfig/sync.go reap legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-named-unit-delivery-114;basis=keeps every host the named-units declaration names as well as every registry host (round 4 P1-2, census E2); called only when the declaration file was read and unchanged since planning; the same ReadDir/Remove of <envDir> as main, no read added file:ReadDir@92,registry:Host@234,whole:Route@175,whole:Route@218 2244e9b3f55645ecf0517dfaee84e7e249100caab8ee4c9b95a43f1488e244e4
internal/host/agent.go runAdoptUnderRootRelease authority B3,E1,E2,E3 rev3=census-ruling-self-serve-moves-1;basis=root claim/adopt/update controller uid 0: builds root's lifetime judge once from the host-claim switch and hands it to both productionRestartRequestPass calls; read sites unchanged, offsets moved; the preceding B3,E1,E2,E3 classification retained;rev3=census-ruling-claims-cleanup-r1;basis=claims cleanup R1: the claims shutdown timeout is the host constant claimsShutdownLimit (120s) instead of hostbox.RequestLimit (120s); no read added or changed;rev3=census-ruling-named-unit-delivery-114;basis=config sync is appconfig.SyncUnits with productionUnitOps (drop-in root /etc/systemd/system, base dir /etc/carlos/units, the declaration file /etc/carlos/named-units.json, systemctl probe/reload/restart, the config flock); no proof binding and no bucket read for delivery (Paul's ruling on #114: a root-owned declaration decides); the comment at the restart callback rewritten; read sites unchanged whole:Route@11183,whole:Route@18479,whole:Route@18515,whole:Route@8425 f17b29328e5595214240090a1322469777c5291dde2009d9ad6dcd5b567b44e2
cli.go hibernateRail legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: refuses hibernation when the row names a unit; reads Host and Unit; a refusal only registry:Host@260,registry:Unit@251,registry:Unit@50 c7b235783315042a44675dedf7f44502c665645019c4252fc59da7caaf0dbff9
internal/appconfig/declarations.go declarations.DeclaredBinding legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: THE decider for invariant A: the declaration (from /etc/carlos/named-units.json, loaded through rootRead) that names rt.Unit must name rt.Host, release.RouteAccount(rt) and rt.App exactly, or an error with the reason; reads Host, App, Unit and whole Route of the row; nothing else is read registry:App@235,registry:App@470,registry:Host@215,registry:Host@435,registry:Unit@100,registry:Unit@189,registry:Unit@398,whole:Route@281,whole:Route@465 75d780079996ee68505f851b32becdf7d2405d53e98f518ad69d9e008c8cc700
internal/appconfig/dropin.go dirIsPlain legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Lstat of <DropInRoot>/<unit>.d; a symlink or non-directory is not entered file:Lstat@47 f27da3a5aaab58aee69179dd7cf52b0ec9cf572e1ed6cc4e6599e3cdced78d59
-internal/appconfig/dropin.go ensureDropInDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Lstat then Mkdir 0755 of /etc/systemd/system/<unit>.d; refuses a symlink or a non-directory (#114 §3.2 rail, codex R1-2, R2-1) file:Lstat@90 a97dbcf5787ba49513462e80717b85248fdd527be253f871398f1843d8084dc6
+internal/appconfig/dropin.go ensureDropInDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Lstat then Mkdir 0755 of /etc/systemd/system/<unit>.d, then trustedDir (rootstate.OpenTrustedDirFrom anchored at /): the directory and every directory above it root-owned, not group- or other-writable, no symlink, before any write into it (round 4, census E3); refuses a symlink or a non-directory file:Lstat@108 7e02409aad01382657dfef0bb4b362f9a7d3af1a140b7d67942efc6c1399fae9
internal/appconfig/dropin.go hasPending legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Lstat of <unit>.d/carlos-env.pending, the reload-owed marker file:Lstat@53 bc3e359c355a5476d06ef8eb4e593dcea63707c6347579fe6460412244f4014f
internal/appconfig/dropin.go unitDirs legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: ReadDir of /etc/systemd/system listing *.service.d, symlinked entries reported and never entered file:ReadDir@69 2b0f8c17563054dc9c7e3c654682d457700c60962c65beb33e4f53ba5635beb3
-internal/appconfig/rootread_unix.go rootRead legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the one reader for invariant C: Lstat of every component from the configured directory down (a symlink or non-directory refuses), syscall.Open with O_RDONLY|O_NOFOLLOW|O_CLOEXEC, Fstat on the descriptor (regular file, owned by the trusted uid which is 0 in production, mode without group/other write), ReadAll from that descriptor capped at 1 MiB; used for the base file, the declaration and an existing drop-in; nothing else opens those files file:Fstat@1340,file:Lstat@590,file:Open@917,file:ReadAll@1809 651afe4a4488a39518a06800b6c125cc44fd627363fff682986261544d946146
+internal/appconfig/rootread.go rootRead legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the one reader for invariant C, a thin wrapper: rootstate.OpenTrustedFileFrom anchored at / (every component root-owned, not group/other writable, O_NOFOLLOW by directory descriptor; the file a one-link regular file with the same checks) then ReadAll from that descriptor capped at 1 MiB; used for the base file, the declaration and an existing drop-in; nothing else opens those files file:ReadAll@273 22a70b3d2a0522bbbe85c03808e714cabff83d9c6f83d4baa4c6c4fc04e9e3bc
internal/appconfig/stamped.go StampShape legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: wraps stampShapeReason as an error; whole Route whole:Route@69 623c049e3ce08e71fed6640151d4f9d34713425b4381bd713223dda6a2d5736e
internal/appconfig/stamped.go Stamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the stamped predicate on Unit, App, Kind and Status (#114 §3.1) registry:App@64,registry:Kind@108,registry:Kind@83,registry:Status@136,registry:Status@155,registry:Unit@47 4de90bac814075c17c5048c43229f9f66a6e4898f344c44f45432b4ddf3329eb
internal/appconfig/stamped.go stampShapeReason legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the supported shape rail (addr upstream, no socket, no hibernate) as a fixed string per rail; reads Socket, Addr, Addrs, Hibernate, Unit registry:Addr@229,registry:Addrs@246,registry:Hibernate@340,registry:Socket@66,registry:Unit@214,registry:Unit@325,registry:Unit@468 5e530f8530bee39d8fdcb7cf008cd05d0290c91013c5730b95b2666df13a2a23
@@ -51,17 +56,20 @@ internal/appconfig/stamped.go unitDelivered legacy accepted-legacy accepted-lega
internal/appconfig/sync.go finishHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the ack and restart half of the former syncHostClaimed; reads moved from it, none added registry:Hibernate@2060,registry:Host@1144,registry:Host@1796,registry:Host@2009,registry:Host@2265,registry:Host@2355,registry:Host@2574,registry:Host@569,whole:Route@593,whole:Route@713 75b74fbe948d169dca1d5a2c987d5492afdabb82229ac118cd3a19a0021b6aad
internal/appconfig/sync.go prepareHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the read, hostname rail, key-loss guard and render half of the former syncHostClaimed (file:ReadFile of <envDir>/<host>.env); reads moved from it, none added; shared by the stamped path file:ReadFile@622,registry:App@3625,registry:App@3646,registry:App@3994,registry:App@4052,registry:Environment@3010,registry:Environment@3074,registry:Host@353,registry:Host@3616,registry:Host@370,registry:Host@388,registry:Host@3985,registry:Host@407,registry:Host@4200,registry:Host@432,registry:Host@532,registry:Host@593,registry:Host@739,whole:Route@4136 8573fdebae572097d992d0f1aeb52fb5f7aeeaf02489b47bb3985e56ca4064e7
internal/appconfig/syncexec.go BlockedStamps legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the door-side rails (shape, name, hostname, one-route-per-unit) over the box's routes for the notice; registry reads only, fixed reason strings registry:App@375,registry:Environment@465,registry:Host@252,registry:Host@701,registry:Host@804,registry:Host@860,registry:Host@903,registry:Host@927,registry:Host@999,registry:Unit@1097,registry:Unit@220,registry:Unit@273,registry:Unit@755,registry:Unit@828,registry:Unit@952,whole:Route@135,whole:Route@168,whole:Route@186,whole:Route@334,whole:Route@368,whole:Route@413,whole:Route@657,whole:Route@727 d6124f7570e1ecd4a15f79ceeca1c345ba027791af6d52d748941a2d704e4d68
-internal/appconfig/unitsync.go applyStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: spec §3.2 steps 3-7: prints the idle declared units, one reload if a marker exists, per marked unit readDropIn through rootRead, post-reload probe, the two-path EnvironmentFiles check, DeclaredBinding again before the restart (invariant A), then restart and clear the marker; drift reported for unmarked units; reads whole Route of the prepared work whole:Route@2336 253958b5f91f9ba35d54a9f8a4fb63270fec0b42833a5eae57d665b017906d42
-internal/appconfig/unitsync.go planStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the stamped rail before anything is touched: shape, name, hostname, one-route-per-unit, then the declaration (invariant A: loadDeclarations through rootRead of /etc/carlos/named-units.json, DeclaredBinding must name this unit, host, account and app; a registry row alone never authorises; an unreadable file refuses all), then ops.Probe (one systemctl show -p Id,LoadState,EnvironmentFiles), then readDropIn through rootRead for the unmanaged-file guard; declared units no route names are listed as idle; refuses on any failure; reads Host and Unit of rows already listed registry:Host@406,registry:Host@475,registry:Host@562,registry:Host@610,registry:Host@634,registry:Host@660,registry:Host@729,registry:Unit@529,registry:Unit@694,registry:Unit@719,whole:Route@1236,whole:Route@342,whole:Route@376,whole:Route@400,whole:Route@417,whole:Route@447 6aac6170e7c315b82225d958222b3ee92c8243a3134e9a539a932b2cf825aec0
-internal/appconfig/unitsync.go prepareStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: DeclaredBinding again before any write (invariant A), then prepareHost, the carriage-return rail, the overlap rail (envFileNames of the base file through rootRead, names only, invariant B's grammar), ensureDropInDir, readDropIn through rootRead (marker-owned or refused), writePending before any mutation, commitHost of <envDir>/<host>.env, writeDropIn; reads Host and Unit of the row registry:Host@1119,registry:Host@1635,registry:Host@188,registry:Host@1924,registry:Host@2095,registry:Host@2298,registry:Host@2451,registry:Host@2587,registry:Host@2914,registry:Host@2978,registry:Host@3157,registry:Host@3240,registry:Host@3321,registry:Host@512,registry:Unit@435,whole:Route@197,whole:Route@201,whole:Route@416,whole:Route@562 57dc690bf3180e614222d56f091afe644ec6a92e2d60b49dd68daffac40dafed
+internal/appconfig/unitsync.go applyStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: spec §3.2 steps 3-7: prints the idle declared units; before the daemon-reload, and before each restart, the declaration file is re-read through the trusted reader and its digest compared with planning's (declGuard, round 4 P1-3), a change abandoning the rest of the pass; per marked unit readDropIn through rootRead, post-reload probe, the two-path EnvironmentFiles check, DeclaredBinding again, then restart and clear the marker; drift reported for unmarked units; reads whole Route of the prepared work whole:Route@2423 5702dc25c67519d536d4e8e1ba30f1adf8ed7c15416fb5d5e461c58d5a5951f2
+internal/appconfig/unitsync.go planStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: the stamped rail before anything is touched: shape, name, hostname, one-route-per-unit, then the declaration (invariant A: loadDeclarations through rootRead of /etc/carlos/named-units.json, one JSON document with nothing after it, DeclaredBinding must name this unit, host, account and app; a registry row alone never authorises; an unreadable file refuses all), the declaration digest kept for the guard, then ops.Probe (one systemctl show -p Id,LoadState,EnvironmentFiles), then readDropIn through rootRead for the unmanaged-file guard; declared units no route names are listed as idle; refuses on any failure; reads Host and Unit of rows already listed registry:Host@473,registry:Host@542,registry:Host@629,registry:Host@677,registry:Host@701,registry:Host@727,registry:Host@796,registry:Unit@596,registry:Unit@761,registry:Unit@786,whole:Route@1303,whole:Route@409,whole:Route@443,whole:Route@467,whole:Route@484,whole:Route@514 bbb366baf596b3df488fc4af7ca4d7bb24e75e3a5321a4ee37b29d2f075bd5ea
+internal/appconfig/unitsync.go prepareStamped legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: DeclaredBinding again before any write (invariant A), then prepareHost, the carriage-return rail, the overlap rail (envFileNames of the base file through rootRead, names only, invariant B's printable-ASCII grammar), ensureDropInDir (trusted directory), readDropIn through rootRead (marker-owned or refused), then the declaration digest re-checked before the pending marker, the env write and the drop-in write (declGuard); commitHost of <envDir>/<host>.env, writeDropIn; reads Host and Unit of the row registry:Host@1119,registry:Host@1608,registry:Host@188,registry:Host@1897,registry:Host@2075,registry:Host@2251,registry:Host@2404,registry:Host@2540,registry:Host@2921,registry:Host@3085,registry:Host@3230,registry:Host@3277,registry:Host@3435,registry:Host@3585,registry:Host@3668,registry:Host@3749,registry:Host@512,registry:Unit@435,whole:Route@197,whole:Route@201,whole:Route@416,whole:Route@562 4f05dc82324b0efc15edc75f6d740d3579d808df7e93aa2b44ce2ce6ff4016b8
+internal/appconfig/unitsync.go stampedPlan.declaredHostRefusal legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: invariant A at the dispatch (round 4 P1-1): for a host the declaration names, the row must be a deliverable stamp bound by DeclaredBinding or the host is refused with the reason and its env file left untouched; reads Host, Backing, Unit and whole Route of the row; nothing else is read registry:Backing@478,registry:Host@136,registry:Host@441,registry:Host@761,registry:Unit@490,whole:Route@200,whole:Route@540 e1548b63ba6184209dd8d86126e2e7c93705c49e3bca82d331be2f8b8f785b36
internal/host/unitops.go daemonReload legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: exec systemctl daemon-reload, once per pass when a marker exists file:Command@41 f8a106f3a32e5fcbe3fb9a9225b51caaf70e15537071b56c62fca5e5c1b9437a
internal/host/unitops.go lockConfigSync legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: OpenFile <envDir>/.sync.lock (0644, create) and an exclusive flock for the whole config pass file:OpenFile@73 f928ef83094cc4ef541439864c6bb2602f700024755de2efd43821f18de25184
internal/host/unitops.go probeUnits legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: exec systemctl show -p Id,LoadState,EnvironmentFiles <units>, unit names already passed DeliverableUnitName; parsed positionally, a count mismatch is an error file:Command@170 b13aded711feeec8bfab26d90f24aebf1628bd057229c2dce6de78fe3750b095
internal/host/unitops.go systemctlRestartUnit legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: exec systemctl restart <unit>, only for a unit root bound to the route through Bind after a successful reload and an exact EnvironmentFiles match file:Command@60 a8adaa6c8afb33821e99a2907317ebb8a4ace5af7801abb4b742eb8a414b4480
+internal/rootstate/file_linux.go OpenTrustedDirFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: Open's descriptor walk (descend) anchored at a caller-held directory whose owner (Fstat) is the trusted owner: the anchor opened O_RDONLY|O_DIRECTORY|O_NOFOLLOW, every component below it by Openat with the same flags and trusted() (owner, directory, no group/other write, world r-x); the release path's OpenTrustedFile is unchanged; config delivery anchors at / so the chain is OpenTrustedFile's file:Fstat@528,file:OpenFile@370 e7aa24fad38f830dd6b8b953ed79b796bb9ee39787c61e927f830a03ad748c81
+internal/rootstate/file_linux.go OpenTrustedFileFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: OpenTrustedFileFrom = OpenTrustedDirFrom of the file's directory, then safefile.OpenFileAt by descriptor and trusted() for a one-link regular file owned by the anchor's owner and not group/other writable; the release path's OpenTrustedFile is unchanged file:Fstat@319 57cb5766ce657bf5e65cef9940a74aa362ae42e498693e1107da58343da26aee
cli.go runAdd legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2: carlos add refuses a host whose existing row has a runtime (refuseAddRootfs) and writes through addWrite (Registry.UpsertUnlessRootfs, which refuses in the same statement if a rootfs row appeared meanwhile); addBeforeWrite is a nil test seam; adds refusals only;rev3=census-ruling-named-unit-delivery-114;basis=registry opened before the stamp guards (the nested-evidence read reuses the handle, so one file:Open fewer); reads the existing row's Unit; StampShape on the row that would result file:Open@3515,registry:Addr@12427,registry:Addr@12440,registry:Addrs@11964,registry:Addrs@12311,registry:Addrs@12345,registry:Addrs@12373,registry:Health@12358,registry:Health@12389,registry:Replicas@13659,registry:Replicas@13676,registry:Steering@12878,registry:Steering@12895,registry:Unit@14118,registry:Unit@3726,whole:Route@10127,whole:Route@10211,whole:Route@10546,whole:Route@14110,whole:Route@14182,whole:Route@14445,whole:Route@14490,whole:Route@3690,whole:Route@6650 d11d9db4f6e2663621fdf8592eb1f0af515d6682a53f77f03ec6be78bc3ea06a
cli.go unitRail legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=validates the row that would result from the proposed unit (StampShape); clearing a stamp always allowed registry:Backing@91,registry:Host@436,registry:Unit@465,whole:Route@461,whole:Route@518 f4f74c1698cb7e2a1a08e7c8c75182aa83bd717f25aef3abbf98aef1fddf882c
internal/appconfig/routefingerprint.go ConfigRouteFingerprints legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=the unit row is gated on unitDelivered and carries Unit, so a re-stamp moves the digest (#114 §3.5) registry:App@558,registry:Environment@573,registry:Host@509,registry:Unit@998,whole:Route@129,whole:Route@546,whole:Route@606,whole:Route@631,whole:Route@696 eaff18a4b31d56a3222e94eba44fd288b096c45a78c05033dd0507bffe4bd0a7
-internal/appconfig/sync.go SyncWithCallbacks legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-named-unit-delivery-114;basis=takes ops.Lock for the pass; both eligibility gates admit Stamped routes; the instance overlay is fetched for a stamped route as for a unit-backed one; the stampedForDelivery branch prints plan refusals or prepares the route; reapDropIns (keyed on the declarations, never on rows) and applyStamped after the loop; reads Host and Unit of rows already listed data-literal@12121,registry:App@4383,registry:App@6486,registry:Backing@1031,registry:Backing@12070,registry:Backing@8413,registry:Environment@4391,registry:Environment@6494,registry:Environment@6751,registry:Host@11111,registry:Host@11181,registry:Host@11244,registry:Host@1128,registry:Host@11302,registry:Host@11393,registry:Host@1222,registry:Host@12238,registry:Host@12305,registry:Host@1257,registry:Host@6894,registry:Host@8533,registry:Host@9439,registry:Host@9987,registry:Unit@11120,whole:Route@1000,whole:Route@1024,whole:Route@10529,whole:Route@11451,whole:Route@12315,whole:Route@12842,whole:Route@12906,whole:Route@1608,whole:Route@4278,whole:Route@4303,whole:Route@4318,whole:Route@4378,whole:Route@6381,whole:Route@6406,whole:Route@6421,whole:Route@6481,whole:Route@8459 02bec14579fe77107d85a30d531191c0ea0780a3b198e67c814eed8c616740db
+internal/appconfig/sync.go SyncWithCallbacks legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-named-unit-delivery-114;basis=takes ops.Lock for the pass; a host the declaration names is admitted only as its declaration's own deliverable stamp (declaredHostRefusal, round 4 P1-1): any other row for it is refused before any bundle is read and before either writer, its env file untouched; with the declaration file unreadable nothing is delivered to any host and nothing reaped; both eligibility gates admit Stamped routes; the instance overlay is fetched for a stamped route as for a unit-backed one; the stampedForDelivery branch prints plan refusals or prepares the route; reapDropIns and applyStamped after the loop; the env reaper keeps declared hosts and runs only with the declarations read and unchanged; reads Host, Backing and Unit of rows already listed data-literal@13410,registry:App@5400,registry:App@7775,registry:Backing@1031,registry:Backing@13359,registry:Backing@9702,registry:Environment@5408,registry:Environment@7783,registry:Environment@8040,registry:Host@10728,registry:Host@11276,registry:Host@1128,registry:Host@1222,registry:Host@12400,registry:Host@12470,registry:Host@12533,registry:Host@1257,registry:Host@12591,registry:Host@12682,registry:Host@13527,registry:Host@13594,registry:Host@2335,registry:Host@5216,registry:Host@7501,registry:Host@7567,registry:Host@8183,registry:Host@9822,registry:Unit@12409,whole:Route@1000,whole:Route@1024,whole:Route@11818,whole:Route@12740,whole:Route@13604,whole:Route@14131,whole:Route@14700,whole:Route@1608,whole:Route@2245,whole:Route@2295,whole:Route@5118,whole:Route@5143,whole:Route@5158,whole:Route@5281,whole:Route@5395,whole:Route@7398,whole:Route@7423,whole:Route@7438,whole:Route@7648,whole:Route@7770,whole:Route@9748 4cafcf12ddc25f2b8e3f146dda40c6bd23a195aae5c16d54351e3b86d82f25f2
internal/appconfig/syncexec.go execRouteBase legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=excludes a route naming a unit (rt.Unit != "") from every exec shape (#114 §3.1) registry:App@98,registry:Backing@179,registry:Kind@54,registry:Platform@115,registry:Status@133,registry:Status@152,registry:Unit@219 7e7f23f29bd585146a96c396a4336e488d149cff3b7474c01ce4a900c8872721
cli.go runRouteHibernate legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2: carlos route hibernate refuses a row with a runtime first (its hibernation is fixed at mint), before any dry run or other rail; reads Host and Runtime of the row already read; a refusal only;rev3=census-ruling-named-unit-delivery-114;basis=hibernateRail refuses hibernation on a stamped row before the daemon check (#114 §3.1, codex R3-5); reads Host and Unit of the row already read; a refusal only, no read added registry:App@2812,registry:Hibernate@3557,registry:Hibernate@3844,registry:Host@1052,registry:Host@2748,registry:Host@2908,registry:Host@3227,registry:Host@3320,registry:Host@3646,registry:Host@3712,registry:Host@3835,registry:Host@525,registry:Provisioned@1086,registry:Replication@4467,registry:Replication@4638,registry:Runtime@345,whole:Route@2807,whole:Route@2859,whole:Route@3061,whole:Route@3066,whole:Route@3407,whole:Route@564 48565b382ceb8a48814fdaac42260a8a05c599ced7ecb356e9d2cf7d067168f2
internal/appconfig/sync.go UnitConfigApps legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-named-unit-delivery-114;basis=gates on unitDelivered (a carlos-app@ backing or a unit stamp) instead of the inline Backing test; the Backing read moved into unitDelivered; no read added registry:App@224,whole:Route@130,whole:Route@159,whole:Route@219 2413026f4d60335f3fc14f729634d2ee98e97280bae4213cb0ab98cf4f6c9672
@@ -69,5 +77,6 @@ internal/appconfig/sync.go syncHostClaimed legacy accepted-legacy accepted-legac
internal/appconfig/syncexec.go AwaitingRestart legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-team-scoped-credentials;basis=team-scoped credentials (#449 §3): a route bound to an OWNED environment bundle is skipped for a default-bundle write (it reads none of it) and its exec_delivery is resolved through standaloneDefault (no inheritance); the same bundle reads as before, no read site added;rev3=census-ruling-named-unit-delivery-114;basis=stamped routes (stampedForDelivery) in the notice: a BlockedStamps reason reported after the environment narrowing and the owned-environment boundary, the default bundle loaded for a stamped route whatever the exec-delivery opt-in and the instance overlay loaded through the loader the pass already uses, a failure of either reported Unresolved, an un-opted addr route reported Undelivered; reads Host, Environment and whole Route of rows already listed; no new bucket key registry:App@1785,registry:Environment@2175,registry:Environment@2262,registry:Environment@2301,registry:Environment@3088,registry:Environment@6220,registry:Host@2970,registry:Host@3041,registry:Host@3177,registry:Host@3584,registry:Host@3729,registry:Host@4612,registry:Host@4691,registry:Host@4762,registry:Host@5130,registry:Host@6069,registry:Host@6145,registry:Host@6419,registry:Unit@6434,whole:Route@1695,whole:Route@1736,whole:Route@1765,whole:Route@1823,whole:Route@481 447c2590381de09be0bfe206d9b9870d0c7ceea7fd761f5ea740c55a0a3cacf1
internal/appconfig/syncexec.go SyncExecWithCallbacks legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline-fixes;basis=route-and-input (J1,J4, main's disposition); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), through syncExecSerialized: main's body, with a nested row whose write found no instance directory named and skipped (errInstanceDirAbsent, WhenInstanceDirAbsent) instead of failing the pass, and each in-scope host reported done or not done (WithHostOutcome) once the pass has gone through every route; no new read site;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=the scoped pass's route filter (WithRouteFilter, syncOptions.kept) is checked in its three route loops, so a route the filter leaves out is out of scope before anything is read for it; three whole-Route sites added, each passing rt to kept; no bucket or file read added;rev3=census-ruling-team-scoped-credentials;basis=team-scoped credentials (#449 §3): checkOptedIn's default-bundle thunk answers no default bundle for an OWNED environment bundle, so its exec_delivery is its own and never inherited; the same bundle reads as before, no read site added;rev3=census-ruling-named-unit-delivery-114;basis=the stale-file notice loop gains the stamped case: os.Stat of ConfigEnvPath(dataDir, rt), the path the exec-addr case already stats, and a notice line; no write, no new path file:Stat@28893,file:Stat@30122,registry:App@10596,registry:App@10811,registry:App@16357,registry:App@28773,registry:Environment@10604,registry:Environment@10819,registry:Environment@16365,registry:Environment@28781,registry:Host@1031,registry:Host@1066,registry:Host@1495,registry:Host@15865,registry:Host@16192,registry:Host@16290,registry:Host@17122,registry:Host@17473,registry:Host@18408,registry:Host@18949,registry:Host@21876,registry:Host@22093,registry:Host@22651,registry:Host@22841,registry:Host@22850,registry:Host@22869,registry:Host@25770,registry:Host@26387,registry:Host@26439,registry:Host@26595,registry:Host@29290,registry:Host@30440,registry:Host@866,registry:Host@937,whole:Route@10366,whole:Route@10424,whole:Route@10489,whole:Route@10550,whole:Route@10591,whole:Route@10708,whole:Route@10742,whole:Route@10806,whole:Route@1447,whole:Route@1476,whole:Route@15777,whole:Route@15827,whole:Route@16352,whole:Route@25366,whole:Route@25780,whole:Route@26484,whole:Route@28641,whole:Route@28663,whole:Route@28721,whole:Route@28768,whole:Route@28873,whole:Route@29331,whole:Route@30102,whole:Route@30681,whole:Route@30754,whole:Route@693,whole:Route@721,whole:Route@750,whole:Route@776,whole:Route@811 5bc7e65e01b7022357d9359f3b20c69edc73d05146963060746a3594d7239d04
@coverage . 642c0c29b1d64d697a6a670ecd447a6585d6584a32cacaa1c69edd0f2596edb7
-@coverage internal/appconfig eed1405c81215cdeec4769f56eae3eb447b5bd85298ba393cdbf30399516c938
+@coverage internal/appconfig 261f00671f269d33ded16f37e761440e6351360200934d2245e64e72bb9a468d
@coverage internal/host e04ac8fec369c8cd6b271bbd0fd2b57f54e3865e6595c42853beeb2134a6cbe9
+@coverage internal/rootstate 85c218bdbc208067e69083deacb87b2330b8971418f24c1f1bd3f0399915e3c4