Repository navigation
refactor(core): redaction flag policy as its own module (#1520) - #1525
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Oct 22, 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.
What
update_memory_detaileddecided whichredacted/redactionsflags survive an edit with an inline five-armmatchinside a 200-line function. That policy is nowredaction_flags::resolve, a pure function (new content, caller metadata, current metadata, what was masked in, flags out), with the[REDACTED:literal as a named constant. The three flag helpers moved to the same module and are still reachable asuteke_core::privacy::{with,without,carry}_redaction_flags. Item 7 of the round-2 deepening epic (#1523).Why
The policy table could only be tested through a store. It is now tested rule by rule without SQLite, and
update_memory_detailedshrinks to validate, mask and write. No behaviour change. Refs #1520.Testing
-D warnings, fmt,cargo test --workspacepass;cargo run -p docgenchanges nothingprivacy_write_tests.rsandprivacy_field_tests.rspass unchanged and are the guard for equal behaviour