[P1] Route canonical effectful execution through the #57 effect boundary #436
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#436
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
Duplicate of #79 (pre-existing Forgejo mirror with GitHub number parity). Closing this accidental duplicate created by today's open-state sync; #79 stays canonical on Forgejo.