diff --git a/website/MODULE_API.md b/website/MODULE_API.md index 9a9be64..5cd33e5 100644 --- a/website/MODULE_API.md +++ b/website/MODULE_API.md @@ -867,7 +867,9 @@ module becomes the authoritative source of Teams for this deployment. Two furthe **One provider per deployment.** Unlike every other registry, this holds a single value: Teams have one authoritative source by construction, and two modules answering "what Teams exist" would produce two disjoint sets under one table with no rule for merging them. A second registration is a -collision, reported against the module that holds it. Three methods are required — a provider +collision, reported against the module that holds it — and it fails that module's whole load, which +is why core's installer admits **one module per site** (`MODULE_SYSTEM.md` §2.5, decision 35) rather +than leaving the collision to be discovered on the next restart. Three methods are required — a provider that could list Teams but not their members would leave core holding Teams it can never populate, which is not the same as a call that fails. The fourth is optional; see below. diff --git a/website/MODULE_SYSTEM.md b/website/MODULE_SYSTEM.md index 3df4fb0..7016e65 100644 --- a/website/MODULE_SYSTEM.md +++ b/website/MODULE_SYSTEM.md @@ -463,6 +463,17 @@ supervisor the shipped compose file already declares brings the process back.)* Nothing is compiled at any point. The operator restarts; they never build. +**A site runs one module** *(org lead, 2026-09-23; decision 35)*. A site is one game, and the contract +already has singletons that assume it: `registerTeamProvider` holds **one** value per deployment, and a +second module registering one fails that module's whole load. With the loader scanning alphabetically, +installing `rust` beside `uo` would have taken `uo` down, not `rust`. So `modules/install.js` refuses, +with `409` and before a byte is downloaded, any install whose id differs from a module already on the +volume. **An upgrade of the installed module is the only install a populated site accepts**; to change +game, remove the module first. The rule is enforced on the install path both surfaces share, so a +`MODULES` declaration naming two modules installs the first and reports the second as refused, without +failing the boot. It does not police a directory an operator places by hand, which remains the +developer's escape hatch. + **Uninstall** (default, non-destructive): row set to `disabled`, directory removed, restart. The module's tables and data are **retained**. **Purge** is a separate, explicit, destructive action that runs `purge.sql`; it is never bundled into uninstall. @@ -2275,3 +2286,4 @@ check in this repo can see. | 32 | The kit is a **draft on its own front page** until a person outside the org passes its acceptance; a cold-agent run is the interim proxy | §2.11.1 d5 | | 33 | `rust-dryrun.md` is **corrected with a dated note**, not silently rewritten — a dry run's value is the record of what it found | §2.11.1 d6 | | 34 | Core owns the page **body** as well as the chrome: `PublicLayout` takes a `shell` width, and its CSS class names stay core's private business | API §3.4, §2.11.1 slice 3 | +| 35 | **A site runs one module.** The installer refuses a module whose id differs from the one installed (`409`); only upgrades are accepted. Forced by the one-per-deployment Team provider, which a second module would collide with and fail to load | §2.5 |