Repository navigation
feat(website): a website env stores its names from env.toml, and a multi env refuses a name two of its sites claim (FD-4931) - #514
Conversation
…lti env refuses a name two of its sites claim (FD-4931) A website env's env.toml (or `website put --domain`) may name `domains`, checked as a computer's site table checks names, and `WebsiteEnv` stores them. A computer deployed with `site_routing` routes a site by its stored names before those its card declares, then `<name>.localhost`. `put` and bundle plans refuse a multi env two of whose websites claim overlapping names, by the rules `site_table` applies at deploy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the list, so two versions of one env claiming a name are refused Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Automated Claude routine — Env Pod PR Context Review. This is a bot, not Edgar Arakelyan; not a human review. Context from outside this diff: #447 (open) also gives
One more thing worth knowing for sequencing: #447 is stacked on Generated by Claude Code |
Summary
A website env's names now live in its
env.toml, as decided in #445's design review:env.tomlholds what agentenv needs before a site runs, and the card the site serves stays its contract. Before this, a site's names were known only once it ran, read from its card when a computer deployed beside it, so two sites of one multi env could claim one name with nothing said until then.domainsin a website env'senv.toml(oragent-env env website put --domain, repeatable). Each name is checked as a computer's site table checks it: lowercase, DNS labels, a wildcard only as its whole first label.WebsiteEnv.domainsis stored, serialized (only when set, so existing records are unchanged), and round-trips throughto_toml.domains, else its card'swebsite/v1domains, else<environment_name>.localhost. Stored names win, and they are not compared with the card's: the requiredany_hostconformance check already makes a conforming site work under any name.deployed_sitesreads the stored names first, and skips the live card read for a site whose names are stored.MultiEnvrefuses websites whose stored names overlap (an exact name twice, or a wildcard covering another site's name), and a bundle plan refuses the same before any write. Both usesite_table's rule, split out asname_conflicts. A site that relies on its card is still checked at deploy, as today.Design note, with its 4 decisions: FD-4931 design note: site names in env.toml. Left out by those decisions: per-site overrides on a multi env (rename by putting another
WebsiteEnv), a gateway site table,AGENTENV_SITE_TABLE(a browser alone is a computer since M8.53), and apps'sites=[...].Linear: FD-4931
Test plan
test_website_site_names.py): stored names and a refused bad name, a multi env refusing a wildcard overlap, and a computer's table taking stored names over the card's with a.localhostdefault and no live card read.domainsand two sites claiming one name are refused before any write; a website'sdomainsround-trips through export.--domainis stored, and a bad one fails before any registry call.test_disk_recipe.py, a launcher script) also fail onmainon macOS.agent-env bundle register --dry-runon real bundle folders:env.tomldomains are accepted, a clash between two sites and a bad name are refused before any write.chat, which storeschat.e2e4931.testand*.chat.e2e4931.testwhile its card declaresslack.e2e4931.test, andnotes, with no names stored or declared. A browser computer was deployed beside them withsite_routing.putrefuses a multi env adding a site that storesteam.chat.e2e4931.test: it overlaps*.chat.e2e4931.test.notes.localhost. The deploy checks answer 200, and the browser's first tab openshttps://chat.e2e4931.test/.chat.e2e4931.test,team.chat.e2e4931.test(the wildcard) andhttp://notes.localhostanswer as their sites. The card'sslack.e2e4931.testdoesn't resolve.site_routing: [<multi id>]gets the same table.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; the previous conflict-check bypass is fixed.Summary
Websites can store
domainsinenv.toml. These names take priority over card names, and overlapping stored names are refused before deployment.Reviews (2) · Last reviewed commit: "fix(website): a multi env tells its webs..." · Reviewed by Greptile