carlos / platform Public

Serve the anonymous demo API on an operator-chosen site host (#527)

Off by default. An edge setting names one site host; the edge forwards a fixed
list of demo API paths to the console, with no cookies either way, the real
client IP and no caching. CONSOLE_DEMO_API_ORIGIN points statusUrl at the site.
claimUrl stays on the console. Claim paths follow once Plan 3 merges.

Review: plan round 1 and Tasks 1-2 READY AFTER FIXES, whole branch READY.
Census approved on #280. Not released.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from demo-api-site-route into main.
Co-Authored-By: claude <claude~paul@keymail.dev>
codex agent, operated by paul@keymail.dev pushed by claude agent, operated by paul@keymail.dev 973a07e2b3b6cb95bfec9bffe050407b033d7e79 parent 14d4b24
32 files changed, +3,219 −35
  • README.md +19 −0
  • cmd/console/main.go +6 −5
  • docs/superpowers/notes/census-proposal-demo-api-site-route.md +27 −0
  • docs/superpowers/plans/2026-11-04-agent-start-demo-4-start-page.md +13 −13
  • docs/superpowers/plans/2026-11-05-demo-api-site-route.md +165 −0
  • docs/superpowers/plans/REVIEW-BRIEF-DEMO-API-SITE-ROUTE-R1.md +107 −0
  • docs/superpowers/plans/REVIEW-DEMO-API-SITE-ROUTE-R1.md +132 −0
  • docs/superpowers/specs/LUNA-COPY-BRIEF-DEMO-API-SITE-ROUTE.md +44 −0
  • docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-API-SITE-ROUTE.md +22 −0
  • internal/console/apidemo.go +16 −4
  • internal/console/demo_api_alias_integration_test.go +100 −0
  • internal/console/demo_api_origin.go +63 −0
  • internal/console/demo_api_origin_test.go +410 −0
  • internal/console/domaincatchall.go +1 −1
  • internal/console/domainpolicy.go +3 −0
  • internal/console/server.go +10 −4
  • internal/demo/api_origin.go +23 −0
  • internal/demo/api_origin_test.go +16 −0
  • internal/edge/demo_api.go +325 −0
  • internal/edge/demo_api_export_test.go +196 −0
  • internal/edge/demo_api_integration_test.go +574 −0
  • internal/edge/demo_api_test.go +789 −0
  • internal/edge/edge.go +26 −5
  • internal/host/group_names_test.go +3 −2
  • internal/hostenv/group_test.go +35 −0
  • internal/hostenv/hostenv.go +2 −0
  • internal/hostenv/hostenv_test.go +27 −0
  • internal/hostenv/write_linux_test.go +31 −0
  • internal/provision/demo_api_site_route_census_test.go +18 −0
  • internal/provision/plan9_b8_census_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-demo-api-site-route.tsv +14 −0

CI passed — run details

README.md

Loading diff…

cmd/console/main.go

Loading diff…

docs/superpowers/notes/census-proposal-demo-api-site-route.md

Loading diff…

docs/superpowers/plans/2026-11-04-agent-start-demo-4-start-page.md

Loading diff…

docs/superpowers/plans/2026-11-05-demo-api-site-route.md

Loading diff…

docs/superpowers/plans/REVIEW-BRIEF-DEMO-API-SITE-ROUTE-R1.md

Loading diff…

docs/superpowers/plans/REVIEW-DEMO-API-SITE-ROUTE-R1.md

Loading diff…

docs/superpowers/specs/LUNA-COPY-BRIEF-DEMO-API-SITE-ROUTE.md

Loading diff…

docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-API-SITE-ROUTE.md

Loading diff…

internal/console/apidemo.go

Loading diff…

internal/console/demo_api_alias_integration_test.go

Loading diff…

internal/console/demo_api_origin.go

Loading diff…

internal/console/demo_api_origin_test.go

Loading diff…

internal/console/domaincatchall.go

Loading diff…

internal/console/domainpolicy.go

Loading diff…

internal/console/server.go

Loading diff…

internal/demo/api_origin.go

Loading diff…

internal/demo/api_origin_test.go

Loading diff…

internal/edge/demo_api.go

Loading diff…

internal/edge/demo_api_export_test.go

Loading diff…

internal/edge/demo_api_integration_test.go

Loading diff…

internal/edge/demo_api_test.go

Loading diff…

internal/edge/edge.go

Loading diff…

internal/host/group_names_test.go

Loading diff…

internal/hostenv/group_test.go

Loading diff…

internal/hostenv/hostenv.go

Loading diff…

internal/hostenv/hostenv_test.go

Loading diff…

internal/hostenv/write_linux_test.go

Loading diff…

internal/provision/demo_api_site_route_census_test.go

Loading diff…

internal/provision/plan9_b8_census_test.go

Loading diff…

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

Loading diff…

internal/provision/testdata/plan14-root-reads-demo-api-site-route.tsv

Loading diff…