fix(uo-link): pin protocol 4, the version this build actually speaks #20
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/protocol-4-pin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was wrong
The protocol-4 cutover moved
link'sPROTOCOL_VERSION, the overlay'soverlay.tomland this module's ingest —guild.rosterandguild.leavelanded with the Teams cutover — but left this module's two pin sites at 3:DEFAULT_PROTOCOLinserver/model/uoLinkConfig/uoLinkConfig.model.jsuo_link_config.protocolcolumn default inserver/db/schema.sqlA fresh install therefore came up speaking 3 to a protocol-4 sidecar. A sidecar answers a stale client
409 protocol version mismatchrather than mis-parsing it, so the failure is total and quiet: every REST read fails, the WS closes onws.hello, and the operator sees an empty marketplace, an empty guild board and no shard status, with the cause visible only in the server log.It cleared only when an admin edited the number by hand in Admin → Shard.
Existing installs were unaffected, which is why this went unnoticed — the protocol-3 one-shot had already moved their stored row, and the stored row wins. It bites exactly the path the installer makes the supported one: a new deployment.
Found while standing up a demo deployment for the marketing site's screenshots (runicgateway.com phase 9).
The fix
DEFAULT_PROTOCOL→ 4, with the reason recorded where the constant lives.settingsso an operator who deliberately pins an older sidecar in Admin → Shard stays pinned, and writtenprotocol < 4rather than= 3so an install that never took the protocol-3 migration is carried the whole way rather than one step. The marker is written after the UPDATE that reads it, and in this module's fragment rather than core's — the lesson the protocol-3 block already records.Tests
Three regressions in
server/test/schemaFragment.test.js, all failing against the old file:CREATE TABLEdefault and the lastMODIFYboth name the protocol this build speaksprotocol < 4, so any older pin is carried forwardnpm test --prefix server→ 453 pass, 0 fail.Verified live
Against the real stack on this machine — ServUO + protocol-4 sidecar + core with this module installed. Before:
409on/guilds,/market,/towncrier, everything. After pointing the config at protocol 4: guild board, governors, houses, points boards, ruleset and the 27-vendor market all snapshot on connect.Docs half:
docsPR — v4's cross-repo obligation table named only the ingest work, and that omission is what let this through. A protocol bump owes four declaration sites, not three.Co-Authored-By: Claude <noreply@anthropic.com>