Skip to content

feat: add runtime rendered-text diagnostics - #17

Merged
IceCodeNew merged 2 commits into
masterfrom
codex/runtime-rendered-text-diagnostics
Jul 14, 2026
Merged

feat: add runtime rendered-text diagnostics#17
IceCodeNew merged 2 commits into
masterfrom
codex/runtime-rendered-text-diagnostics

Conversation

@IceCodeNew

@IceCodeNew IceCodeNew commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • add non-sensitive stage diagnostics across RSS cleaning, verbatim delivery, rendering, and Telegram chunk acceptance
  • add a SQLite-backed runtime switch for sensitive rendered-text and Telegram chunk logging
  • expose diagnostics rendered-text enable/status/disable without restarting the daemon
  • expire the switch automatically after at most 24 hours
  • fail fast and continue normal delivery when diagnostics initialization or state reads are unavailable
  • document the operational, observability, and privacy contract

Commit structure

  1. chore: add verbatim delivery diagnostics — safe lengths and delivery-stage logs
  2. feat: add runtime rendered-text diagnostics — CLI, TTL state, sensitive logging, failure isolation, tests, and docs

Verification

  • 103 focused CLI/state/publisher tests passed
  • 330 full tests passed with branch coverage
  • line coverage: 99.59%
  • branch coverage: 97.84%
  • Codecov project coverage increased by 0.06 percentage points
  • Ruff, formatting, ty, gitleaks, zizmor, and all prek hooks passed
  • CI passed on Python 3.11–3.14 across Ubuntu and macOS
  • CodeQL and Codecov checks passed

Review status

  • GitHub Copilot reviewed the final head; all threads are resolved
  • automatic CodeRabbit review was triggered at ready-for-review, but the service reported that the PR review limit was reached
  • a separate CodeRabbit CLI review and autofix audit produced no applicable changes or current CodeRabbit threads

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@IceCodeNew, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b04f4fa6-9525-41e9-9e9a-0c498a135ad0

📥 Commits

Reviewing files that changed from the base of the PR and between aa1868d and de46e6c.

📒 Files selected for processing (14)
  • README.md
  • docs/design.md
  • docs/requirements.md
  • tests/test_cli.py
  • tests/test_publishers.py
  • tests/test_service.py
  • tests/test_sources.py
  • tests/test_state.py
  • weather_briefing/cli.py
  • weather_briefing/config.py
  • weather_briefing/publishers.py
  • weather_briefing/service.py
  • weather_briefing/sources.py
  • weather_briefing/state.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/runtime-rendered-text-diagnostics

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.33%. Comparing base (fec6125) to head (de46e6c).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread weather_briefing/publishers.py Outdated
@IceCodeNew
IceCodeNew requested a review from Copilot July 14, 2026 08:09
@IceCodeNew
IceCodeNew force-pushed the codex/runtime-rendered-text-diagnostics branch from fc017e0 to 362cccf Compare July 14, 2026 08:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread weather_briefing/state.py
@IceCodeNew
IceCodeNew requested a review from Copilot July 14, 2026 08:14
@IceCodeNew
IceCodeNew force-pushed the codex/runtime-rendered-text-diagnostics branch from 362cccf to 1bf6a0f Compare July 14, 2026 08:18
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.
@IceCodeNew
IceCodeNew force-pushed the codex/runtime-rendered-text-diagnostics branch from 1bf6a0f to de46e6c Compare July 14, 2026 08:48
@IceCodeNew
IceCodeNew requested review from Copilot and removed request for Copilot July 14, 2026 08:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread weather_briefing/publishers.py
@IceCodeNew
IceCodeNew marked this pull request as ready for review July 14, 2026 09:12
@IceCodeNew
IceCodeNew merged commit c1ff66a into master Jul 14, 2026
21 checks passed
@IceCodeNew
IceCodeNew deleted the codex/runtime-rendered-text-diagnostics branch July 14, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants