Conversation
There was a problem hiding this comment.
Pull request overview
Adds API support for suppressing redaction per data class and for querying whether a class would be redacted, enabling fast-path handling for non-redacted classes.
Changes:
- Introduces
RedactionEngineBuilder::suppress_redaction()and internal suppression tracking. - Adds
RedactionEngine::would_redact()/ innerwould_redact()to query redaction behavior. - Refactors redaction internals by moving the
Redactortrait and splitting engine builder/inner into separate modules.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/data_privacy/tests/redaction_engine.rs | Adds integration tests for suppression/would_redact behavior. |
| crates/data_privacy/src/redactors/redactor.rs | Extracts Redactor trait into its own module. |
| crates/data_privacy/src/redactors/mod.rs | Re-exports Redactor and updates tests after refactor. |
| crates/data_privacy/src/redaction_engine_inner.rs | New internal storage supporting suppressed classes and would_redact. |
| crates/data_privacy/src/redaction_engine_builder.rs | New builder module adding suppress_redaction. |
| crates/data_privacy/src/redaction_engine.rs | Wires engine to new inner/builder and exposes would_redact. |
| crates/data_privacy/src/redacted.rs | Doc comment wording tweak (“returns Err” vs “should return Err”). |
| crates/data_privacy/src/lib.rs | Exposes new builder module and internal refactor modules. |
| crates/data_privacy/README.md | Updates docs.rs links/version metadata to 0.11.0. |
| crates/data_privacy/Cargo.toml | Bumps crate version to 0.11.0. |
| crates/data_privacy/CHANGELOG.md | Adds 0.11.0 changelog entry. |
| Cargo.toml | Bumps workspace dependency version for data_privacy to 0.11.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #332 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 205 207 +2
Lines 15367 15399 +32
=======================================
+ Hits 15367 15399 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add RedactionEngineBuilder::suppress_redactions() to allow users to specify that redaction should be skipped for a specific data class. This would typically be used for things that are classified as public for example. - Add RedactionEngine::would_redact() to allow users to check if a specific data class would be redacted or not. This enables fast path optimizations for non-redacted data.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- ✨ Features - Support redaction suppression. ([#332](#332)) - 🐛 Bug Fixes - restore const on UriSafeString::from_static ([#328](#328)) - 📚 Documentation - fix BaseUri docs to reflect path prefix support ([#327](#327)) - ♻️ Code Refactoring - use re-exported macros instead of importing templated_uri_macros directly ([#324](#324))
Add RedactionEngineBuilder::suppress_redaction() to allow users to specify that redaction should be skipped for a specific data class. This would typically be used for things that are classified as public for example.
Add RedactionEngine::would_redact() to allow users to check if a specific data class would be redacted or not. This enables fast path optimizations for non-redacted data.