fix(agent): keep finalized SWM retirement locally authoritative - #2031
Open
branarakic wants to merge 3 commits into
Open
fix(agent): keep finalized SWM retirement locally authoritative#2031branarakic wants to merge 3 commits into
branarakic wants to merge 3 commits into
Conversation
This was referenced Aug 3, 2026
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.
Stack
codex/rfc64-m1-shutdown-budget(stacked; nottestnet-canarydirectly)User impact
Before this PR, a graph-scoped assertion that reached VM remained visible in both VM and the user-facing SWM view. The first implementation hid it with a marker in syncable SWM metadata, which meant a peer-imported marker could incorrectly hide data on a receiver that had not materialized VM.
After this PR:
shared-working-memory;Before
sequenceDiagram participant Peer participant Receiver participant Store participant User Peer->>Receiver: Sync SWM data plus sharedMemoryFinalized marker Receiver->>Store: Persist data and syncable marker User->>Store: Query shared-working-memory Store-->>User: Snapshot hidden although local VM is absentAfter
sequenceDiagram participant Peer participant Receiver participant Finalizer participant LocalTrust participant User Peer->>Receiver: Sync SWM data and peer metadata Receiver->>Receiver: Peer marker has no local authority User->>Receiver: Query shared-working-memory Receiver-->>User: Synced snapshot remains visible Finalizer->>Finalizer: Verify exact current head and content under shared KA lock Finalizer->>LocalTrust: Write local graph plus assertion-version marker User->>Receiver: Query shared-working-memory Receiver->>LocalTrust: Join marker to current durable head version Receiver-->>User: Locally finalized snapshot hidden Finalizer->>LocalTrust: Clear exact version after receipt invalidation Receiver-->>User: Recovery snapshot visible againSafety properties
LOCAL_TRUSTED_KA_CONTROLS_GRAPH, outside every syncable CG namespace.Verification
tsc, type tests, package-root): passedgit diff --check: passedCanary plan
After the stack is review-clean, deploy the exact child-stack commit only to the isolated local Publisher/Edge and isolated remote Core. Re-run the externally anchored five-graph M1 corpus, then a bounded soak. Production Core processes remain out of scope.