Repository navigation
Protect critical Logfire metadata from string transforms - #2816
Merged
Merged
Conversation
alexmojaki
commented
Nov 16, 2026
| result: dict[Any, Any] = {} | ||
| for k, v in cast('Mapping[Any, Any]', value).items(): | ||
| if k in BaseScrubber.SAFE_KEYS: | ||
| if path == ('attributes',) and k in BaseScrubber.NO_TRANSFORM_KEYS: |
Contributor
Author
There was a problem hiding this comment.
skip the extra check, keep it simple and cheap
Contributor
Author
There was a problem hiding this comment.
as in the root thing
Contributor
Author
There was a problem hiding this comment.
(AI) Addressed in 1296758. Removed the path check and updated the test.
Contributor
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
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
transform_string.logfire.json_schemaandlogfire.scrubbedexempt from pattern matching while allowingtransform_stringto process their string values.logfire.level_nameconstant without editing generated.pyifiles, per AGENTS.md.This is PR 3 of the scrubbing-policy split. It is independent of the GenAI message and OpenAI/Anthropic scope changes in #2801.
Verification
uv run pytest -q -p no:cacheprovider tests/test_secret_scrubbing.py(74 passed)