Skip to content

docs(adr): one hostname for every target, routed by an edge Worker over Worker Previews and decided by Flagship - #207

Merged
aRustyDev merged 1 commit into
mainfrom
docs/one-hostname-adr
Nov 16, 2026
Merged

aRustyDev merged 1 commit into
mainfrom
docs/one-hostname-adr

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

Stage PR A of #195: the decision record for serving production and any number of other targets from one hostname.
Docs only.

What is in it

  • ADR-0111 (adrs/cd/0111-one-hostname-n-targets.md, accepted).
    • Decisions: the owner's decisions of 2026-11-15.
    • Design:
      • production stays the one thrust Worker, behind a routing-only thrust-edge on thrust.sow.foo;
      • every other target is a Worker Preview of thrust, reached only through the edge with an Access service token;
      • Flagship decides who reaches what (a kill switch, aliases, one flag per target), and only CI writes it;
      • data profiles shared and isolated;
      • the migration rules for shared data.
    • Options: five, with why the others lost.
  • research/0016-one-hostname-spike.md: the live spike of 2026-11-16, measured on the account, with everything it
    created deleted. It found:
    • a custom-domain Preview URL refuses subrequests, so the edge reaches Previews over workers.dev;
    • Access can cover one Worker's Previews only (direct calls, made-up tokens and forged headers all got 403);
    • a script_name room binding from a Preview reaches production's rooms and runs production's code;
    • Flagship works from workers-rs only through extern method imports;
    • a flag change reached the edge in 6 s;
    • WebSockets pass;
    • the edge must drop Access's CF_Authorization Set-Cookie and handle redirects itself;
    • a Preview's version tag is empty, so a target's smoke compares the deployment id.
  • Dated updates (this repository amends ADRs rather than superseding them):
  • QUESTIONS.md:
    • Q-0092.2 superseded;
    • new Q-0111.1: does preview_urls = true open production's Version URLs past the edge?
    • new Q-0111.2: thrust behind the edge, including /api/instances/ building its origin from Host.

Checks

The deps job's guards were run locally (topology, acceptance list, placement, plane-500, render self-test): all exit 0.
No code changed.

Refs #195

🤖 Generated with Claude Code

…er Worker Previews and decided by Flagship

ADR-0111 records the owner's decisions of 2026-11-15 for #195, which are:
- one hostname, thrust.sow.foo;
- any number of live targets (prod, vX.Y.Z, the alias staging, dev-*);
- explicit opt-in, with identity from Access on the opt-in path only;
- every Flagship flag made by CI/CD;
- a reviewer before a shared-data target migrates.

It also records the design those decisions led to:
- production stays the one thrust Worker, behind a routing-only edge Worker;
- every other target is a Worker Preview of thrust, reached only through the edge;
- data profiles shared and isolated;
- the migration rules for shared data.

research/0016 holds the live spike of 2026-11-16 that settled what the documentation did not:
- a Preview's custom-domain URL refuses subrequests, so the edge uses workers.dev;
- Access can cover one Worker's Previews only;
- a script_name room binding from a Preview reaches production's rooms and code;
- Flagship works from workers-rs only through extern method imports;
- flag changes arrive in about 6 s;
- the edge must drop Access's CF_Authorization Set-Cookie and handle redirects itself;
- a Preview's version tag is empty.
Everything the spike made is deleted.

Dated updates, following this repository's amend-not-supersede convention:
- ADR-0110: where each kind of deploy lands;
- ADR-0092: the environment set; Q-0092.2's answer superseded;
- ADR-0090: an edge in front of the one Worker;
- ADR-0008: Flagship only at the edge; product flags stay a table;
- ADR-0042: the ledger of #201 and contract migrations by name;
- ADR-0061: shared targets use production's rooms.

New open questions:
- Q-0111.1: do Preview URLs open production's Version URLs?
- Q-0111.2: does thrust work behind the edge? /api/instances/ builds its origin from Host.

Refs: #195
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aRustyDev
aRustyDev merged commit 526805c into main Nov 16, 2026
13 checks passed
@aRustyDev
aRustyDev deleted the docs/one-hostname-adr branch November 16, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant