feat(events): what an author borrows, and two one-shots (Phase 12b) #32
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/events-p12b-borrowed-and-oneshots"
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?
Events Phase 12b, module half. One of five:
website(website#194),servuo-plugins(servuo-plugins#24),link(link#39),Module-uo,docs(docs#222). Spec of record:docs/link/v7.md§11–§14.Five leases, one factory
uo.spawner.maxcount,.mindelay,.maxdelay,.runninganduo.seasonal.status. The four callables differ only in which key they name, so they are built rather than repeated: five copies would be five chances for one of them to forget the drift check, which is the one thing §F says a lease must not be allowed to skip.It is
MaxCount, not theAmountEVENTS_PLAN.mdnamed — there is no such property on ServUO 57.4.MinDelay/MaxDelayareTimeSpans, so the wire carries seconds: the spawn files' ownDelayInSecflag proves both units are in use on a real tree, and a unit that cannot express five seconds cannot express this shard's own data.The seasonal lease is a three-value enum over eight events. §G called
GetEntry(type).Status"a nine-value enum" and had it backwards:EventStatushas three values and it isEventTypethat has nine entries. Eight rather than nine becauseTreasuresOfTokunois excluded —IsActive()reads its ownDropErarather thanStatus, so leasing it would apply cleanly, read back, restore cleanly and do nothing at all.Two behaviours worth the review.
inForce()reads the frame'sholdsrather than a row'sheldflag, because a catalog walk can enumerate the keys but never the holds on a targeted one. And a target that vanished mid-run is a successful restore: there is nothing to give back, and reporting it failed would leave a ledger row unresolved for ever over an object that is gone — 12a'sgonein the lease plane's vocabulary.The grant names a run, never a recipient list
Core has the participants in
event_run_participants, but a module cannot read core's tables — so the alternative was a new core surface handing them over. Not needed: the shard has held the run's ledger since it opened, keyed by the same serials core stores asmember_key.And the grant is retryable. §G called it un-retryable because a lost acknowledgement and a grant that never applied were the same event, which is exactly the argument that made
uo.broadcastanswerretry: falsein Phase 9. Protocol 6's idempotency key closes it.uo.rewardscounts items rather than grants: 500 gold to forty people and a candle to forty people are not the same imposition.The atlas keeps
UniqueIdagain, and the spawner source searchesThe parser has read
<UniqueId>and thrown it away since the atlas shipped, on a line citing a committed artifact — there is no committed artifact, asspawnAtlasSource.jssays in its own header. It is the only name for one particular spawner that exists off the shard, so a property lease could not have had a dropdown without it.PARSER_VERSION→ 4 so an unchanged tree is re-read.uo.options.spawnersis the first searchable source and the first that had to be: 6,707 spawn points againstMAX_OPTIONS' 2,000, so a flat list would drop two thirds of the world and say nothing about which two thirds.One defect in already-merged code, and it would have broken everything
The protocol pin never left 5.
uo_link_config.protocolreaches the sidecar asX-UOLink-Versionon every REST call and an exact mismatch is a409, so from Phase 11a onward every sidecar call on a real deployment would have been refused — the whole event plane dead, loudly, for a reason nobody would look here for. 11a took the wire to 6 and 12a to 7; neither moved the pin, in either of the two places this repo declares it.It survived both because both live walks set the column by hand while standing the rig up, which is exactly what makes a migration nobody runs invisible. All three sites go to 7.
The test that guards them is worth understanding before trusting it:
schemaFragment.test.jsasserts the three declarations agree with each other — a real check they once failed — but all three being equally stale passes it, and nothing in this repo can anchor it to the wire. Recorded in the model's own header so the next reader knows.Checks
npm test: 620 pass, 0 fail (was 605).check:importsandcheck:externalsclean; the client builds and its 42 tests pass.check:swaggerreports the fragment stale — it is already stale onedge(verified by stashing this branch's changes and re-running), and this phase adds no route, so it is left alone rather than regenerated inside an unrelated change. Same as 12a.Two bugs the new tests caught in this branch's own code before it left:
counted()returns.countand the grant read.value, so every grant went out withamount: undefinedand the non-stackable guard never fired; andoptionalInt'sokwas ignored, so a bad hue passed silently instead of refusing.🤖 Generated with Claude Code
https://claude.ai/code/session_016wDDVXWMDz82WqE1i969r4