docs(events): Phase 7 as built — the module contract at MODULE_API 1.10.0 #215
Reference in New Issue
Block a user
No description provided.
Delete Branch "docs/events-phase-7"
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?
The docs half of Event System Phase 7. Code: RunicGateway/website#189.
MODULE_API.md1.10.0 arrives in three places — the number itself, the Part 1 entry, and §2.4.
The Part 1 entry carries the four call shapes and, more usefully, the six rules that come with them, because each is a rule rather than a field: no shape a failure can take reads as success (
registerTeamProvider's default inverted, and why); a module cannot spend a budget it did not declare;verify: truemust change nothing and rides the same dispatcher a real run uses;exampleis required on every param including the optional ones; the four id spaces are four; and a lease is declared at 1.10.0 and acquired by nothing — with the reason it is in this version rather than the next.It also says the thing that makes the bump smaller than it looks: only one of the four names is new machinery. The action registry has staged core's three actions on every boot since Events Phase 1 and simply had no way in. That is
registerCore()'s argument from the module system's Phase 3, and this is where it pays.§2.4 gains the four names in the call list, and four notes that are contract rather than implementation: an action is core calling the module, from further away than any other member (hence
budgetMsper action, and what happens without it);onceon all four and why a second call is a module changing its mind; everything is optional, stated once because it governs every member; and an option source that refuses degrades its field rather than blocking the form. Plus the dormancy rule an action inherits from a trigger — a saved step keeps an unregistered action, a new step may not add one, and a dormant step blocks the publish.EVENTS.md§F is marked built, with a note that the seam is narrower than the four names suggest, and a new subsection recording what the build settled:
unitis required and its vocabulary is open — core renders it, never reads it.costis a function of params and calling it is the only honest way to ask.restoreis required even thoughreadcould stand in for it — they answer different questions, and the drift check is the one thing a module must not be allowed to skip.200. Both halves are the contract; a status code is how a client tells "broken" from "nothing to offer".core.options.legs, so the seam's first exercise is not a module's — and so thelegtypo Phase 6's walk caught mid-run is caught in the form.§K's Phase 7 note becomes what shipped rather than what was promised: half of it was replaced by
registerEventBudgets, half of it deliberately survives, and the paragraph now says which half is which.§ API surface: the option-source row is filled in with what it actually does and why a refusal is a
200; the catalog row gainsbudgets,leasesandoptionSourceswith the reason they are served beside the actions (the step editor needs all four to draw one step); and the absent-routes list is down tocleanup. The phase table: P7 ticked.EVENTS_PLAN.mdPhase 7 marked complete, in the shape Phases 0–6 use: the four org-lead decisions, the three things the build settled, the throwaway-module proof and why it uses the real loader, the verified numbers, and the live walk.
Including the two findings worth reading before the diff:
setSourcesupdater and read the flag on the next line.setSourcesqueues its updater, so the flag was always false and the request was never made — the field sat on "Reading the list…" for ever, with every server test green and the route answering correctly undercurl.GET /admin/events/catalog/options/:sourceId; it was built one segment shallower, and the divergence surfaced only when this half was written.Checked by hand
docshas no CI, so: every anchor introduced here resolves (#f--the-module-contractand#k--security-modelwere already in use; no new anchors were added), and every route, identifier, env var and file path named here exists on website#189 —registerEventBudgets,registerEventLeases,registerEventOptionSources,core.options.legs,budgetsOf,resolveOptionSource, and the route in bothroutes.manifest.jsonand the OpenAPI spec. Diff is 86/11, 110/0 and 123/1 across the three files with no CRLF artefact, verified by comparing--numstatagainst the real content diff rather than trusting it.