feat: add logging policy controls#128
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1286b502a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| log = _as_bool(mapping.get("log"), base.log) | ||
| database = _as_bool(mapping.get("database"), base.database) | ||
| signal = _as_bool(mapping.get("signal"), base.signal) |
There was a problem hiding this comment.
Restore sinks when re-enabling logging
When a base/default policy or earlier rule sets log: False, __post_init__ also turns database and signal off. A later, more-specific rule or callable that returns only {"log": True} then inherits those disabled sinks here, so the middleware passes the not policy_decision.log check but writes to neither the database nor the signal. This breaks common deny-by-default/allow-specific configurations unless every allow rule also remembers to set both sinks back to True.
Useful? React with 👍 / 👎.
No description provided.