carlos / platform Public

host: home link loop that serves only published apps

Linked deployments slice 1, Task 8 (spec §3 anti-goal 1, §6.2, §6.3).

The agent runs a second, registry-driven tunnel loop beside the fleet
one. The first home box to see an unclaimed link claims it (never a
fleet box) and dials the link's hub. A change of token, tunnel URL,
claim or conn_gen replaces the connection, which ends every stream of
an unpublished or retargeted app.

The link handler reads Carlos-Link-App and looks the name up in the
home's published set on every request. A missing or unpublished name
gets 404 (LD-C50). A published one goes to edge.ServeLinked: the edge's
normal pipeline with the upstream pinned to the published account and
app. selectUpstream is now the one request-path site. A pin selects
only the exact local instance entry, else 502 (LD-C51). The edge's own
handlers, backhaul, HA forwards and every home cache are skipped. The
app and the password gate see the public host over https.

Census overlay linked-deployments-slice1 re-proposed with Task 8 claims.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 41fae3a41afc82c990e067f3ee1c18e798cfae16 parent f8dd07f
17 files changed, +1,804 −51
  • docs/superpowers/notes/census-proposal-linked-deployments-slice1.md +32 −5
  • internal/edge/demo.go +10 −2
  • internal/edge/edge.go +191 −20
  • internal/edge/forwardha.go +1 −1
  • internal/edge/haingress.go +2 −2
  • internal/edge/homemap.go +18 −0
  • internal/edge/linkoffline.go +3 −0
  • internal/edge/linkpin_test.go +101 −0
  • internal/edge/pagecache.go +6 −2
  • internal/edge/purge_header.go +27 −8
  • internal/gate/gate.go +20 −2
  • internal/host/agent.go +4 −0
  • internal/host/link_client.go +274 −0
  • internal/host/link_e2e_test.go +970 −0
  • internal/host/link_handler.go +104 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-linked-deployments-slice1.tsv +40 −8
docs/superpowers/notes/census-proposal-linked-deployments-slice1.md

Loading diff…

internal/edge/demo.go

Loading diff…

internal/edge/edge.go

Loading diff…

internal/edge/forwardha.go

Loading diff…

internal/edge/haingress.go

Loading diff…

internal/edge/homemap.go

Loading diff…

internal/edge/linkoffline.go

Loading diff…

internal/edge/linkpin_test.go

Loading diff…

internal/edge/pagecache.go

Loading diff…

internal/edge/purge_header.go

Loading diff…

internal/gate/gate.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/link_client.go

Loading diff…

internal/host/link_e2e_test.go

Loading diff…

internal/host/link_handler.go

Loading diff…

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

Loading diff…

internal/provision/testdata/plan14-root-reads-linked-deployments-slice1.tsv

Loading diff…