Repository navigation
feat(core): filter tags, metadata strings and source, and report masked updates (#1464, part 2c) - #1511
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
Closes the gaps listed in the 2b-1 CHANGELOG entry. The privacy filter now also covers the tags, every string inside the metadata and the
sourceonremember,remember_with_contradiction, room remember,update,import,set_sourceand room consolidation (ConsolidationStore::insert_memory); counts are merged intoredactionsand strict mode refuses the write (the HTTP and CLI source is checked before anything is stored). Newupdate_memory_detailedreturns anUpdateOutcome(what was masked);update_memorykeeps its signature.PUT /memoryreturnsredactedanduteke_updateover MCP says when it masked something. Importing a structural export (export --full) restores a backup as it was and is deliberately not filtered; this is documented.Why
Part of #1464: a secret in a tag, a metadata string or a source would otherwise still be persisted and indexed. Refs #1464.
Testing
-D warnings, fmt,cargo test --workspaceandcargo run -p docgen(no diff) passprivacy_field_tests.rs(tags and metadata on remember, strict, update, source, import), 1 consolidation, 1 server (PUTredacted, strict source and metadata) and 1 MCP (masked update)