feat(config): enable audit logging by default - #554
Conversation
LOGGING_ENABLED now defaults to true (bodies and headers were already true once enabled), and LOG_FORMAT defaults to text everywhere instead of auto-detecting JSON off-TTY - JSON stays available via LOG_FORMAT=json. A fresh install shows populated request logs and readable container output with zero configuration; explicit env/YAML values still win. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
📝 WalkthroughWalkthroughLogging is now enabled by default in configuration and documentation. The environment template adds ChangesLogging defaults and format selection
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Text-on-TTY / JSON-off-TTY auto-detect was the right default for log pipelines; only the audit-logging default change remains in this PR. The format-selection test stays, asserting the auto-detect behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.env.template (1)
278-280: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy liftMake full body capture an explicit opt-in.
LOGGING_LOG_BODIES=truepersists prompts and responses that may contain PII, credentials, or customer data for the default 30-day retention period. The warning is informative but does not prevent collection; keep body logging disabled by default or require an explicit privacy/compliance opt-in.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.env.template around lines 278 - 280, Update the LOGGING_LOG_BODIES setting in the environment template so full request/response body capture remains disabled by default and requires explicit opt-in. Preserve the existing warning and configuration key, but ensure the documented default does not enable sensitive-body logging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.env.template:
- Around line 278-280: Update the LOGGING_LOG_BODIES setting in the environment
template so full request/response body capture remains disabled by default and
requires explicit opt-in. Preserve the existing warning and configuration key,
but ensure the documented default does not enable sensitive-body logging.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e771a561-efc9-47fa-8f51-ccc7d15e2ed3
📒 Files selected for processing (3)
.env.templatedocs/advanced/configuration.mdxrun/logging_test.go
LOGGING_ENABLED / LOGGING_LOG_BODIES / LOGGING_LOG_HEADERS default to true since #554, so the quickstart commands (README, docs quickstart, docker-compose) no longer need to set them; prose that said audit data requires LOGGING_ENABLED=true now says it is on by default. LOG_FORMAT=text stays - containers still auto-detect to JSON without it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…art (#553) * docs(install): lead with the one-line installer in README and quickstart README Quick Start now opens with the macOS/Linux and Windows one-line installers, with Docker as the third labeled option (command unchanged). The docs quickstart presents the same three methods as tabs. Contextual docker-run examples in guides and provider pages are intentionally untouched - there they illustrate env-var configuration, not the recommended install path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(install): trim installer notes, drop broken star-history chart The PATH claim overstated what install.sh does (it only prints a hint when /usr/local/bin is not writable) - removed along with the other explainer notes; the commands speak for themselves. The star-history chart endpoint 404s, so the section is gone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: drop audit-logging flags that are now defaults LOGGING_ENABLED / LOGGING_LOG_BODIES / LOGGING_LOG_HEADERS default to true since #554, so the quickstart commands (README, docs quickstart, docker-compose) no longer need to set them; prose that said audit data requires LOGGING_ENABLED=true now says it is on by default. LOG_FORMAT=text stays - containers still auto-detect to JSON without it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
Makes audit logging the out-of-the-box behavior ("Use Good Defaults" - the demo experience should not require configuration):
LOGGING_ENABLEDfalsetrueLOGGING_LOG_BODIEStruein code (gated by enabled; docs wrongly said false)LOGGING_LOG_HEADERStruein code (gated by enabled; docs wrongly said false)A fresh
gomodelordocker run enterpilot/gomodelnow shows populated request logs / Interactions in the dashboard with zero-eflags.LOG_FORMATis left exactly as it was (auto-detect: text on TTY, JSON otherwise) - an earlier commit on this branch changed it and was reverted; a format-selection unit test asserting the auto-detect behavior remains.Behavior change to be aware of
Audit entries (with bodies and headers) are now written by default to the configured storage (30-day retention default; sensitive headers auto-redacted). Operators who do not want body capture set
LOGGING_ENABLED=falseorLOGGING_LOG_BODIES=false. Explicit env/YAML values override defaults in both directions, including explicitfalse.Changes
config:Logging.Enableddefault true (+ test)..env.template,config.example.yaml,configuration.mdx, CLAUDE.md (bodies/headers were documented as default-false while the code said true).run: new table-driven format-selection test (no behavior change).Testing
Pre-commit suite (race tests, lint) green; smoke-run verified
audit logging enabled log_bodies=true log_headers=truewith no env set.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation