Repository navigation
feat(core): add durable operation replay protection - #99
Open
Alfazal007 wants to merge 2 commits into
Open
Alfazal007 wants to merge 2 commits into
Alfazal007 wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repeated resource operation IDs currently call the provider twice. Add kernel-owned replay gates for execution, tool-call, resource-operation and message identities, backed by a host-owned durable
ReplayStore. Atomic claims block concurrent duplicates, conflicting input is rejected, and retained terminal results are replayed without repeating effects.ADR 0028 defines tenant scoping, canonical fingerprints, pending/failed/interrupted states, permanent identity tombstones, result expiry, fenced crash recovery and ambiguous external effects. Standard resource tools derive provider IDs from their full execution identity; messaging claims both direct and nested deliveries. Testkit supplies an isolated in-memory adapter.
Protocol v1 activation is opt-in through
SharedOSKernelOptions.replayStore; omission preserves legacy unprotected behavior. Production hosts must install a durable adapter. ADR 0019 now freezes protocol"1"at the1.0.0-previewshape. Mandatory activation remains a future coordinated semantic protocol migration; this change does not assume epoch 2 or/v2routes. No exactly-once claim is made for external systems. Grant reservation and audit transactions remain outside this change.Validation:
pnpm typecheck,pnpm format:checkandgit diff --checkpassed.pnpm checkwas attempted, then stopped at the user's request to avoid heavy suites on this machine. The full conformance and final aggregate checks are not claimed as passed.Pre-existing/environment issues: the initial check could not start because dependencies were absent (resolved with a frozen install). TypeDoc's Git repository detection ignores worktrees whose
.gitis a file, removing source links even for unchanged APIs; regenerated API references preserve the existing canonical links. These are separate from replay test results.Merge integration: merged
mainatd9e2ea4and resolved the generated API conflicts. Replay scoping now follows trustedAccessContext.executionId, and the executor normalizes context execution identity before fingerprinting and claiming a turn. Added focused regressions for both cases.Post-merge validation: 37 replay/testkit tests plus 6 selected turn-isolation regressions passed, all with one worker. Type checking, formatting and conflict/whitespace checks passed. No full test or conformance suite was run, honoring the machine-resource constraint.