feat(sidecar): carry the event plane (Phase 11b) #37
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/events-p11b-leases-participation"
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_PLAN.mdPhase 11b, the sidecar half. Protocol 6 amended in place, soPROTOCOL_VERSIONis unchanged —v6.md§7 says why that is safe onedgeand would not be onmain.Six routes, one new responder, no store migration and no new machinery. One file.
event_callisadmin_callwithout the requiredactorDeliberately. Every verb behind the admin plane is a staff member pressing a button, and the shard's audit trail has to name them. An event verb's author is a run, which the body already carries as
runId— demanding a human name for something no human is doing would have the runner inventing one.Everything else is the same, including the
idempotencyKeypassthrough, and for the same reason 11a wrote down: the key is one of the body's remaining fields, and a refactor narrowing this to a known field list would silently turn every retried lease back into a possible duplicate with nothing here failing.respond_event, the fourth responderIt exists for two mappings the generic one gets wrong.
lease.driftedis a 200. The shard was asked to compare and set, it compared, and it declined to overwrite somebody's deliberate change — that is the mechanism working, andcleanup.json the website recordsdriftedas a distinct successful outcome rather than an error. It is also why this is not a 409: 409 is the protocol-version gate's, and a version mismatch and a moved value want opposite dispositions from a caller. Exactly the argument protocol 6 already made forbridge.busybeing a 425.The event plane being switched off is a 403, not the 400 the generic responder's reason-sniffing would produce.
Bridge.EventsEnabledis an operator's deliberate refusal to let the website change their world on a schedule; telling the website it sent a bad request would send an administrator hunting a bug in a step that is written correctly.The routes
GET /leaselease.listread()and its newinForce()— splitting them would be two round trips for one keyPOST /leaselease.applyholdMsis authoritative,untilMsis displayPOST /lease/releaselease.releasePOST /participationparticipation.openPOST /participation/:runId/snapshotparticipation.snapshotPOST /participation/:runId/closeparticipation.closesnapshotis a POST for a read, and the reason is the phase's headline: it carries the caller'sidempotencyKey, and on a well-attended run the shard walks its members across Core ticks rather than in one inbound call — so a repeat arriving mid-walk is answeredbridge.busy. A read that can legitimately be refused as a repeat in flight is not a GET.Verification
cargo test— 47 pass, 0 fail (4 new):bridge.busy→ 425 on the new responder as well as the other three; a drifted lease is a 200 and explicitly not a 409; the event gate being off is a 403 on bothlease.errorandparticipation.error; an unknown lease key and an unknown run are 404s while other refusals are 400s.cargo fmt --checkandcargo clippy --all-targets -- -D warningsclean.--versionreportsprotocol 6, and every claim in the plugin PR's table was collected through these routes.bridge.busywas reachable live for the first time, and it immediately failed. It came back 200, not 425 — because the shard's frame carried twokindfields and this side takes the last. That is a plugin defect (servuo-plugins#22has it), and nothing here changed: the mapping was right, it was simply never being handedbridge.busy. Worth recording on this side too, since the sidecar is where the wrong answer surfaced.Plugin: RunicGateway/servuo-plugins#22 · Core: RunicGateway/website#193 · Module: RunicGateway/Module-uo#30 · Docs: RunicGateway/docs#220
🤖 Generated with Claude Code