feat: add runtime rendered-text diagnostics - #17
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
✨ Finishing Touches🧪 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. Additional details and impacted files@@ Coverage Diff @@
## master #17 +/- ##
==========================================
+ Coverage 99.26% 99.33% +0.06%
==========================================
Files 34 34
Lines 4091 4368 +277
Branches 242 255 +13
==========================================
+ Hits 4061 4339 +278
+ Misses 19 18 -1
Partials 11 11 ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
Pull request overview
Adds a runtime-controlled “rendered text diagnostics” capability so operators can temporarily log sensitive rendered bodies (briefing/alert/verbatim and Telegram chunks) without restarting the daemon, with guardrails documented for privacy and operations.
Changes:
- Introduces a SQLite-backed runtime diagnostics switch (
rendered_text) with CLI enable/status/disable commands and TTL semantics. - Adds stage-level, non-sensitive delivery diagnostics across RSS parsing, verbatim publication, and Telegram chunking; optionally logs full rendered bodies when enabled + DEBUG.
- Expands automated tests and updates README + design/requirements docs to describe the operational/privacy contract.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| weather_briefing/state.py | Adds SQLiteRuntimeDiagnostics to persist the runtime diagnostics switch in SQLite. |
| weather_briefing/sources.py | Adds DEBUG logs for parsed RSS articles (non-sensitive metadata/lengths). |
| weather_briefing/service.py | Adds verbatim publication logs (stage and non-sensitive lengths). |
| weather_briefing/publishers.py | Adds diagnostics plumbing and sensitive rendered-text logging gated by runtime switch + DEBUG; adds Telegram chunk logging. |
| weather_briefing/config.py | Extracts state_path_from_env() for shared state-path resolution. |
| weather_briefing/cli.py | Adds diagnostics rendered-text subcommands and wires runtime diagnostics into delivery without daemon restart. |
| tests/test_state.py | Adds tests for enabling/disabling, cross-connection visibility, and expiry behavior. |
| tests/test_sources.py | Updates RSS test to assert new diagnostic log line content. |
| tests/test_service.py | Updates service test to assert new verbatim publishing diagnostics. |
| tests/test_publishers.py | Adds tests ensuring sensitive logging gating, failure handling, and Telegram chunk diagnostics. |
| tests/test_cli.py | Adds CLI parser + command behavior tests for rendered-text diagnostics. |
| README.md | Documents how to use rendered-text diagnostics and the associated privacy implications. |
| docs/requirements.md | Formalizes requirements for sensitive rendered-text diagnostics behavior and safety constraints. |
| docs/design.md | Documents design for runtime switch, delivery-stage logging, and failure behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fc017e0 to
362cccf
Compare
362cccf to
1bf6a0f
Compare
Log cleaned RSS content length, verbatim rendering size, and Telegram chunk acceptance without recording source content or private delivery values. This identifies the stage responsible for title-only messages.
1bf6a0f to
de46e6c
Compare
Summary
diagnostics rendered-text enable/status/disablewithout restarting the daemonCommit structure
chore: add verbatim delivery diagnostics— safe lengths and delivery-stage logsfeat: add runtime rendered-text diagnostics— CLI, TTL state, sensitive logging, failure isolation, tests, and docsVerification
Review status