fix(rfc64): bind SWM retirement to current heads - #2038
Open
branarakic wants to merge 2 commits into
Open
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.
User impact
A node no longer hides a current Shared Working Memory (SWM) assertion merely because an older version of the same physical graph was retired. The query path now derives the authoritative SWM metadata graph through one canonical helper and excludes a graph only when the node-local retirement marker matches the highest durable assertion version. Production finalization wiring is also covered directly, so SWM retirement and VM materialization continue to share the Agent's write-lock map.
This is a correctness/hardening change. It does not broaden Edge subscriptions or enable all-CG synchronization.
Before
sequenceDiagram participant Q as Query engine participant M as SWM metadata participant L as Local retirement controls Q->>Q: Slice "/_shared_memory" manually Q->>M: Read every historical head row M-->>Q: v1 and current v2 Q->>L: Join any matching retirement version L-->>Q: v1 is retired Q-->>Q: Hide the entire current graphAfter
sequenceDiagram participant Q as Query engine participant C as Canonical URI helper participant M as SWM metadata participant L as Local retirement controls Q->>C: Map per-KA SWM graph C-->>Q: Exact sibling metadata graph Q->>M: Select MAX durable assertion version M-->>Q: Current v2 Q->>L: Match retirement marker to v2 only L-->>Q: No v2 marker Q-->>Q: Keep current SWM visibleWhat changed
Validation
Stacked on #2036. Addresses the remaining SWM retirement/query-wiring feedback from #2031.