feat(web): the borrowed planes and the one-shots on the wire (Phase 12b) #39
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, sidecar half. One of five:
website(website#194),servuo-plugins(servuo-plugins#24),link,Module-uo(#—),docs(docs#222). Spec of record:docs/link/v7.md§11–§13.PROTOCOL_VERSIONstays 7. 12b amends 7 in place rather than bumping again, tolerable for the single reason 6 and 7 already are and no other: nothing is released fromedge.The lease family gains a
target, not a family of its ownA property lease, a seasonal toggle and a config key are one protocol with three catalogs — so there is one deadline, one compare-and-set, one grace window and one set of counters instead of three of each.
GET /lease?key=&target=current; always carriesholdsPOST /leasetargetaddedPOST /lease/releasetargetadded; may answertargetGoneGET /itemsPOST /items/grantPOST /world/saveA targeted key needs the narrowing.
Spawner.MaxCountis one capability over thousands of spawners, so it has no singlecurrentand the catalog walk cannot fill one in — while the website'sread()needs exactly one value for exactly one target before it applies anything.The frame also always carries
holds: every lease the shard is actually holding, whatever key or target. A catalog walk can enumerate the keys but never the holds on a targeted one — there is no list of spawners to walk — so without it a reconcile after an outage would have no way to ask "what are you still holding?".inForce()reads that.POST /items/grantnames a run and never a recipient list. The shard has held the run's participation ledger since protocol 6 part b, keyed by the same character serials the website'smember_keyholds, so sending a list would put it on the wire twice with a window in which the two disagree.Two status mappings are the point of the diff
A run with no ledger open is a 404 and a run whose ledger is open and empty is a 200 with
granted: 0. "You never told me to count" and "nobody came" are different facts, and only the first is a mistake — an event nobody attended still happened, and answering it as a failure would have the module retry against a ledger that will be just as empty next time.A save refused for coming too soon is a 429, not the 400 every other refusal on this plane is. It is the one refusal here that the same request gets past by waiting, so 429 says exactly that — and keeps it out of the module's permanent-status set, which is what makes a phase boundary retried rather than abandoned.
Tests
cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo testall clean: 51 passed (was 49). The two new tests pin those two mappings, including the pair that look alike and are not (404againstgranted: 0), and that the gate being off is still a 403 on this plane.Also exercised end to end against the real local ServUO 57.4 world driving this binary's REST — including that
/world/saveis not eaten by/world/:run_idnext door, which is the one thing about this route table worth checking rather than reasoning about. See servuo-plugins#24 for the walk.🤖 Generated with Claude Code
https://claude.ai/code/session_016wDDVXWMDz82WqE1i969r4