ADR 0047 — Checking an action without running it (~act/<a>?check)
Status: accepted (2026-11-13; decisions delegated under ADR 0029).
Context
The MCP connector runs every change dry first: it reads the node’s ~meta, checks the
arguments against the action’s schema (types, enums, required, bounds) and shows the person
what would be sent. A link that parses its arguments further found errors only when the
action ran. In the DVPSM demo (2026-11-13) the dry run of add_bot {format: "html"} was “ok”,
and the bot refused the real call (format: one of html, markdown, plain: the messenger read a
typed enum by name). A dry run that says “ok” for what the link then refuses gives the person
a false sense that all is well.
The link is the only one that knows its own rules (its form parsing, the author’s rights of a template, its recipients, its network allowlist). It must be asked. Asking an older link is the danger: a selector parameter it does not know is ignored, and it would run the action.
Decision
- Spec 05 0.2.33:
get path/~act/<a>?checkwith the action’s arguments. The responder checks the call as the action would take it:ptokand the level, the arguments against the action’s meta, then its driver’s own check. It does nothing: no write, no command, no change of state. The answer isstatus=okwithout a payload, or the refusal the action would give (same status, same text). The audit recordscheck. - A responder that answers
checksays so:attr.check = trueon its root~meta(wy/<site>/downstream/<link>,sys,dataflows,storage). The SDK sets it on every root it declares, so every link built with this SDK has it. A requester sends?checkonly where the root says so; without it the check ends at the action’s meta on the requester’s side, as before. - SDK:
Link::on_check(path, action, args, who), defaultOk(the SDK’s checks are all there is). Portable links:App::on_check, defaultOk; the runtime runs it on the engine thread like an event and drops whatever the app asked of the host during it. The messenger implements it with the same parsing as its actions (bots, recipients, templates and their sends, chat users). - A WASM component of world
wyrm:app0.3.0 has no check call: its check ends at the meta (the host checks that). A component gets its own check with the next world; the world stays frozen until then (ADR 0030). - Gateway op
check {key, action, args}(rights asinvoke);WyrmClient::invoke_check;wyrm-gateway-client::Conn::check. The MCP connector’s dry runs ofaction_invokeand of a plan’sinvokesteps ask the link when it says it can and showchecked_by_link.
Consequences
- A dry run catches what the link would refuse, before anything runs.
- Links built before this have no
attr.checkand are never asked; they behave as before. checkcosts one request to the link and one audit record; it is rate limited as any call.- Tests: telegram
a_check_refuses_what_the_action_would_and_does_nothing, e2ea_check_does_nothing, wyrm-mcp gateway test (dry run withchecked_by_link).