[P1] Route canonical effectful execution through the #57 effect boundary #79
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Parent / blocker: #57
Goal
Adopt the durable effect-identity / observation substrate from #78 across the canonical effectful execution paths in
prolog-rlm, without creating another ledger and without breaking the existing #53 authority or #54 async architecture.This issue remains open because the generic substrate and the canonical tool-path slice are merged, but provider, MCP, lifecycle/process, and external integration adoption are not complete.
Current state — 2026-08-19
Canonical
mainnow includes:rlm_toolexecution through the #57 prepared-ticket boundary before handler mutation.The #86 slice preserves exact Ticket-A authority/admission semantics, stable trusted executor identity, fresh-read behavior, structured preparation errors, conservative replay/uncertainty behavior, and crash/adversarial coverage. Its reconstructed exact head passed the normal CI and Tree-sitter workflows before merge.
Remaining #79 work:
Required invariant
For every canonical externally effectful operation in scope for durable identity:
A sync wrapper, async wrapper, Prolog backtracking, retry wrapper, graph/agent wrapper, or fresh-process restart must not create another implicit submission for the same admitted attempt.
Pure/read-only operations do not need indiscriminate memoization. Fresh-read policy remains explicit.
Architecture constraints
Preserve #54
Keep one canonical execution direction. Do not introduce a second sync implementation. Internal code already running inside a bounded async worker must call the trusted execute ABI directly rather than nesting Future waits.
Preserve #53
Capability/schema/hard-policy validation remains before authority. Authority remains host-controlled. Changed executable payload, edit, retry, or resample must receive identity and authority appropriate to the new normalized operation.
allow_oncemust not leak to retry/resample.dangerousmust not bypass effect identity, confinement, accounting, or persistence. Do not buildauthority_v2.Do not create another effect ledger
Provider/tool/MCP-specific code should implement static code-owned adapters or an equivalent narrow integration over the #57 executor. Domain job IDs and provider/MCP request IDs are provenance/reconciliation inputs, not a second generic once-only system.
Conservative remote uncertainty
Transport failure after durable dispatch is not proof the effect did not happen. If a provider/protocol has no reconciliation API, retain the admitted attempt as indeterminate rather than automatically resubmitting it.
Implementation slices
Canonical tool path — DONE in #86
rlm_toolexecution crosses #57 after normalization/preflight and before mutation;Model/provider path
MCP request + lifecycle path
External process/network/repository-mutation integration contract
Required tests for remaining slices
Tests must use externally meaningful counters/state, not only ledger internals.
Concurrency tests must use deterministic synchronization, not sleeps.
Acceptance criteria
rlm_tooleffectful execution no longer jumps directly from authority toperform_tool_effectwithout #57 admission. (#86)allow_once,allow_session, anddangerousacross all adopted paths.Non-goals
References
Post-merge adversarial review of #78 found substrate blockers that should land before this canonical-adoption issue starts wiring real effectful paths:
#82 is a P2 accounting/history crash-consistency follow-up and does not necessarily block the first #79 implementation slice if #44/#45 do not consume the event stream as authoritative yet.
Treat #80 and #81 as pre-adoption blockers for #79. #57 remains open.
Predecessor hardening is complete: PR #83 merged to
mainas6c60924cef7a03b9d483e4691646d4d56a13c0f3, closing #80/#81/#82.#79 remains open and is now expected to adopt these hardened contracts:
rlm_effect_executor:effect_prepare/5before #53 authority composition;abandonedas retry authorization;No canonical provider/tool/MCP path was changed by #83. The full deterministic and REAL OpenRouter gates passed on its exact final head.
Migration prerequisite #84 is complete via PR #85 (merge commit
88433863056cd39a1d152db2c0a3cbf1a7f43fc0).Before #79 adopts the hardened substrate, operators with any non-empty PR #78 journal must run the explicit offline workflow documented in
docs/effect-migration.md:Unresolved legacy attempts require an operator-reviewed, digest-bound adapter manifest before trusted reconciliation; migration never guesses the adapter and never invokes a provider. In-place replacement requires a verified byte-exact backup. Migrated legacy admitted attempts cannot be freshly dispatched, and all post-migration external work must receive normal v2 namespace/epoch identity.
#79 remains open and is still the separate canonical provider/tool/MCP/process adoption slice. #57 remains open.