Implement RFC-023 substrate-native key-conflict fencing#359
Merged
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.
Summary
idas Lance's unenforced PK, and every production strict insert/upsert uses the sealed exact-idfilter-bearing adapteromnigraph.insert_absence=v1certificate and the provenance-proven BranchMerge publisher, with complete-history validation, source/target incarnation fences, bounded transaction chains, and safe ordered-diff fallbackKeyConflict,ResourceLimitExceeded, effect-aware retry/recovery behavior, and the corresponding CLI/HTTP/OpenAPI contractsCorrectness boundaries
idfiltered LanceUpdatetransactions with zero transparent retriesAcceptance evidence
The predeclared five-pair production series passed both fixed gates:
Both are below the 5× latency and 64 MiB RSS-overhead gates. All 20 aggregate records, 60 setup/operation/verification child phases, exact-content checks, and route assertions passed. The exact seeds, order, tree, binary digest, raw arrays, and preserved negative diagnostics are recorded in RFC-023 §11.4.
Validation
cargo test --workspace --lockedcargo fmt --all -- --checkscripts/check-agents-md.shmerge_fast_forwardandforbidden_apissuitesGreptile Summary
This PR implements substrate-native key-conflict fencing for graph writes. The main changes are:
idkeys.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant C as Writer participant S as Staging participant R as Recovery intent participant L as Lance table participant M as Manifest C->>S: Prepare bounded keyed write S->>L: Validate exact id key S->>R: Arm recovery intent S->>L: Commit filtered transaction(s) alt Effect-free conflict S->>R: Retire intent S-->>C: KeyConflict else Ambiguous or partial effect S-->>C: RecoveryRequired else Effects confirmed S->>M: Publish graph state S->>R: Remove intent S-->>C: Success end%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant C as Writer participant S as Staging participant R as Recovery intent participant L as Lance table participant M as Manifest C->>S: Prepare bounded keyed write S->>L: Validate exact id key S->>R: Arm recovery intent S->>L: Commit filtered transaction(s) alt Effect-free conflict S->>R: Retire intent S-->>C: KeyConflict else Ambiguous or partial effect S-->>C: RecoveryRequired else Effects confirmed S->>M: Publish graph state S->>R: Remove intent S-->>C: Success endReviews (2): Last reviewed commit: "chore: remove unrelated rustfmt churn" | Re-trigger Greptile
Context used: