Repository navigation
Restoration and consolidation enforce the current blacklist - #923
Merged
Merged
Conversation
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…estoration Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ites Signed-off-by: zlareb1 <[email protected]>
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.
Changelog category (leave one):
Changelog entry
Restoring deleted or retired memories, restoring namespace snapshots, rolling back heads and writing consolidated summaries enforce the target namespace's current blacklist. A refused value cannot return through a restoration retry that repairs its search document.
Why
Historical copies and generated summaries wrote memory rows without the blacklist check used by ordinary writes. This allowed a value refused by the current policy to become live again.
Scope and risk
The guard checks the bytes being copied, including encoded strings and anchored regular expressions. An Undo checks before its acceptance record. Namespace restore checks its complete payload before creating a namespace or grants, then rechecks all values after its own grant writes move the admission generation. Rollback checks every planned live reinstatement in bounded slices before writing its first batch, using one captured policy across the pass. Each write batch still reads current heads; tombstone-only writes remain allowed.
Under Postgres, commits carry the policy generations captured before checking their values. A policy change refuses the commit. Consolidation records a blocked summary as an unsuccessful cluster without embedding it or retiring its sources.
Existing lifecycle unit tests explicitly isolate the refusal component while retaining their field and ordering assertions. Separate regressions exercise the actual guard and policy admission. Snapshot insertion always checks all values and accepts no prechecked policy override.
Compatibility, rollout and rollback
422 BLACKLISTED; a policy changed during Postgres admission returns a retryable refusal.Tests
AI assistance in the code
AI-generated: Codex wrote the diff and checked the guard ordering, stored value bytes, policy admission and focused regression results.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist