Session handover — 2026-07-06¶
Opened the multi-tenant CMS workstream. Settled the topology as a
fleet of single-tenant workers — one per site (ADR-0008, new), then
shipped Slices 1–2 plus a baked-seed fix. waterfordcountypainters is live
as a second, fully isolated worker at wcp.dcathal.org. One commit on
master.
What changed — where to look¶
- ADR-0008 (new) — CMS deployment topology: one single-tenant worker per
site, sharded across Cloudflare accounts (~450/account × ~4). Resolves
ADR-0004's "Multi-tenant deferral" by choosing the opposite of the
runtime-shared design; rationale grounded in emdash's tenant-less loader
(
loader.tsslug+locale only). Slice tracker + Slice-2 execution notes are in the ADR. - Slice 1 — tenant parameterisation.
SITEenv →apps/cms/seed/<site>.jsonviascripts/lib/resolve-site.mjs;emit-theme-css/reseed/transform-seed-imagesresolve the active site; garvanbay seed renamedseed.json→garvanbay.json(byte-identicalglobal.css). Sweptlib/capture-section-backgrounds.js+lib/cms/apply-section-tones.jstoo (they read the seed path). - Slice 2 — wrangler templating + live 2nd site.
sites/<site>.jsonc+wrangler.template.jsonc→scripts/emit-wrangler.mjsgenerates a gitignoredwrangler.jsonc(garvanbay byte-identical). Provisioned + deployed WCP: D1replatform-emdash-waterfordcountypainters(9430e6f7…580), Access app (AUD6319…291), custom domainwcp.dcathal.org, worker version94d7469e. - Baked-seed fix.
scripts/emit-seed.mjsemits.emdash/seed.jsonper site so a fresh tenant auto-seeds its own content — see known-patterns "emdash bakes the seed fromvirtual:emdash/seed". - known-patterns (2 new): fresh-tenant D1 bootstrap = a human
/_emdashlogin (no headless migrate); baked-seed per-site. - known-issues (3 new): cross-account sharding unproven (Slice 2 was
same-account); non-fatal
No matching export for "default"build errors onMap/Prose/Features(pre-existing); WCP worker carries garvanbay's baked seed (cosmetic, self-corrects on redeploy).
Verified¶
- Both sites live & isolated:
emdash.dcathal.org→ Garvan Bay Accounting (untouched by the WCP deploy);wcp.dcathal.org→ Waterford County Painters, 24 pages, HTTP 200; WCP/_emdash/admin302 → Access with the WCP AUD. - Baked-seed fix via the built artifact: a
SITE=waterfordcountypaintersbuild has 0garvanbaystrings indist/. - garvanbay
wrangler.jsonc+global.cssregenerate byte-identical through the new generators (Phase-3 regression).
Live resources created this session (personal account 1ceb…)¶
WCP D1 (replatform-emdash-waterfordcountypainters), WCP worker + auto-provisioned
SESSION KV, plus the operator-created Access app + wcp.dcathal.org domain. R2 is
the shared replatform-emdash-media bucket (domain-prefixed, no change).
Next priority¶
Slice 3 — provisioning + sharding automation (planned): one command to
create D1 + Access app + domain + deploy + reseed for a site on a chosen
account, automating (or headless-reproducing) the /_emdash-login schema
bootstrap. The cross-account sharding proof rides along (see known-issues
"Cross-account sharding unproven"). The baked-seed fix already removes the
manual clear+reseed step for fresh tenants.