carlos / platform Public

Merge origin/main (4029ac56) into design-fleet-public-routes

One conflict, in internal/provision/plan9_b8_census_test.go: the
record-write census now uses fleetPublicRoutesWriteCensusInventory, which
layers on main's newest, analyticsLiveWriteCensusInventory (it layered on
rootfsFleetFollowupsWriteCensusInventory before). The chain merged cleanly:
this branch had not added its line yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 0ee2ac4badedd4f58296ebdba2f7975efe951392 parent 12eeeceparent 4029ac5
107 files changed, +8,538 −180
  • approved_copy_zdd_test.go +3 −2
  • approved_rootfs_copy_test.go +5 −0
  • docs/superpowers/notes/census-proposal-analytics-agents.md +11 −0
  • docs/superpowers/notes/census-proposal-managed-fleets-1c-451.md +27 −0
  • docs/superpowers/notes/census-proposal-region-ha-dead-holder-backoff.md +21 −0
  • docs/superpowers/notes/census-proposal-region-ha-p1b2.md +39 −0
  • docs/superpowers/notes/census-proposal-rootfs-worker-exit.md +26 −0
  • docs/superpowers/notes/census-region-ha-dead-holder-backoff-claims.md +4 −0
  • docs/superpowers/plans/2026-10-07-zero-downtime-deploys-6-copy.json +1 −0
  • docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md +4 −3
  • docs/superpowers/plans/2026-10-29-region-ha-p1b2-forwarding.md +192 −0
  • docs/superpowers/plans/2026-10-30-managed-fleets-1c-reboot-lease.md +221 −0
  • docs/superpowers/plans/CODEX-FINDINGS-MANAGED-FLEETS-1C-R1.md +26 −0
  • docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-BRIEF-1.md +41 −0
  • docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-BRIEF-2.md +50 −0
  • docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-BRIEF-3.md +53 −0
  • docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-R1.md +47 −0
  • docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-R2.md +70 −0
  • docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-R3.md +64 −0
  • docs/superpowers/plans/CODEX-REVIEW-BRIEF-MANAGED-FLEETS-1C.md +39 −0
  • docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B2-BRANCH-1.md +30 −0
  • docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1-RECHECK.md +9 −0
  • docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1.md +23 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-analytics-agents-R1.md +24 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-analytics-live-R1.md +29 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-rootfs-worker-exit-R1.md +32 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-analytics-agents.md +38 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-analytics-live.md +39 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-billing-usage.md +29 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-worker-exit.md +28 −0
  • docs/superpowers/specs/2026-10-28-managed-fleets-design.md +406 −0
  • docs/superpowers/specs/CODEX-BUILDER-CHECK-MANAGED-FLEETS.md +11 −0
  • instances_cli.go +4 −1
  • instances_rollout_test.go +5 −0
  • internal/activator/activator.go +17 −5
  • internal/activator/backend_exec.go +4 −0
  • internal/activator/control.go +60 −2
  • internal/activator/control_test.go +29 −0
  • internal/activator/hacache.go +296 −0
  • internal/activator/haforward.go +224 −0
  • internal/activator/haforward_test.go +511 −0
  • internal/activator/hasuspect_test.go +481 −0
  • internal/activator/rootfsworkers.go +13 −4
  • internal/activator/rootfsworkers_backend_test.go +223 −1
  • internal/activator/rootfsworkers_test.go +85 −4
  • internal/activator/unitproc.go +101 −0
  • internal/analytics/agents.go +91 −0
  • internal/analytics/agents_test.go +200 −0
  • internal/analytics/bots.go +8 −0
  • internal/analytics/day.go +19 −0
  • internal/analytics/meter.go +32 −8
  • internal/analytics/pace.go +83 −0
  • internal/analytics/read.go +15 −0
  • internal/console/analyticsdisplay.go +170 −3
  • internal/console/analyticsdisplay_test.go +11 −3
  • internal/console/analyticslive.go +218 −0
  • internal/console/analyticslive_test.go +258 −0
  • internal/console/analyticspages_test.go +157 −0
  • internal/console/analyticsview.go +134 −32
  • internal/console/apianalytics.go +4 −0
  • internal/console/apianalytics_test.go +1 −1
  • internal/console/billingpage.go +29 −9
  • internal/console/billingpage_copy.go +14 −0
  • internal/console/billingpage_test.go +8 −1
  • internal/console/billingsync_test.go +8 −1
  • internal/console/billingusage.go +197 −0
  • internal/console/billingusage_test.go +338 −0
  • internal/console/claim_invariant_fixtures_test.go +1 −0
  • internal/console/claim_invariant_probes_read_test.go +1 −0
  • internal/console/perfwalk_test.go +6 −0
  • internal/console/server.go +7 −1
  • internal/console/templates/app_analytics.html +184 −43
  • internal/console/templates/app_overview.html +2 −13
  • internal/console/templates/billing.html +21 −7
  • internal/console/templates/layout.html +55 −6
  • internal/console/testdata/claim-routes.txt +1 −0
  • internal/console/testdata/perf-budgets.txt +1 −0
  • internal/edge/assetcatch.go +3 −0
  • internal/edge/backhaul_e2e_test.go +6 −3
  • internal/edge/cookiescope.go +9 −2
  • internal/edge/edge.go +44 −3
  • internal/edge/forwardha.go +353 −0
  • internal/edge/forwardha_export_test.go +76 −0
  • internal/edge/forwardha_test.go +1,306 −0
  • internal/edge/forwardha_wiring_test.go +106 −0
  • internal/edge/holderview.go +59 −0
  • internal/edge/holderview_test.go +135 −0
  • internal/edge/homemap.go +12 −0
  • internal/edge/regional.go +2 −1
  • internal/hafresh/owner.go +37 −9
  • internal/hafresh/owner_boot_test.go +75 −0
  • internal/host/haforward_wiring_test.go +61 −0
  • internal/host/haself.go +17 −1
  • internal/host/haself_test.go +49 −0
  • internal/lease/legacytake.go +9 −1
  • internal/lease/previousboot_test.go +84 −0
  • internal/provision/analytics_live_census_test.go +31 −0
  • internal/provision/fleet_public_routes_census_test.go +4 −3
  • internal/provision/testdata/plan14-root-reads-analytics-agents.tsv +3 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +5 −0
  • internal/provision/testdata/plan14-root-reads-managed-fleets-1c-451.tsv +15 −0
  • internal/provision/testdata/plan14-root-reads-region-ha-dead-holder-backoff.tsv +8 −0
  • internal/provision/testdata/plan14-root-reads-region-ha-p1b2.tsv +31 −0
  • internal/provision/testdata/plan14-root-reads-rootfs-worker-exit.tsv +14 −0
  • internal/rolloutwords/words.go +9 −4
  • internal/rolloutwords/words_test.go +3 −1
  • plan3_groups_test.go +3 −2

Intent

Human

<task-notification> <task-id>a3f3a457c7aeb8eae</task-id> <tool-use-id>toolu_0161VY6vTQTj1EVdRhxwHozp</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/a3f3a457c7aeb8eae.output</output-file> <status>completed</status> <summary>Agent "Implement Task 13: e2e witness" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE_WITH_CONCERNS. The witness passes, but it departs from the brief in four places. No defect turned up in Tasks 0-12. Commit: 12eeecee (base 409d43d6), one new file: `fleet_public_routes_e2e_test.go`. No production file changed and nothing new is exported. Tests: `TestFleetAppServesThroughTheHub` passes all seven steps in about 6.7 s, and passed 3 runs in a row. It fails as expected under three mutations: - `hubEnv` without `CARLOS_TUNNEL_HOST`: the step 1 handshake is refused. - `GetCertificate` admitting every name: step 6's handshake succeeds and the test fails. - The owner check in `decideForward` disabled: the foreign record gets a row and step 7 fails. gofmt, vet, the native build and the darwin, windows and arm64 cross-builds are clean. The census card is identical with and without the file. Concerns, all departures from the brief: 1. **Instance served by address, not socket.** The socket directory is the fixed path `/run/carlos`, which an unprivileged test can't bind. So the instance is created with `--addr` on loopback. A small test-only server is built inside the test, shipped through the console, staged by `release.Pass`, and started from the staged path with its socket on fd 3. 2. **Operator bit.** The console only lets an operator set `--addr`, so the member is granted the operator bit with `cst.SetOperator`, the same store call `console operator grant` makes. That makes the member an operator in every other console check too. The hub's owner rule doesn't depend on it. 3. **Names and the box's connection.** - The apps domain is `apps.example.com`, so the instance is `shop.bac.apps.example.com`. The console refuses a catch-all whose parent sits under the apps domain, and the parent is `shops.example.com`. - The sqids are the real ones the console returned: `bac` for the owner, `bad` for the foreign account. - The box's tunnel and store door dial a second, plain HTTP listener on the same hub edge, because the tunnel client checks the certificate against the system roots. All public requests go through the TLS listener. 4. **The rate limit is a path rule.** "5 per window" is `-path /limited:rate=1,burst=5`, so step 2's requests on `/up` don't use it up. A 429 from the hub is proven by the app's own request count and by the two edges' usage meters. One observation, not a defect: on a fleet box, the alias pass logs a 404 for `status/boxes/` through the store door. So that pass always runs without knowing the deployment's routes. This is existing behaviour, and step 4 still serves. The full report is at `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-public-routes/.superpowers/sdd/2026-10-30-fleet-public-routes/task-13-report.md`.</result> <usage><subagent_tokens>295839</subagent_tokens><tool_uses>122</tool_uses><duration_ms>1159683</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>a1462565c3c19d5f9</task-id> <tool-use-id>toolu_01N7TwhyY7a5TKaZ2g6e3Qsk</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/a1462565c3c19d5f9.output</output-file> <status>completed</status> <summary>Agent "Review Task 13: e2e witness" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Spec compliance: ✅. Task quality: Approved. I ran the test once at 12eeecee and it passed (7.82 s). No Critical or Important findings. - Minor: `fleet_public_routes_e2e_test.go:733-739`. Step 6 shows the trashed name is refused only by a failed TLS handshake. Production does not refuse there when the name already has a certificate: the wildcard cert, the cert mirror and autocert's cache all answer without calling `Allowed`. The real refusal happens at HTTP, because the name has no map entry. This matters for the live dev roll: Task 15 must check a retired name by its HTTP answer, not by a handshake failure. Optionally, the test could also send a request for the trashed host through the plain listener and assert the unknown-host answer. - Minor: `:730-739`. Step 6 never checks that the catch-all alias `shop.shops.example.com` from step 4 is refused after trash. One `hub.Allowed` assertion would cover it. - Minor: `:641-663`. Step 4 rebuilds the production alias pass's inputs by hand (it omits `Region`; the rest matches today). If the production wiring changes later, this test will not notice. This follows preflight ruling 1.17, which allows no test-only export. - Minor: `:623`. Step 3 has no upper bound on the requests let through before the 429; up to 11 would pass. Adding `oks &lt;= 6` would catch a hub that applies the wrong bucket. - Minor: test output is not clean. Every run logs a 401 on the box's first dial (it dials before the hub reloads the new token) and a `status/boxes/` 404 from the box's alias pass. Both are explained and harmless. Moving the first dial after the first hub pass would remove the 401. - Minor: `:599-602`. Nothing pins which edge drew the login form. Asserting the hub's forward row has an empty `Gate` would tie it to the fleet edge. Unit test 12 already covers this. - For the final review: the hub's edges-file exclusion was moved to Task 6's tests (preflight 1.17); confirm they cover a foreign account's record. Separately, a fleet box's alias pass always runs with the deployment route set unknown, because the store door has no `status/boxes/`. That predates this branch. Each point you asked me to focus on holds up: - **Forward row:** the hub's real `BoxProvisionConfig` pass mints and retires it, and the test checks the row is still there before the pass that retires it. - **Reload:** the test calls it directly, and in production the registry watcher picks up the same changes within 2 s. - **TLS admission:** every assertion uses a fresh handshake through `hub.Allowed`, and production's admission check reduces to `Allowed` here. - **Foreign account:** `bad` is a real console account, and the refusal log line is asserted before the absence checks. - **Departures:** none of the four hides a hub defect for the dev roll. - **Mutations:** all three are real. I could not re-run them because edits were off-limits, but each failure message matches its assertion and each mutation breaks the production line it targets. The full review is in `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-public-routes/.superpowers/sdd/2026-10-30-fleet-public-routes/task-13-review.md`.</result> <usage><subagent_tokens>131262</subagent_tokens><tool_uses>35</tool_uses><duration_ms>365531</duration_ms></usage> </task-notification>

approved_copy_zdd_test.go

Loading diff…

approved_rootfs_copy_test.go

Loading diff…

docs/superpowers/notes/census-proposal-analytics-agents.md

Loading diff…

docs/superpowers/notes/census-proposal-managed-fleets-1c-451.md

Loading diff…

docs/superpowers/notes/census-proposal-region-ha-dead-holder-backoff.md

Loading diff…

docs/superpowers/notes/census-proposal-region-ha-p1b2.md

Loading diff…

docs/superpowers/notes/census-proposal-rootfs-worker-exit.md

Loading diff…

docs/superpowers/notes/census-region-ha-dead-holder-backoff-claims.md

Loading diff…

docs/superpowers/plans/2026-10-07-zero-downtime-deploys-6-copy.json

Loading diff…

docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md

Loading diff…

docs/superpowers/plans/2026-10-29-region-ha-p1b2-forwarding.md

Loading diff…

docs/superpowers/plans/2026-10-30-managed-fleets-1c-reboot-lease.md

Loading diff…

docs/superpowers/plans/CODEX-FINDINGS-MANAGED-FLEETS-1C-R1.md

Loading diff…

docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-BRIEF-1.md

Loading diff…

docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-BRIEF-2.md

Loading diff…

docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-BRIEF-3.md

Loading diff…

docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-R1.md

Loading diff…

docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-R2.md

Loading diff…

docs/superpowers/plans/CODEX-PLAN-REGION-HA-P1B2-R3.md

Loading diff…

docs/superpowers/plans/CODEX-REVIEW-BRIEF-MANAGED-FLEETS-1C.md

Loading diff…

docs/superpowers/plans/CODEX-REVIEW-BRIEF-REGION-HA-P1B2-BRANCH-1.md

Loading diff…

docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1-RECHECK.md

Loading diff…

docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-analytics-agents-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-analytics-live-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-FINDINGS-rootfs-worker-exit-R1.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-analytics-agents.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-analytics-live.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-billing-usage.md

Loading diff…

docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-worker-exit.md

Loading diff…

docs/superpowers/specs/2026-10-28-managed-fleets-design.md

Loading diff…

docs/superpowers/specs/CODEX-BUILDER-CHECK-MANAGED-FLEETS.md

Loading diff…

instances_cli.go

Loading diff…

instances_rollout_test.go

Loading diff…

internal/activator/activator.go

Loading diff…

internal/activator/backend_exec.go

Loading diff…

internal/activator/control.go

Loading diff…

internal/activator/control_test.go

Loading diff…

internal/activator/hacache.go

Loading diff…

internal/activator/haforward.go

Loading diff…

internal/activator/haforward_test.go

Loading diff…

internal/activator/hasuspect_test.go

Loading diff…

internal/activator/rootfsworkers.go

Loading diff…

internal/activator/rootfsworkers_backend_test.go

Loading diff…

internal/activator/rootfsworkers_test.go

Loading diff…

internal/activator/unitproc.go

Loading diff…

internal/analytics/agents.go

Loading diff…

internal/analytics/agents_test.go

Loading diff…

internal/analytics/bots.go

Loading diff…

internal/analytics/day.go

Loading diff…

internal/analytics/meter.go

Loading diff…

internal/analytics/pace.go

Loading diff…

internal/analytics/read.go

Loading diff…

internal/console/analyticsdisplay.go

Loading diff…

internal/console/analyticsdisplay_test.go

Loading diff…

internal/console/analyticslive.go

Loading diff…

internal/console/analyticslive_test.go

Loading diff…

internal/console/analyticspages_test.go

Loading diff…

internal/console/analyticsview.go

Loading diff…

internal/console/apianalytics.go

Loading diff…

internal/console/apianalytics_test.go

Loading diff…

internal/console/billingpage.go

Loading diff…

internal/console/billingpage_copy.go

Loading diff…

internal/console/billingpage_test.go

Loading diff…

internal/console/billingsync_test.go

Loading diff…

internal/console/billingusage.go

Loading diff…

internal/console/billingusage_test.go

Loading diff…

internal/console/claim_invariant_fixtures_test.go

Loading diff…

internal/console/claim_invariant_probes_read_test.go

Loading diff…

internal/console/perfwalk_test.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/templates/app_analytics.html

Loading diff…

internal/console/templates/app_overview.html

Loading diff…

internal/console/templates/billing.html

Loading diff…

internal/console/templates/layout.html

Loading diff…

internal/console/testdata/claim-routes.txt

Loading diff…

internal/console/testdata/perf-budgets.txt

Loading diff…

internal/edge/assetcatch.go

Loading diff…

internal/edge/backhaul_e2e_test.go

Loading diff…

internal/edge/cookiescope.go

Loading diff…

internal/edge/edge.go

Loading diff…

internal/edge/forwardha.go

Loading diff…

internal/edge/forwardha_export_test.go

Loading diff…

internal/edge/forwardha_test.go

Loading diff…

internal/edge/forwardha_wiring_test.go

Loading diff…

internal/edge/holderview.go

Loading diff…

internal/edge/holderview_test.go

Loading diff…

internal/edge/homemap.go

Loading diff…

internal/edge/regional.go

Loading diff…

internal/hafresh/owner.go

Loading diff…

internal/hafresh/owner_boot_test.go

Loading diff…

internal/host/haforward_wiring_test.go

Loading diff…

internal/host/haself.go

Loading diff…

internal/host/haself_test.go

Loading diff…

internal/lease/legacytake.go

Loading diff…

internal/lease/previousboot_test.go

Loading diff…

internal/provision/analytics_live_census_test.go

Loading diff…

internal/provision/fleet_public_routes_census_test.go

Loading diff…

internal/provision/testdata/plan14-root-reads-analytics-agents.tsv

Loading diff…

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

Loading diff…

internal/provision/testdata/plan14-root-reads-managed-fleets-1c-451.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-region-ha-dead-holder-backoff.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-region-ha-p1b2.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-rootfs-worker-exit.tsv

Loading diff…

internal/rolloutwords/words.go

Loading diff…

internal/rolloutwords/words_test.go

Loading diff…

plan3_groups_test.go

Loading diff…