fix: fail closed on invalid debug logging flags - #4557
Closed
sylvesterkaczmarek wants to merge 2 commits into
Closed
fix: fail closed on invalid debug logging flags#4557sylvesterkaczmarek wants to merge 2 commits into
sylvesterkaczmarek wants to merge 2 commits into
Conversation
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.
This pull request fixes parsing of the privacy-oriented
OPENAI_AGENTS_DONT_LOG_MODEL_DATAandOPENAI_AGENTS_DONT_LOG_TOOL_DATAenvironment settings so malformed values do not silently enable sensitive logging._debug_flag_enabled()now trims surrounding whitespace, recognizes explicit1/trueand0/falsevalues, and falls back to the caller-supplied default for any unrecognized value. Because bothDONT_LOG_*settings usedefault=True, a typo or deployment value such as" true "now preserves redaction instead of flipping it off.Valid existing configurations retain their behavior. Focused regression coverage exercises whitespace-padded true/false values and invalid values for both model-data and tool-data logging controls.
This pull request resolves #4554.