Skip to content

[BOUNTY] Add JSONL output to log_aggregator.py (#3)#28

Open
leo202000 wants to merge 2 commits into
thanhle74:mainfrom
leo202000:feat/log-aggregator-jsonl-output
Open

[BOUNTY] Add JSONL output to log_aggregator.py (#3)#28
leo202000 wants to merge 2 commits into
thanhle74:mainfrom
leo202000:feat/log-aggregator-jsonl-output

Conversation

@leo202000

Copy link
Copy Markdown

Summary

Adds JSONL (JSON Lines) output format to tools/log_aggregator.py, addressing bounty #3. Each parsed log entry is written as a self-contained JSON object on its own line, making the output suitable for streaming ingestion and line-by-line processing.

Changes

  • tools/log_aggregator.py:
    • New export_jsonl(output_path, max_entries=10000) method writes one JSON object per line via json.dumps(entry, default=str).
    • --format CLI option now accepts jsonl in addition to json/csv/html.
    • main() dispatches --format jsonl to export_jsonl.
  • tests/test_log_aggregator_jsonl.py: 6 unit tests covering JSONL validity (each line independently parseable), field round-tripping, max_entries cap, empty aggregator export, and CLI --format jsonl acceptance.
  • diagnostic/build-4c507ba1.logd + .json: required diagnostic bundle.

Testing

  • python3 tests/test_log_aggregator_jsonl.py -v -> 6 tests pass.
  • python3 tests/test_log_aggregator_parsers.py -> 33 existing parser tests still pass (no regressions).
  • python3 build.py -> diagnostic bundle generated and committed (diagnostic/build-4c507ba1.logd, 14906 bytes, DIAG magic).
  • Verified each JSONL line is independently valid JSON and fields round-trip correctly.

Checklist

  • Relevant modules affected by these changes build locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the required diagnostic build log
  • Changes are scoped to the PR purpose and avoid unrelated cleanup
  • Security, privacy, and error-handling implications have been considered

  • I would like to request that my diagnostic build log is removed before merging

Addresses bounty issue #3. Please let me know the process for claiming the $25 bounty once merged.

Add export_jsonl() method that writes each parsed log entry as a
self-contained JSON object on its own line, suitable for streaming
ingestion and line-by-line processing. Includes --format jsonl CLI
option and max_entries cap. Adds unit tests covering JSONL validity,
field round-tripping, max_entries, empty export, and CLI integration.

Addresses bounty mannowell#3.
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@leo202000, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 36 minutes and 25 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a828b7a0-aedf-4315-8901-eafc61733d05

📥 Commits

Reviewing files that changed from the base of the PR and between 94e0fb0 and 29ff7c0.

📒 Files selected for processing (4)
  • diagnostic/build-4c507ba1.json
  • diagnostic/build-4c507ba1.logd
  • tests/test_log_aggregator_jsonl.py
  • tools/log_aggregator.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

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.

1 participant