carlos / platform Public

census: PDF service overlay (proposed)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 4f16e1e1c280e88172f1c3f346467e273dd34a48 parent 13ab392
6 files changed, +67 −3
  • docs/superpowers/notes/census-proposal-design-pdf-service.md +30 −0
  • internal/provision/app_lists_census_test.go +5 −1
  • internal/provision/plans4d_census_test.go +4 −1
  • internal/provision/stateless_replicas_census_test.go +4 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-design-pdf-service.tsv +23 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-proposal-design-pdf-service.md b/docs/superpowers/notes/census-proposal-design-pdf-service.md
new file mode 100644
index 000000000..c4e484d47
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-design-pdf-service.md
@@ -0,0 +1,30 @@
+# Census approval: design-pdf-service
+
+Ruling `census-ruling-design-pdf-service`. The independent reviewer approves or rejects every change below, 6 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `system.go` `runSystem` | body | unchanged (0) | add dispatch for carlos system pdf; no new reads |
+| `system.go` `systemVerb` | body | unchanged (0) | add recognition for carlos system pdf; no new reads |
+
+Envelopes re-pinned: `.`, `infra/modules/pdf-host`, `infra/modules/pdf-host/tests`, `internal/plans`, `internal/release`, `internal/svcrole`.
+
+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:
+
+- `system.go` `runSystem`: authority, task B,C,D,F,G,J4. Basis: rev3=census-ruling-self-serve-moves-1;identity=explicit operator CLI uid 0;basis=adds the lifetimes family to the system dispatch (carlos system lifetimes cutover, a console door call as the operator); every existing command branch unchanged;rev3=census-ruling-claims-cleanup-r2;basis=claims cleanup R2: drops the claims case (host.RunSystemClaims, deleted); every other branch unchanged; no read added;rev3=census-ruling-nearest-region-a;basis=adds the hosts-used family to the system dispatch (carlos system hosts-used status, one GET of a console door as the operator); every existing command branch unchanged; no read added;rev3=census-ruling-region-ha-p1a;basis=explicit operator CLI and root units, uid 0: drops the "join" case (host.RunSystemJoin, deleted with internal/host/joinroot.go, its only caller) and its line in the usage text; every other branch unchanged; no read added;rev3=census-ruling-named-unit-delivery-114;basis=the system verb dispatch gains named-units, routed to host.RunSystemNamedUnits; no read of its own
+- `system.go` `systemVerb`: authority, task B,C,D,F,G,J4. Basis: rev3=census-ruling-self-serve-moves-1;identity=explicit operator CLI uid 0;basis=adds the lifetimes family to the system dispatch (carlos system lifetimes cutover, a console door call as the operator); every existing command branch unchanged;rev3=census-ruling-claims-cleanup-r2;basis=claims cleanup R2: drops "claims" from the verb list, so it now falls to the unknown-verb message; no read added;rev3=census-ruling-nearest-region-a;basis=adds "hosts-used" to the verb list, routed to runSystemHostsUsedVerb; no read added;rev3=census-ruling-region-ha-p1a;basis=explicit operator CLI and root units, uid 0: drops "join" from the verb list, so `carlos system join` now falls to the unknown-verb message; no read added;rev3=census-ruling-named-unit-delivery-114;basis=the known-verb list gains named-units; no read of its own
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `infra/modules/pdf-host/main.tf:external`: reads +file:external; written legacy, accepted-legacy, frozen
+- new `infra/modules/pdf-host/outputs.tf:external`: reads +file:external; written legacy, accepted-legacy, frozen
+- new `infra/modules/pdf-host/pdf-init.sh.tftpl:external`: reads +file:external; written legacy, accepted-legacy, frozen
+- new `infra/modules/pdf-host/tests/pdf_host.tftest.hcl:external`: reads +file:external; written legacy, accepted-legacy, frozen
+- new `infra/modules/pdf-host/variables.tf:external`: reads +file:external; written legacy, accepted-legacy, frozen
+- new `infra/modules/pdf-host/versions.tf:external`: reads +file:external; written legacy, accepted-legacy, frozen
+
+Seal: `3b6cd29b87d2728254936722ab45fdadcfbb8c1f5b74fdfa19d1921b9dfd1dbe` → `2fc38b898e5a7672dfb6066d42a09b57dd367620bae7b9c2d126d0b1659cd856`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-design-pdf-service.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/app_lists_census_test.go b/internal/provision/app_lists_census_test.go
index 39eb15c7d..372d746ab 100644
--- a/internal/provision/app_lists_census_test.go
+++ b/internal/provision/app_lists_census_test.go
@@ -17,7 +17,11 @@ func appListsWriteCensusInventory() []censusEntry {
// initializes purchaseWake and registers the five domain-purchase
// browser routes. These additions write no bucket record; the existing
// instances route literals still make this a key-site.
- {"internal/console/server.go", "NewServer", "key-site", "lit:instances", "00fe99a68cd92adcd291049b9d2b47907ea257ed707a4d1e02ab703fd57aa204"},
+ // PDF service Task 7c (R15), self-review: defaults and validates PDF
+ // limits, initializes the limiter and timeout, and wires recordPDF to
+ // RecordPDFRender's console SQL. The PDF config is retained in cfg;
+ // the existing instances literal and bucket record writes are unchanged.
+ {"internal/console/server.go", "NewServer", "key-site", "lit:instances", "8881706f6235e73b03a8ebfb3d5548be8e494ceba54fba9583a3c24a505465fd"},
}
for _, r := range repins {
found := false
diff --git a/internal/provision/plans4d_census_test.go b/internal/provision/plans4d_census_test.go
index acb94ee69..41e6b6e31 100644
--- a/internal/provision/plans4d_census_test.go
+++ b/internal/provision/plans4d_census_test.go
@@ -17,7 +17,10 @@ func plans4dWriteCensusInventory() []censusEntry {
entries := append([]censusEntry(nil), plan14SelfServeMoves1WriteCensusInventory()...)
replacements := []censusEntry{
{"internal/console/server.go", "NewServer", "key-site", "lit:instances", "dd9a548e78d5b4d7e2fea07a0201e872b8e5ef1c3f6b3b0191e315f5af5b800c"},
- {"internal/console/plangrace.go", "const#1", "key-site", "lit:sidecars", "77ae90530cb1571fcd224c2aa5a935d7a85dac476775bdb8d0ffe4c2e6afd289"},
+ // PDF service Task 7c (R15), self-review: adds capPDF = "pdf" for
+ // monthly renders. The existing sidecars cap literal is unchanged;
+ // this declaration adds no bucket key or record write.
+ {"internal/console/plangrace.go", "const#1", "key-site", "lit:sidecars", "9327b34efe3a1269f83c5751b66b932ee8bbc9f52e4a39c8a57bb9e227b303d1"},
}
for _, r := range replacements {
found := false
diff --git a/internal/provision/stateless_replicas_census_test.go b/internal/provision/stateless_replicas_census_test.go
index 89b22addb..c3e5b5fa3 100644
--- a/internal/provision/stateless_replicas_census_test.go
+++ b/internal/provision/stateless_replicas_census_test.go
@@ -70,7 +70,10 @@ func statelessReplicasWriteCensusInventory() []censusEntry {
// Domain-registration merge 3f58b539 self-review: also registers the
// check, purchase and purchase-status routes with empty service-role
// sets. Registration writes no record; writes remain in the handlers.
- {"internal/console/authcli.go", "Server.registerCLIRoutes", "key-site", "lit:instances,lit:sidecars", "489e87ce3585313b6f6c2d841dec50781e0b8e8f594ccb3e6d2afa2f0e0f4e19"},
+ // PDF service Task 7c (R15), self-review: adds the Service PDF POST
+ // route and the operator PDF status GET route with an empty role set.
+ // Existing instance/sidecar routes and record-write sites are unchanged.
+ {"internal/console/authcli.go", "Server.registerCLIRoutes", "key-site", "lit:instances,lit:sidecars", "af3823a3d844ef3af37e9bf352c15ebaefa5af5bdc5e8332b1bea846ae86f17e"},
// Fix round 1 self-review: identical pending replays keep sequence and
// revision after lifetime/current-term checks. R11: a successor may retake or supersede
// pending; releasing remains unknown-only across terms. Same typed CAS.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 65cf22662..adc4abd00 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -62,3 +62,4 @@ plan14-root-reads-domain-registration-1.tsv 8e7126042fef8cc99899a29e9e06c22763a2
plan14-root-reads-edge-held-streams.tsv c61b055182bf84e822fab92199432bd2d462c268c03ead17c3cfa18f09bd82cd
plan14-root-reads-edge-protect-hard-block.tsv 3b6cd29b87d2728254936722ab45fdadcfbb8c1f5b74fdfa19d1921b9dfd1dbe
plan14-root-reads-edge-held-first-ping.tsv 3b6cd29b87d2728254936722ab45fdadcfbb8c1f5b74fdfa19d1921b9dfd1dbe
+plan14-root-reads-design-pdf-service.tsv 2fc38b898e5a7672dfb6066d42a09b57dd367620bae7b9c2d126d0b1659cd856
diff --git a/internal/provision/testdata/plan14-root-reads-design-pdf-service.tsv b/internal/provision/testdata/plan14-root-reads-design-pdf-service.tsv
new file mode 100644
index 000000000..48bb4d671
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-design-pdf-service.tsv
@@ -0,0 +1,23 @@
+# Census overlay design-pdf-service, written by census-propose (#369). census-ruling-design-pdf-service, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-design-pdf-service.md.
+# 2 body, 0 sites, 6 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 6 new dispositions: 0 reads re-frozen at their disposition with the claim, 6 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy bbe2f84ca2d68582fcbcb8f8e251fb8799429cc6989d404e6b12af376f050f7c infra/modules/pdf-host/main.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module source defining the PDF engine box, security group and SSM-only role; never read by the CARLOS root binary or a box agent at runtime file:external@0 40594121a61d33e4c8c2058a101a6f01709c9b052d01e5ab62a0f7fc80f05b41
+@legacy 077149cc35ce88d23aedd7c9f8c98a34808e9cc118635ed08969ba0cf0f4f906 infra/modules/pdf-host/outputs.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module outputs for the PDF engine address, instance ID and security group ID; never read by the CARLOS root binary or a box agent at runtime file:external@0 45b004fd2b4134bbbae47a603083227be478ef3c9797c97a04a3417c0277d481
+@legacy 0160d4cbc5f8768ef03cb0252342b68b8bbe1826da2762ead655feb2e8b777b7 infra/modules/pdf-host/pdf-init.sh.tftpl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=cloud-init template run on the PDF engine box at first boot to install the engine and container network fence; never read by the CARLOS root binary or a box agent at runtime file:external@0 4b69151861b721c4264a751cbee92af76f04c39e5ca26af52efe8dacd231b77c
+@legacy 489cc00848f3214dbef9ce1c1bf766e4839ba5718b45ba74e09191f61f22a091 infra/modules/pdf-host/tests/pdf_host.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module mock-provider tests for the PDF engine box, IAM, network fence and configuration; never read by the CARLOS root binary or a box agent at runtime file:external@0 0483ec641c3e0070d2296ab42d5ee01890e2112e71e4ef52cea5b1aaecf7ffc4
+@legacy 327867070942e7b36ea5a5ad3d6cbe9574d85de0773b1f04cdce1ca6835a2c8c infra/modules/pdf-host/variables.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module inputs, defaults and validation for the PDF engine box; never read by the CARLOS root binary or a box agent at runtime file:external@0 e03c4b0333f5117fdbb4185a380542c4899115dc6c95cb9d48e934fde645f83a
+@legacy 828be666aef3fef1ab02f78e02137313f9d4b9e2f08c6d8c4bc136f19cdd0f9f infra/modules/pdf-host/versions.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module tool and AWS provider version requirements; never read by the CARLOS root binary or a box agent at runtime file:external@0 bb3be812da255c0f031b2bfdfee462e4687de3681c742b529b55693a8875136b
+system.go runSystem authority B,C,D,F,G,J4 rev3=census-ruling-self-serve-moves-1;identity=explicit operator CLI uid 0;basis=adds the lifetimes family to the system dispatch (carlos system lifetimes cutover, a console door call as the operator); every existing command branch unchanged;rev3=census-ruling-claims-cleanup-r2;basis=claims cleanup R2: drops the claims case (host.RunSystemClaims, deleted); every other branch unchanged; no read added;rev3=census-ruling-nearest-region-a;basis=adds the hosts-used family to the system dispatch (carlos system hosts-used status, one GET of a console door as the operator); every existing command branch unchanged; no read added;rev3=census-ruling-region-ha-p1a;basis=explicit operator CLI and root units, uid 0: drops the "join" case (host.RunSystemJoin, deleted with internal/host/joinroot.go, its only caller) and its line in the usage text; every other branch unchanged; no read added;rev3=census-ruling-named-unit-delivery-114;basis=the system verb dispatch gains named-units, routed to host.RunSystemNamedUnits; no read of its own;rev3=census-ruling-design-pdf-service;basis=add dispatch for carlos system pdf; no new reads 7f4861660abef9844dbeec756a68d7bb91a655d935b74acd807a85c61453e0f3
+system.go systemVerb authority B,C,D,F,G,J4 rev3=census-ruling-self-serve-moves-1;identity=explicit operator CLI uid 0;basis=adds the lifetimes family to the system dispatch (carlos system lifetimes cutover, a console door call as the operator); every existing command branch unchanged;rev3=census-ruling-claims-cleanup-r2;basis=claims cleanup R2: drops "claims" from the verb list, so it now falls to the unknown-verb message; no read added;rev3=census-ruling-nearest-region-a;basis=adds "hosts-used" to the verb list, routed to runSystemHostsUsedVerb; no read added;rev3=census-ruling-region-ha-p1a;basis=explicit operator CLI and root units, uid 0: drops "join" from the verb list, so `carlos system join` now falls to the unknown-verb message; no read added;rev3=census-ruling-named-unit-delivery-114;basis=the known-verb list gains named-units; no read of its own;rev3=census-ruling-design-pdf-service;basis=add recognition for carlos system pdf; no new reads 6fa13065f4396cfac2f2c56b41aab51354cd0d9007b9d875542eef63a7fdb802
+infra/modules/pdf-host/main.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module source defining the PDF engine box, security group and SSM-only role; never read by the CARLOS root binary or a box agent at runtime file:external@0 40594121a61d33e4c8c2058a101a6f01709c9b052d01e5ab62a0f7fc80f05b41
+infra/modules/pdf-host/outputs.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module outputs for the PDF engine address, instance ID and security group ID; never read by the CARLOS root binary or a box agent at runtime file:external@0 45b004fd2b4134bbbae47a603083227be478ef3c9797c97a04a3417c0277d481
+infra/modules/pdf-host/pdf-init.sh.tftpl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=cloud-init template run on the PDF engine box at first boot to install the engine and container network fence; never read by the CARLOS root binary or a box agent at runtime file:external@0 4b69151861b721c4264a751cbee92af76f04c39e5ca26af52efe8dacd231b77c
+infra/modules/pdf-host/tests/pdf_host.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module mock-provider tests for the PDF engine box, IAM, network fence and configuration; never read by the CARLOS root binary or a box agent at runtime file:external@0 0483ec641c3e0070d2296ab42d5ee01890e2112e71e4ef52cea5b1aaecf7ffc4
+infra/modules/pdf-host/variables.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module inputs, defaults and validation for the PDF engine box; never read by the CARLOS root binary or a box agent at runtime file:external@0 e03c4b0333f5117fdbb4185a380542c4899115dc6c95cb9d48e934fde645f83a
+infra/modules/pdf-host/versions.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-design-pdf-service;basis=OpenTofu module tool and AWS provider version requirements; never read by the CARLOS root binary or a box agent at runtime file:external@0 bb3be812da255c0f031b2bfdfee462e4687de3681c742b529b55693a8875136b
+@coverage . 04e3067e48f3be37f5c996b2ec2032994b3e69a26d86efee4882dfc4d3580b23
+@coverage infra/modules/pdf-host 11230a33e9ca210a8ae58c3ce009dfc3ed5450a0ab326f93c359007173a590d4
+@coverage infra/modules/pdf-host/tests 00d4614af1937063bcb0a79ab1c67a9182781d604be6db1622ba78d1075ab958
+@coverage internal/plans 626020904e3d1e996006b968cb8dba8dfcf80b3022160b7d02060040d830f3ea
+@coverage internal/release a8ada352dd633d1b211e81e4c44fba85d295a44c38f1995696022628083875dc
+@coverage internal/svcrole e910500ba710dd884ca2f4cf9100a8e1a9573952555554514b97375796937beb