[P1] Bind effect identity to a durable store namespace and safe store lifecycle #81
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#81
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?
Discovered by
Post-merge adversarial review of PR #78 / #57.
This should be resolved before #79 routes real provider/tool/MCP effects through the substrate at scale.
Problem 1: independent stores derive identical remote idempotency keys
Current automatic identity is content-derived:
No durable store/project/runtime namespace participates in the identity.
Therefore two independent ledger files executing the same initial request/semantics derive the same
attempt_idand provideridempotency_key. If a remote provider scopes idempotency keys more broadly than one local ledger, an operation in store B can be deduplicated against an unrelated operation from store A.The same problem appears after explicit pruning: recreating the same initial logical call derives the old idempotency key again even though local replay state was intentionally removed.
Problem 2: store switching is not bound to an in-flight executor attempt
effect_persist_open/1supports switching the globally attached store, while adapter submit runs outside the persistency mutex afterdispatchingis recorded.A concurrent host store switch can therefore occur between:
At best this loses the immediate observation and leaves A requiring reconciliation. If B contains the same deterministic attempt ID, the combination with Problem 1 can cross-contaminate attempt/observation state between otherwise independent ledgers.
Required design
Choose and document one coherent model. A likely direction is:
Do not solve this with process-local random IDs that change on restart.
Required tests
Non-goals
Refs #57 #79 #80