Repository navigation
Add keep strategy for conditional column passthrough (#77) - #78
Merged
Merged
Conversation
Allow leaving selected column values unchanged via column_cases while a default rules entry still scrubs other rows (e.g. staff email allowlists). keep is restricted to column_cases, rejects domain/options, preserves exact INSERT/COPY cell bytes, and counts toward strict coverage without marking cells as changed. Co-authored-by: andy <andy@wearecrew.com>
Tighten the staff-email keep pipeline test to assert redact output instead of NULL, and remove redundant format! borrows that fail clippy -D warnings. Co-authored-by: andy <andy@wearecrew.com>
ababic
marked this pull request as ready for review
August 14, 2026 15:46
This was referenced Aug 14, 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.
Summary
Implements #77: an explicit
keepanonymization strategy socolumn_casescan leave selected cell values unchanged while a default[rules]entry still scrubs the same column for other rows (e.g. staff email allowlists).Behavior
strategy = "keep"leaves the original INSERT/COPY cell bytes unchanged (including SQLNULL/ COPY\N)[column_cases](rejected as a blanket[rules]default to avoid accidental no-ops)domain,as_string, and other strategy options (like other constant strategies)--strict-coverage/[sensitive_columns]--check/ reportsExample
Test plan
keeppreservation / no max-len truncation[rules], allow undercolumn_cases, rejectdomainilikecases + strict-coverage assertioncargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --all-targets --all-features(152 passed)--strict-coverageclean;keepunder[rules]rejectedSmoke output excerpt: