docs(link): points.board, the leaderboards API, and what a real shard changed #69
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/points-board"
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 & why
Protocol 3.0 §7 lands across servuo-plugins #4, link #18 and website #114; this is the matching documentation. Order 4 of 6 in the v3 sequence.
link/INTEGRATION.mdpoints.boardin the event catalog — one frame per system, never a delta, nopoints.remove(the shard's system set is fixed at startup). Four gotchas called out, all of them things a consumer gets wrong by default:maxPoints: 0means UNCAPPED, not "zero allowed" — and on a real shard it is the common case, so anything renderingpoints / maxPointsmust special-case it or divide by zero on the happy path.nameStringis usuallynull, with a cliloc innameNumber— so humanising thesystemkey is the primary display path, not a fallback.playerscounts players actually holding points, not table size: ten of the ~25 systems keep a zero-point row per character ever created, so the raw count would report the shard's whole census as one system's participants.serial+nameonly, neveracct/webId.char.profilepointsblock, and whyrankis absent by default.GET /pointsand/points/:system, including why404(never published) and200-with-empty-top(published, nobody scored) are different answers.link/v3.mdPointsSystem.cs, the sharpest being that(long)double.MaxValueis an unchecked conversion yieldinglong.MinValue, which published"maxPoints": -9223372036854775808on the first live sweep. Also records thatGetEntry/GetPointsmutate the world onAutoAddsystems and so cannot be used in a read model, and the one deliberate deviation from §7.4: the visibility field rule must key on the wire'sname, not the descriptivecharacterName, or it is silently inert.website/BACKEND_DESIGN.mdshard_points_boards— including why the top-N list stays in the payload and why listing orders byCOALESCE(name, system)— plus the two new public routes.link/PLAN.md3.0 phasing brought current: the spawn atlas and
points.boardadded to what has shipped, and thePoints*keys noted in the config-key paragraph.How it was tested
Documentation only — no code. Every claim here was written after the corresponding behaviour was observed running, not from the plan:
maxPointsoverflow and its fix were both reproduced against a live 43,011-mobile ServUO world (servuo-plugins #4);nameStringis usually null" and "uncapped is the common case" claims come from counting what that shard actually emitted (4 of 5, and 3 of 5, respectively);404vs emptytop, the:systemconstraint) were exercised against the running sidecar and website (link #18, website #114).PROJECT_TREE.mdfiles are deliberately untouched — they are CI-generated by thesync-project-treeworkflow and say so in their header.Checklist
AI-assisted contributions (required)
Claude Code (Opus 5). I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with aCo-Authored-Bytrailer.License
Protocol 3.0 §7 lands across servuo-plugins, link and website; this is the matching documentation. INTEGRATION.md - points.board in the event catalog: one frame per system, never a delta, no points.remove (the shard's system set is fixed at startup). Four gotchas called out, all of them things a consumer gets wrong by default: 1. maxPoints: 0 means UNCAPPED, not "zero allowed" — and on a real shard it is the COMMON case, so anything rendering points/maxPoints must special-case it or divide by zero on the happy path. 2. nameString is usually null, with a cliloc in nameNumber — so humanising the system key is the primary display path, not a fallback. 3. players counts players actually holding points, not table size: ten of the ~25 systems keep a zero-point row per character ever created, so the raw count would report the shard's whole census. 4. Entries carry serial + name only, never acct/webId. - The char.profile `points` block, and why `rank` is absent by default. - GET /points and /points/:system, including why 404 (never published) and 200-with-empty-top (published, nobody scored) are different answers. v3.md - B/2 marked done in both the progress table and §9. - NEW §7.5, "what the run against a real shard changed" — the same record §6.1 and §6.2 keep. Four corrections the plan could not have anticipated from reading PointsSystem.cs, the sharpest being that (long)double.MaxValue is an unchecked conversion yielding long.MinValue, which published "maxPoints": -9223372036854775808 on the first live sweep. Also records that GetEntry/GetPoints mutate the world on AutoAdd systems and so cannot be used in a read model, and the one deliberate deviation from §7.4: the visibility field rule must key on the wire's `name`, not the descriptive `characterName`, or it is silently inert. BACKEND_DESIGN.md — shard_points_boards (including why the top-N list stays in the payload and why listing orders by COALESCE(name, system)), plus the two new public routes. PLAN.md — 3.0 phasing brought current: the spawn atlas and points.board added to what has shipped, and the Points* keys noted in the config-key paragraph. PROJECT_TREE.md files are deliberately untouched — they are CI-generated and say so. Co-Authored-By: Claude <noreply@anthropic.com>