carlos / platform Public

census: re-propose sec-unit-app-demobuild with the doc_engine reset

Adds RenderService (body, read sites unchanged) and re-pins the
internal/caps envelope; the carlos-app@ claim notes the reset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev ca97254387675bc48b46a161485723c9e96bbeff parent 9717f50
3 files changed, +12 −8
  • docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md +5 −3
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv +6 −4

CI failed — run details

diff --git a/docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md b/docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md
index ce1558f1f..21559822a 100644
--- a/docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md
+++ b/docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md
@@ -4,14 +4,16 @@ Ruling `census-ruling-sec-unit-app-demobuild`. The independent reviewer approves
| unit | change | read sites | what changed |
|---|---|---|---|
-| `internal/host/units/carlos-app@.service` `external` | body | unchanged (1) | sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@. ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. |
+| `internal/caps/render.go` `RenderService` | body | unchanged (2) | sec-review 2026-11-16 D1: a granted doc_engine block also emits the constant lines SystemCallFilter= and SystemCallErrorNumber=, clearing the template's new tenant syscall filter for that tenant only, so a conversion engine keeps the syscall surface it had before this branch. Constant strings, no input reaches them; no other capability changes; no read added. |
+| `internal/host/units/carlos-app@.service` `external` | body | unchanged (1) | sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@ (a comment notes that a granted doc_engine drop-in clears the filter). ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. |
-Envelopes re-pinned: `internal/demobuild`, `internal/host/units`, `internal/registry`.
+Envelopes re-pinned: `internal/caps`, `internal/demobuild`, `internal/host/units`, `internal/registry`.
Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
Recorded dispositions, which each change must still satisfy:
+- `internal/caps/render.go` `RenderService`: authority, task E4,J1,J4. Basis: root-input
- `internal/host/units/carlos-app@.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
@@ -19,6 +21,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/demobuild/unit.go:chmodCacheDirs`: reads +file:WalkDir; written legacy, accepted-legacy, frozen
- quiet `internal/demobuild/unit.go:Worker.prepareUnit`: reads nothing now; retired while it reads nothing (or its row keeps no sites)
-Seal: `4eda67fee53800e2cfa4177b954c7f0fce6bdfcfbfe1aa2547ddcec3027b668b` → `dea819de49de5d776703567d37edda16392be916492a68177354c1c10e45a162`.
+Seal: `4eda67fee53800e2cfa4177b954c7f0fce6bdfcfbfe1aa2547ddcec3027b668b` → `fea6bec1f00dace47aa6006bf8606602efda4cecfa4fe3c3890136c0fb27720c`.
Overlay: `internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.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 a0f8201e7..39b7059ca 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -232,4 +232,4 @@ plan14-root-reads-omr-run.tsv f82b5e513d7434e1440c13aa4aa8bc06348745749a21593cf4
plan14-root-reads-fleet-first-reconcile-speed.tsv 9206205b2a3bf27b8b85310f4a44f94ef0c5886d85d6e55dbf2f22e073a8af11
plan14-root-reads-free-storage-250.tsv 9206205b2a3bf27b8b85310f4a44f94ef0c5886d85d6e55dbf2f22e073a8af11
plan14-root-reads-fleet-first-reconcile-speed-4.tsv 4eda67fee53800e2cfa4177b954c7f0fce6bdfcfbfe1aa2547ddcec3027b668b
-plan14-root-reads-sec-unit-app-demobuild.tsv dea819de49de5d776703567d37edda16392be916492a68177354c1c10e45a162
+plan14-root-reads-sec-unit-app-demobuild.tsv fea6bec1f00dace47aa6006bf8606602efda4cecfa4fe3c3890136c0fb27720c
diff --git a/internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv b/internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv
index 1d93ff7cc..fb0c6e60a 100644
--- a/internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv
+++ b/internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv
@@ -1,12 +1,14 @@
# Census overlay sec-unit-app-demobuild, written by census-propose (#369). census-ruling-sec-unit-app-demobuild, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md.
-# 1 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 2 body, 0 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 2 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 1 quiet units retired while they read nothing, 0 other.
-@legacy 5b72bd059d8f67b37695430e852ff1c7487022fc14750c850abb7adc44053bd5 internal/host/units/carlos-app@.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@. ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. file:external@0 ca0b7a58a3d144638e72ec3a952d245f898bf95b554005dc0f32568eef303626
+@legacy a7ce64ca5d18a4206b3c734fc5e19cb19e822f8530e49cd554402b32bf2ffe43 internal/host/units/carlos-app@.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@ (a comment notes that a granted doc_engine drop-in clears the filter). ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. file:external@0 b6fcd5eebb2c268734597d44e3f066bdffdbea97d1c1a24884e3c31e571cb4a8
@legacy 0357359d139f60ef4d8716abaf6baa78faeb313cfb6697111134bd8224f34b1d internal/demobuild/unit.go chmodCacheDirs legacy accepted-legacy accepted-legacy;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D2: the systemd-family cache chmod, extracted from Worker.prepareUnit. Root walks the build cache (filepath.WalkDir, the same read as before) and still refuses a listed link with ErrBuild; each directory is now opened with instancefs.OpenDirBeneath(cache, rel) (openat2, no link at any component, fstat must be a directory) and chmodded 0777 through that descriptor instead of os.Chmod(path). A directory the previous tenant swaps for a link after the listing is refused, not followed. Reads nothing new; follows less. file:WalkDir@68 a4c07d2bb742a04658e1bd0f851eb02a477569db90f7f68f3f9b45b11d0794ca
-internal/host/units/carlos-app@.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@. ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. file:external@0 ca0b7a58a3d144638e72ec3a952d245f898bf95b554005dc0f32568eef303626
+internal/caps/render.go RenderService authority E4,J1,J4 root-input;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D1: a granted doc_engine block also emits the constant lines SystemCallFilter= and SystemCallErrorNumber=, clearing the template's new tenant syscall filter for that tenant only, so a conversion engine keeps the syscall surface it had before this branch. Constant strings, no input reaches them; no other capability changes; no read added. file:Command@201,file:Command@486 1e7c91e75bc043b352c8ac87f3370d5bc545506e49cd214da8cab8ee01042314
+internal/host/units/carlos-app@.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@ (a comment notes that a granted doc_engine drop-in clears the filter). ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. file:external@0 b6fcd5eebb2c268734597d44e3f066bdffdbea97d1c1a24884e3c31e571cb4a8
internal/demobuild/unit.go chmodCacheDirs legacy accepted-legacy accepted-legacy;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D2: the systemd-family cache chmod, extracted from Worker.prepareUnit. Root walks the build cache (filepath.WalkDir, the same read as before) and still refuses a listed link with ErrBuild; each directory is now opened with instancefs.OpenDirBeneath(cache, rel) (openat2, no link at any component, fstat must be a directory) and chmodded 0777 through that descriptor instead of os.Chmod(path). A directory the previous tenant swaps for a link after the listing is refused, not followed. Reads nothing new; follows less. file:WalkDir@68 a4c07d2bb742a04658e1bd0f851eb02a477569db90f7f68f3f9b45b11d0794ca
@remove internal/demobuild/unit.go Worker.prepareUnit
@removed internal/demobuild/unit.go Worker.prepareUnit H3 census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D2: its cache WalkDir moved into chmodCacheDirs, which it calls for the systemd family with mode 0777; nothing else changes.
+@coverage internal/caps 72918a59045a8573edd814c086a1814e51e7273cdbad6108ced14b74ee57d94e
@coverage internal/demobuild bb7a3cd592cb9f21b62ebb1722e29b93ca6f44661405d6ce7d7261f0dbe8e144
-@coverage internal/host/units 7aa62c8655bc21428e09d4c10d44de05d4235497d04bea8a1036d4bb493b2066
+@coverage internal/host/units fe8840568777278f27cca03af72ba97f2a975f0d7df1cf45f71fad24d29c8fa8
@coverage internal/registry 1a542542fc8e8e1683fde0f8309b47ceecfec05ee41108bc85e25aa1b5a0bd4d