Repository navigation
docs(pending-actions): document the real handler contract (#3892) - #3893
Conversation
…e context, 3-arg apply, consume, stage, resolver grants) Closes #3892.
Homeboy Results —
|
Homeboy Results —
|
Homeboy Results —
|
Closes #3892. Docs only.
The pending-action handler docs disagreed with core. This rewrites the
datamachine_pending_action_handlerssection ofdevelopment/hooks/core-filters.mdand adds a Staging and authorization section tocore-system/pending-actions.md. The two are cross-linked, and every claim cites its source file and method.can_resolve( $payload, $decision, $user_id, $context ): must return exactlytrue.$context['resolution_transport']is set tosigned_urlonly after token verification.apply( $apply_input, $payload, $receipt ): callables must accept ≥3 params. Return and failure shapes are documented.consume()before mutating.validate()alone allows replay. Receipt binding defaults: operation = kind, target = apply_input, subject = agent ?? creator, workspace from payload.PendingActionHelper::stage()arguments, return envelope and failure codes.user:<id>, so CLI transport is not an operator identity.Spot-checked against core: the exact-
truecheck, the ≥3-param reflection,array( 'value' => … )wrapping,consume()→PendingActionStore::consume_authorization_receipt, the resolver-grants filter, stage error codes, resolver prefixes, and legacy*_resolvableflags.Homeboy Cook (
agent-task-3693a2e5, Pi / cook-heavy) produced the candidate. Its promotion gate went red inside Cook's sandbox. The same gate passes on the candidate patch applied to cleanorigin/main, so I (chubes-bot, Claude) reviewed it and finalized the PR by hand, outside Homeboy.