carlos / platform Public

Merge origin/main into console-as-an-app (40 commits, domains fold + bake ratchet)

One conflict, in internal/host/agent.go, and both sides were wanted.

main (ec3767c, c567b1d) made the domains work fleet-aware: the edge set is
folded per pass from every live box's published edges file rather than read
once from PLATFORM_EDGE_IPS at boot, and ReconcileAliases now takes a
DeploymentRoutes set so a claim cannot capture a hostname another box already
serves as a route. Both call sites in the fast-converge full pass and
instancesLoop grew an edgesfile fold.

This branch had rewritten the same function's tail: fastDeps is built in two
phases (empty struct first, so observeRestart can wrap the restart dispatch
around a `d` that exists), which turned main's single fastDeps{...} struct
literal into a run of field assignments. That is the whole of the conflict —
the two changes are textually adjacent and semantically independent.

Resolved by keeping this branch's two-phase construction and lifting main's
per-pass fold into it: d.fullPass now folds edgesfile.DeploymentRoutes and
hands it to ReconcileAliases, with main's comment on why it is uncached. The
domainsLoop and instancesLoop halves of main's change auto-merged untouched.

All five pieces of the restart-recovery work verified intact after the merge:
makeStartRoute's two refusals (no Unit, and the structural Hibernate guard),
systemctlStartUnit's start-not-try-restart, observeRestart never suppressing
a restart, the restartHold backoff with fullPass deliberately ungated, and
fastPassOpts' fourth parameter. internal/release/adopt.go carries both sides
too: our rolledBack gating and startUnit call, and main's bake ratchet and
pipeline-evidence changes (bake.go is byte-identical to main).

Gate: go vet clean, gofmt -l . clean, 34 ok. The three failing packages
(root, internal/edge, internal/activator) fail identically on clean
origin/main in a throwaway worktree — issue #326's walkConfig cwd-climb plus
a unix-socket sun_path length limit that trips the long-named activator
tests. All five cross-compile targets build.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 5ee4d51d428c5485db36b06107a96d7f33590bc1 parent 7cacbb4parent 0489037
69 files changed, +6929 −394
  • apimode.go +28 −0
  • deploy.go +88 −2
  • deploy_test.go +40 −0
  • docs/superpowers/specs/2026-08-19-fleet-architecture-diagram-design.md +27 −13
  • docs/superpowers/specs/2026-08-27-managed-custom-domains-design.md +703 −0
  • domains_cli.go +69 −2
  • domains_cli_test.go +64 −1
  • domains_e2e_test.go +5 −2
  • e2e_test.go +1 −1
  • internal/console/apicli_test.go +36 −0
  • internal/console/apidomains.go +140 −11
  • internal/console/apidomains_test.go +291 −0
  • internal/console/apimail.go +7 −1
  • internal/console/appdomains_test.go +83 −0
  • internal/console/archgraph.go +50 −13
  • internal/console/archgraph_test.go +28 −30
  • internal/console/archlayout.go +102 −15
  • internal/console/archlayout_test.go +17 −19
  • internal/console/archlegibility_test.go +149 −0
  • internal/console/domainattach.go +25 −1
  • internal/console/domainstate.go +206 −0
  • internal/console/domainstate_test.go +210 −0
  • internal/console/edgefold_test.go +119 −0
  • internal/console/mailcounts.go +9 −2
  • internal/console/pending.go +52 −3
  • internal/console/pending_test.go +69 −0
  • internal/console/pendingflow_test.go +286 −0
  • internal/console/pendinghandlers.go +180 −20
  • internal/console/pipelinepage.go +14 −2
  • internal/console/pipelinepage_test.go +114 −4
  • internal/console/server.go +117 −3
  • internal/console/server_test.go +7 −1
  • internal/console/sesevents.go +72 −0
  • internal/console/sesevents_test.go +108 −0
  • internal/console/store.go +9 −0
  • internal/console/templates/app_releases.html +48 −13
  • internal/console/templates/layout.html +5 −0
  • internal/console/view.go +42 −5
  • internal/domains/aliases.go +34 −1
  • internal/domains/aliases_test.go +155 −16
  • internal/domains/reconcile.go +162 −82
  • internal/domains/reconcile_internal_test.go +106 −4
  • internal/domains/reconcile_test.go +107 −13
  • internal/edge/certwarm.go +376 −0
  • internal/edge/certwarm_test.go +269 −0
  • internal/edge/edge.go +39 −0
  • internal/edge/homemap.go +32 −0
  • internal/edgesfile/edgesfile.go +89 −0
  • internal/edgesfile/edgesfile_test.go +49 −0
  • internal/edgesfile/fold.go +181 −0
  • internal/edgesfile/fold_test.go +316 −0
  • internal/host/agent.go +67 −21
  • internal/host/edgesfile_test.go +40 −0
  • internal/host/host_test.go +37 −19
  • internal/mail/aws.go +1 −0
  • internal/mail/memprovisioner.go +10 −1
  • internal/mail/provisioner.go +11 −0
  • internal/mail/walk.go +137 −4
  • internal/mail/walk_enable_test.go +88 −4
  • internal/mail/walk_verify_test.go +113 −8
  • internal/release/adopt.go +85 −23
  • internal/release/adopt_test.go +378 −0
  • internal/release/bake.go +141 −7
  • internal/release/bake_test.go +90 −5
  • internal/release/pipeline_test.go +80 −0
  • internal/release/release.go +23 −7
  • internal/status/snapshot.go +37 −10
  • internal/status/status_test.go +49 −0
  • mail_cli.go +7 −5
apimode.go

Loading diff…

deploy.go

Loading diff…

deploy_test.go

Loading diff…

docs/superpowers/specs/2026-08-19-fleet-architecture-diagram-design.md

Loading diff…

docs/superpowers/specs/2026-08-27-managed-custom-domains-design.md

Loading diff…

domains_cli.go

Loading diff…

domains_cli_test.go

Loading diff…

domains_e2e_test.go

Loading diff…

e2e_test.go

Loading diff…

internal/console/apicli_test.go

Loading diff…

internal/console/apidomains.go

Loading diff…

internal/console/apidomains_test.go

Loading diff…

internal/console/apimail.go

Loading diff…

internal/console/appdomains_test.go

Loading diff…

internal/console/archgraph.go

Loading diff…

internal/console/archgraph_test.go

Loading diff…

internal/console/archlayout.go

Loading diff…

internal/console/archlayout_test.go

Loading diff…

internal/console/archlegibility_test.go

Loading diff…

internal/console/domainattach.go

Loading diff…

internal/console/domainstate.go

Loading diff…

internal/console/domainstate_test.go

Loading diff…

internal/console/edgefold_test.go

Loading diff…

internal/console/mailcounts.go

Loading diff…

internal/console/pending.go

Loading diff…

internal/console/pending_test.go

Loading diff…

internal/console/pendingflow_test.go

Loading diff…

internal/console/pendinghandlers.go

Loading diff…

internal/console/pipelinepage.go

Loading diff…

internal/console/pipelinepage_test.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/server_test.go

Loading diff…

internal/console/sesevents.go

Loading diff…

internal/console/sesevents_test.go

Loading diff…

internal/console/store.go

Loading diff…

internal/console/templates/app_releases.html

Loading diff…

internal/console/templates/layout.html

Loading diff…

internal/console/view.go

Loading diff…

internal/domains/aliases.go

Loading diff…

internal/domains/aliases_test.go

Loading diff…

internal/domains/reconcile.go

Loading diff…

internal/domains/reconcile_internal_test.go

Loading diff…

internal/domains/reconcile_test.go

Loading diff…

internal/edge/certwarm.go

Loading diff…

internal/edge/certwarm_test.go

Loading diff…

internal/edge/edge.go

Loading diff…

internal/edge/homemap.go

Loading diff…

internal/edgesfile/edgesfile.go

Loading diff…

internal/edgesfile/edgesfile_test.go

Loading diff…

internal/edgesfile/fold.go

Loading diff…

internal/edgesfile/fold_test.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/edgesfile_test.go

Loading diff…

internal/host/host_test.go

Loading diff…

internal/mail/aws.go

Loading diff…

internal/mail/memprovisioner.go

Loading diff…

internal/mail/provisioner.go

Loading diff…

internal/mail/walk.go

Loading diff…

internal/mail/walk_enable_test.go

Loading diff…

internal/mail/walk_verify_test.go

Loading diff…

internal/release/adopt.go

Loading diff…

internal/release/adopt_test.go

Loading diff…

internal/release/bake.go

Loading diff…

internal/release/bake_test.go

Loading diff…

internal/release/pipeline_test.go

Loading diff…

internal/release/release.go

Loading diff…

internal/status/snapshot.go

Loading diff…

internal/status/status_test.go

Loading diff…

mail_cli.go

Loading diff…