carlos / platform Public

Merge origin/main into sec-h3-m2-scoped-key

Census: our chain line after main's, re-proposed (seal now b170d586);
the record-write inventory layers on instanceUsageWriteCensusInventory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 5f87a5614f6fb89fc913e55edcbbc66449eec5a6 parent 0fca9e6parent 43dce35
158 files changed, +11,706 −615
  • apimode.go +1 −20
  • apimode_limit.go +52 −0
  • approved_usage_copy_test.go +149 −0
  • cmd/console/instanceusage_test.go +89 −0
  • cmd/console/main.go +29 −6
  • commands.go +1 −0
  • commands_test.go +2 −0
  • docs/parity.md +11 −2
  • docs/site/cli.md +26 −0
  • docs/superpowers/notes/census-proposal-catchall-stamp-now.md +29 −0
  • docs/superpowers/notes/census-proposal-gvisor-followups.md +29 −0
  • docs/superpowers/notes/census-proposal-instance-usage.md +47 −0
  • docs/superpowers/notes/census-proposal-sec-h3-m2-scoped-key.md +1 −1
  • docs/superpowers/notes/instance-usage-copy.md +112 −0
  • docs/superpowers/plans/2026-11-29-instance-usage.md +721 −0
  • docs/superpowers/plans/CODEX-FINDINGS-instance-usage-plan-R1.md +24 −0
  • docs/superpowers/plans/CODEX-FINDINGS-instance-usage-plan-R2.md +33 −0
  • docs/superpowers/plans/CODEX-FINDINGS-instance-usage-plan-R3.md +18 −0
  • docs/superpowers/plans/CODEX-REVIEW-BRIEF-instance-usage-plan-R2.md +93 −0
  • docs/superpowers/plans/CODEX-REVIEW-BRIEF-instance-usage-plan-R3.md +102 −0
  • docs/superpowers/plans/CODEX-REVIEW-BRIEF-instance-usage-plan.md +80 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-branch-R1.md +7 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-census-R1.md +49 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R1.md +59 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R2.md +93 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R3.md +49 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task2-R1.md +11 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task3-R1.md +17 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task5-R1.md +17 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task6-R1.md +27 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-branch.md +77 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-census.md +41 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R2.md +36 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R3.md +38 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec.md +32 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-task2.md +59 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-task3.md +67 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-task5.md +66 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-task6.md +75 −0
  • docs/superpowers/runbooks/gvisor-demos.md +52 −10
  • docs/superpowers/specs/2026-11-29-instance-usage-design.md +726 −0
  • internal/activator/backend_exec.go +13 −8
  • internal/activator/exectee.go +102 −0
  • internal/activator/exectee_test.go +222 −0
  • internal/activator/loglistener_bounds_test.go +10 −0
  • internal/activator/loglistener_cap_test.go +10 −0
  • internal/activator/rootfsworkers_test.go +4 −0
  • internal/activator/workerswap_test.go +9 −0
  • internal/console/apilinks_test.go +6 −0
  • internal/console/apipdf_test.go +27 −3
  • internal/console/apiservices.go +21 −0
  • internal/console/apiusage.go +377 −0
  • internal/console/apiusage_e2e_test.go +100 −0
  • internal/console/apiusage_test.go +684 −0
  • internal/console/claim_workers.go +6 −0
  • internal/console/domainstate.go +9 −2
  • internal/console/domainstate_test.go +11 −9
  • internal/console/economics_instances_compat_test.go +64 −0
  • internal/console/hostnorm.go +43 −0
  • internal/console/jobs.go +19 −0
  • internal/console/jobs_test.go +23 −7
  • internal/console/linkedpolicy.go +3 −0
  • internal/console/links_auth_test.go +2 −1
  • internal/console/platform_credentials_test.go +20 −0
  • internal/console/routedecls.go +12 −1
  • internal/console/routedecls_test.go +2 −1
  • internal/console/server.go +6 −35
  • internal/console/svcpage.go +29 −2
  • internal/console/svcprincipal.go +64 −0
  • internal/console/svcroutes_test.go +133 −16
  • internal/console/usagedays.go +9 −2
  • internal/console/usagefrom.go +255 −0
  • internal/console/usagefrom_test.go +558 −0
  • internal/console/usagerole_test.go +288 −0
  • internal/demobuild/gvisor.go +3 −2
  • internal/demobuild/gvisor_test.go +27 −0
  • internal/domains/aliases.go +22 −2
  • internal/domains/instancecatchall_test.go +35 −0
  • internal/domains/reconcile.go +96 −0
  • internal/domains/stamphosts_test.go +113 −0
  • internal/edge/asset_far_test.go +67 −0
  • internal/edge/assetcatch.go +11 −1
  • internal/edge/demo_traffic.go +1 −1
  • internal/edge/edge.go +1 −1
  • internal/edge/replicaconsole_socket_test.go +6 −0
  • internal/edge/usagemeter.go +64 −8
  • internal/edge/usagemeter_instances_test.go +373 −0
  • internal/edge/usagemeter_test.go +9 −9
  • internal/execsandbox/hardening.go +122 −9
  • internal/execsandbox/hardening_test.go +53 −0
  • internal/host/agent.go +8 −64
  • internal/host/applessroute_test.go +1 −1
  • internal/host/canary_count.go +70 −0
  • internal/host/edgesfile.go +5 −0
  • internal/host/edgesschedule.go +13 −1
  • internal/host/group_names_test.go +14 −3
  • internal/host/gvisor_containment_rootrunner_linux_test.go +174 −16
  • internal/host/gvisor_seccomp_rootrunner_linux_test.go +408 −0
  • internal/host/gvisor_units_test.go +2 −0
  • internal/host/instance_usage.go +262 −0
  • internal/host/instance_usage_e2e_test.go +215 −0
  • internal/host/instance_usage_test.go +893 −0
  • internal/host/rollout.go +4 −2
  • internal/host/stampwatch.go +263 −0
  • internal/host/stampwatch_test.go +176 −0
  • internal/host/systemapply_test.go +8 −2
  • internal/host/testdata/gvisor-systemd257/README.md +10 −5
  • internal/host/testdata/gvisor-systemd257/build-active.all.show +42 −42
  • internal/host/testdata/gvisor-systemd257/build-active.cat +12 −10
  • internal/host/testdata/gvisor-systemd257/build-active.show +42 −41
  • internal/host/testdata/gvisor-systemd257/build-before.all.show +19 −19
  • internal/host/testdata/gvisor-systemd257/build-before.cat +12 −10
  • internal/host/testdata/gvisor-systemd257/build-before.show +19 −18
  • internal/host/testdata/gvisor-systemd257/capture.json +38 −38
  • internal/host/testdata/gvisor-systemd257/probe-active.all.show +32 −32
  • internal/host/testdata/gvisor-systemd257/probe-active.cat +2 −0
  • internal/host/testdata/gvisor-systemd257/probe-active.show +32 −31
  • internal/host/testdata/gvisor-systemd257/probe-before.all.show +6 −6
  • internal/host/testdata/gvisor-systemd257/probe-before.cat +2 −0
  • internal/host/testdata/gvisor-systemd257/probe-before.show +6 −5
  • internal/host/testdata/gvisor-systemd257/run-active.all.show +31 −31
  • internal/host/testdata/gvisor-systemd257/run-active.cat +2 −0
  • internal/host/testdata/gvisor-systemd257/run-active.show +31 −30
  • internal/host/testdata/gvisor-systemd257/run-before.all.show +5 −5
  • internal/host/testdata/gvisor-systemd257/run-before.cat +2 −0
  • internal/host/testdata/gvisor-systemd257/run-before.show +4 −3
  • internal/host/testdata/usage-edge-golden.json +1 −0
  • internal/host/units/carlos-demo-build-gvisor@.service +2 −0
  • internal/host/units/carlos-instance-gvisor-probe.service +2 −0
  • internal/host/units/carlos-instance-gvisor@.service +2 −0
  • internal/host/usage_compat_test.go +100 −0
  • internal/host/usage_loop.go +24 −4
  • internal/host/usage_loop_test.go +7 −7
  • internal/instancectl/gvisorunit.go +3 −2
  • internal/instancectl/gvisorunit_seccomp_test.go +57 −0
  • internal/provision/instance_usage_census_test.go +56 −0
  • internal/provision/sec_h3_m2_scoped_key_census_test.go +2 −2
  • internal/provision/testdata/plan14-root-reads-catchall-stamp-now.tsv +17 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +4 −1
  • internal/provision/testdata/plan14-root-reads-gvisor-followups.tsv +18 −0
  • internal/provision/testdata/plan14-root-reads-instance-usage.tsv +39 −0
  • internal/provision/testdata/plan14-root-reads-sec-h3-m2-scoped-key.tsv +1 −1
  • internal/status/instanceusage_test.go +30 −0
  • internal/status/snapshot.go +12 −0
  • internal/svcrole/svcrole.go +23 −8
  • internal/svcrole/svcrole_test.go +58 −3
  • internal/usage/edge.go +5 −0
  • internal/usage/instances.go +145 −0
  • internal/usage/instances_test.go +165 −0
  • internal/usage/testdata/instance-usage-e2e.golden.json +36 −0
  • parity/cli.tsv +1 −0
  • parity/packages.tsv +1 −0
  • parity/parity.tsv +1 −0
  • services.go +12 −5
  • services_roles_help_test.go +47 −0
  • testdata/clireg-golden.jsonl +10 −8
  • usage_cmd.go +261 −0
  • usage_cmd_test.go +308 −0
apimode.go

Loading diff…

apimode_limit.go

Loading diff…

approved_usage_copy_test.go

Loading diff…

cmd/console/instanceusage_test.go

Loading diff…

cmd/console/main.go

Loading diff…

commands.go

Loading diff…

commands_test.go

Loading diff…

docs/parity.md

Loading diff…

docs/site/cli.md

Loading diff…

docs/superpowers/notes/census-proposal-catchall-stamp-now.md

Loading diff…

docs/superpowers/notes/census-proposal-gvisor-followups.md

Loading diff…

docs/superpowers/notes/census-proposal-instance-usage.md

Loading diff…

docs/superpowers/notes/census-proposal-sec-h3-m2-scoped-key.md

Loading diff…

docs/superpowers/notes/instance-usage-copy.md

Loading diff…

docs/superpowers/plans/2026-11-29-instance-usage.md

Loading diff…

docs/superpowers/plans/CODEX-FINDINGS-instance-usage-plan-R1.md

Loading diff…

docs/superpowers/plans/CODEX-FINDINGS-instance-usage-plan-R2.md

Loading diff…

docs/superpowers/plans/CODEX-FINDINGS-instance-usage-plan-R3.md

Loading diff…

docs/superpowers/plans/CODEX-REVIEW-BRIEF-instance-usage-plan-R2.md

Loading diff…

docs/superpowers/plans/CODEX-REVIEW-BRIEF-instance-usage-plan-R3.md

Loading diff…

docs/superpowers/plans/CODEX-REVIEW-BRIEF-instance-usage-plan.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-branch-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-census-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R2.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R3.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task2-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task3-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task5-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task6-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-branch.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-census.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R2.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R3.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-task2.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-task3.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-task5.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-task6.md

Loading diff…

docs/superpowers/runbooks/gvisor-demos.md

Loading diff…

docs/superpowers/specs/2026-11-29-instance-usage-design.md

Loading diff…

internal/activator/backend_exec.go

Loading diff…

internal/activator/exectee.go

Loading diff…

internal/activator/exectee_test.go

Loading diff…

internal/activator/loglistener_bounds_test.go

Loading diff…

internal/activator/loglistener_cap_test.go

Loading diff…

internal/activator/rootfsworkers_test.go

Loading diff…

internal/activator/workerswap_test.go

Loading diff…

internal/console/apilinks_test.go

Loading diff…

internal/console/apipdf_test.go

Loading diff…

internal/console/apiservices.go

Loading diff…

internal/console/apiusage.go

Loading diff…

internal/console/apiusage_e2e_test.go

Loading diff…

internal/console/apiusage_test.go

Loading diff…

internal/console/claim_workers.go

Loading diff…

internal/console/domainstate.go

Loading diff…

internal/console/domainstate_test.go

Loading diff…

internal/console/economics_instances_compat_test.go

Loading diff…

internal/console/hostnorm.go

Loading diff…

internal/console/jobs.go

Loading diff…

internal/console/jobs_test.go

Loading diff…

internal/console/linkedpolicy.go

Loading diff…

internal/console/links_auth_test.go

Loading diff…

internal/console/platform_credentials_test.go

Loading diff…

internal/console/routedecls.go

Loading diff…

internal/console/routedecls_test.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/svcpage.go

Loading diff…

internal/console/svcprincipal.go

Loading diff…

internal/console/svcroutes_test.go

Loading diff…

internal/console/usagedays.go

Loading diff…

internal/console/usagefrom.go

Loading diff…

internal/console/usagefrom_test.go

Loading diff…

internal/console/usagerole_test.go

Loading diff…

internal/demobuild/gvisor.go

Loading diff…

internal/demobuild/gvisor_test.go

Loading diff…

internal/domains/aliases.go

Loading diff…

internal/domains/instancecatchall_test.go

Loading diff…

internal/domains/reconcile.go

Loading diff…

internal/domains/stamphosts_test.go

Loading diff…

internal/edge/asset_far_test.go

Loading diff…

internal/edge/assetcatch.go

Loading diff…

internal/edge/demo_traffic.go

Loading diff…

internal/edge/edge.go

Loading diff…

internal/edge/replicaconsole_socket_test.go

Loading diff…

internal/edge/usagemeter.go

Loading diff…

internal/edge/usagemeter_instances_test.go

Loading diff…

internal/edge/usagemeter_test.go

Loading diff…

internal/execsandbox/hardening.go

Loading diff…

internal/execsandbox/hardening_test.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/applessroute_test.go

Loading diff…

internal/host/canary_count.go

Loading diff…

internal/host/edgesfile.go

Loading diff…

internal/host/edgesschedule.go

Loading diff…

internal/host/group_names_test.go

Loading diff…

internal/host/gvisor_containment_rootrunner_linux_test.go

Loading diff…

internal/host/gvisor_seccomp_rootrunner_linux_test.go

Loading diff…

internal/host/gvisor_units_test.go

Loading diff…

internal/host/instance_usage.go

Loading diff…

internal/host/instance_usage_e2e_test.go

Loading diff…

internal/host/instance_usage_test.go

Loading diff…

internal/host/rollout.go

Loading diff…

internal/host/stampwatch.go

Loading diff…

internal/host/stampwatch_test.go

Loading diff…

internal/host/systemapply_test.go

Loading diff…

internal/host/testdata/gvisor-systemd257/README.md

Loading diff…

internal/host/testdata/gvisor-systemd257/build-active.all.show

Loading diff…

internal/host/testdata/gvisor-systemd257/build-active.cat

Loading diff…

internal/host/testdata/gvisor-systemd257/build-active.show

Loading diff…

internal/host/testdata/gvisor-systemd257/build-before.all.show

Loading diff…

internal/host/testdata/gvisor-systemd257/build-before.cat

Loading diff…

internal/host/testdata/gvisor-systemd257/build-before.show

Loading diff…

internal/host/testdata/gvisor-systemd257/capture.json

Loading diff…

internal/host/testdata/gvisor-systemd257/probe-active.all.show

Loading diff…

internal/host/testdata/gvisor-systemd257/probe-active.cat

Loading diff…

internal/host/testdata/gvisor-systemd257/probe-active.show

Loading diff…

internal/host/testdata/gvisor-systemd257/probe-before.all.show

Loading diff…

internal/host/testdata/gvisor-systemd257/probe-before.cat

Loading diff…

internal/host/testdata/gvisor-systemd257/probe-before.show

Loading diff…

internal/host/testdata/gvisor-systemd257/run-active.all.show

Loading diff…

internal/host/testdata/gvisor-systemd257/run-active.cat

Loading diff…

internal/host/testdata/gvisor-systemd257/run-active.show

Loading diff…

internal/host/testdata/gvisor-systemd257/run-before.all.show

Loading diff…

internal/host/testdata/gvisor-systemd257/run-before.cat

Loading diff…

internal/host/testdata/gvisor-systemd257/run-before.show

Loading diff…

internal/host/testdata/usage-edge-golden.json

Loading diff…

internal/host/units/carlos-demo-build-gvisor@.service

Loading diff…

internal/host/units/carlos-instance-gvisor-probe.service

Loading diff…

internal/host/units/carlos-instance-gvisor@.service

Loading diff…

internal/host/usage_compat_test.go

Loading diff…

internal/host/usage_loop.go

Loading diff…

internal/host/usage_loop_test.go

Loading diff…

internal/instancectl/gvisorunit.go

Loading diff…

internal/instancectl/gvisorunit_seccomp_test.go

Loading diff…

internal/provision/instance_usage_census_test.go

Loading diff…

internal/provision/sec_h3_m2_scoped_key_census_test.go

Loading diff…

internal/provision/testdata/plan14-root-reads-catchall-stamp-now.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-chain.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-gvisor-followups.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-instance-usage.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-sec-h3-m2-scoped-key.tsv

Loading diff…

internal/status/instanceusage_test.go

Loading diff…

internal/status/snapshot.go

Loading diff…

internal/svcrole/svcrole.go

Loading diff…

internal/svcrole/svcrole_test.go

Loading diff…

internal/usage/edge.go

Loading diff…

internal/usage/instances.go

Loading diff…

internal/usage/instances_test.go

Loading diff…

internal/usage/testdata/instance-usage-e2e.golden.json

Loading diff…

parity/cli.tsv

Loading diff…

parity/packages.tsv

Loading diff…

parity/parity.tsv

Loading diff…

services.go

Loading diff…

services_roles_help_test.go

Loading diff…

testdata/clireg-golden.jsonl

Loading diff…

usage_cmd.go

Loading diff…

usage_cmd_test.go

Loading diff…