feat(events): one lease and the participation verbs (Phase 11b)
The UO half of protocol 6 part b. No route added, no schema change, no
MODULE_API bump.
`uo.playercaps.skillcap` is the one lease, and the catalog is short because
ServUO made it short: of the 158 non-Bridge `Config.Get` call sites in
`Scripts/`, roughly eight are read live. This one is read inside
`CharacterCreation.cs`'s per-character path, so it is both live and observable --
which is what "proven" has to mean, since the failure an allowlist exists to
prevent is a key that applies cleanly and changes nothing.
Its `apply()` sends a DURATION rather than the deadline: an absolute time
computed here and honoured there is measured against two clocks, and a shard
running ten minutes fast would restore a ten-minute lease the instant it took it.
Its `restore()` turns `lease.drifted` into `{ drifted: true, current }` rather
than an error, because core records drift as a distinct successful outcome and an
error would put the row on the retry ladder. Its `inForce()` asks whether the
shard still HOLDS the lease, never whether the value still matches -- see the
core PR.
`uo.participation.open` / `.collect` count who took part and file them on the
success envelope. `open` is the one resource in this module that must NOT
reconcile by boot stamp: every other resource here lives in shard memory, so a
changed bootId IS the proof it is gone, while the participation ledger is written
into the world save precisely so it survives that restart. It asks instead.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -175,6 +175,10 @@ const engagementSeeds = require('./config/engagementSeeds')
|
||||
// module is willing to make unattended.
|
||||
api.registerEventBudgets(uoEventActions.BUDGETS)
|
||||
api.registerEventActions(uoEventActions.ACTIONS)
|
||||
// Phase 11b. One live-read config key, and the module never writes it: an author
|
||||
// puts `core.lease` in a step and core owns the duration bound, the
|
||||
// two-events-one-target check and the teardown restore.
|
||||
api.registerEventLeases(uoEventActions.LEASES)
|
||||
api.registerEventOptionSources(uoEventActions.OPTION_SOURCES)
|
||||
|
||||
api.onBoot(boot.onBoot)
|
||||
|
||||
Reference in New Issue
Block a user