fix(link): a protocol bump owes four declaration sites, not three #175

Merged
whitlocktech merged 1 commits from fix/protocol-4-module-pin into main 2026-08-25 00:34:06 +00:00

View File

@@ -236,7 +236,7 @@ page listing character names versus one publishing 150 account names, so it carr
|---|---| |---|---|
| `servuo-plugins` | member-set diff, `guild.roster` + `guild.leave`, `BridgeJson.Actors`, two `Bridge.cfg` keys, **`overlay.toml` protocol → 4** | | `servuo-plugins` | member-set diff, `guild.roster` + `guild.leave`, `BridgeJson.Actors`, two `Bridge.cfg` keys, **`overlay.toml` protocol → 4** |
| `link` | `PROTOCOL_VERSION` → 4, `members` column + `user_version` migration, roster reassembly, `GET /guilds` projection | | `link` | `PROTOCOL_VERSION` → 4, `members` column + `user_version` migration, roster reassembly, `GET /guilds` projection |
| `module-uo` | `shard_guild_members`, `guild.roster`/`guild.leave` ingest, the kind→feature map entries | | `module-uo` | `shard_guild_members`, `guild.roster`/`guild.leave` ingest, the kind→feature map entries, **the pinned protocol → 4** |
| `installer` | `backup.rs`'s stated reason for skipping the sidecar DB (§3.2 falsifies it) — docs only | | `installer` | `backup.rs`'s stated reason for skipping the sidecar DB (§3.2 falsifies it) — docs only |
| `docs` | this file, `PROTOCOL_2.md` §10.1, `INTEGRATION.md` | | `docs` | this file, `PROTOCOL_2.md` §10.1, `INTEGRATION.md` |
@@ -244,6 +244,18 @@ page listing character names versus one publishing 150 account names, so it carr
the installer refuses to pair an overlay and a sidecar whose protocol numbers disagree, so a bump the installer refuses to pair an overlay and a sidecar whose protocol numbers disagree, so a bump
landing separately would silently fail to compose into a bundle. landing separately would silently fail to compose into a bundle.
**The pinned protocol is a fourth declaration site, and this table missed it once.** `module-uo`
pins the version the WEBSITE speaks, in two places — `DEFAULT_PROTOCOL` in
`server/model/uoLinkConfig/uoLinkConfig.model.js` and the `uo_link_config.protocol` column default
in `server/db/schema.sql`. Both stayed at 3 when protocol 4 shipped, because this row named only the
ingest. The consequence is not a partial degradation: a sidecar answers a stale client `409 protocol
version mismatch` rather than mis-parsing it, so a fresh install read *nothing* from its shard —
empty marketplace, empty guild board, no status — until an admin edited the number by hand in
Admin → Shard. Existing installs were unaffected, which is why it went unnoticed: the protocol-3
one-shot had already moved their stored row, and the stored row wins. Fixed in `module-uo` (the pin,
plus a protocol-4 one-shot mirroring the protocol-3 one). **A protocol bump owes four declaration
sites, not three.**
--- ---
## 6. Verification ## 6. Verification