Skip to content

feat: add coderabbit-collector-helper.sh for PR review feedback into SQLite (t166.2)#765

Merged
marcusquinn merged 1 commit intomainfrom
feature/t166.2
Feb 9, 2026
Merged

feat: add coderabbit-collector-helper.sh for PR review feedback into SQLite (t166.2)#765
marcusquinn merged 1 commit intomainfrom
feature/t166.2

Conversation

@marcusquinn
Copy link
Owner

Summary

  • Adds coderabbit-collector-helper.sh — a new helper script that polls for CodeRabbit review completion on PRs, extracts review comments and inline suggestions into a SQLite database, and categorises them by severity and type.

What it does

Command Purpose
collect --pr N [--wait] Collect CodeRabbit reviews/comments from a PR into SQLite
poll --pr N [--timeout S] Poll until CodeRabbit posts a review
query [--severity S] [--category C] [--format json] Query stored comments with filters
summary [--pr N] Severity/category breakdown, most-affected files
export [--format json|csv] Export all data
status Show collector status and DB info

Design decisions

  • jq filter files for SQL generation: Avoids shell expansion of $variables and backticks in CodeRabbit comment bodies (which contain code snippets). The jq filter handles SQL single-quote escaping (gsub("'"; "''")) safely.
  • SQLite WAL mode + busy_timeout: Follows mail-helper.sh and memory-helper.sh patterns for concurrent access safety.
  • Unit separator (0x1f) for display queries: Handles pipes (|) in markdown content that would break IFS='|' parsing.
  • Negative IDs for issue comments: Avoids collision between PR review comment IDs and issue comment IDs in the same table.
  • Severity/category classification in jq: Done inside the jq filter (not shell) to avoid shell expansion issues with comment bodies.
  • Idempotent collection: INSERT OR IGNORE on unique gh_comment_id / gh_review_id prevents duplicates on re-collection.

Testing

Task

Implements t166.2: "Monitor and collect CodeRabbit review feedback into structured format"

…SQLite (t166.2)

Adds a new helper script that monitors and collects CodeRabbit review
feedback from GitHub PRs into a structured SQLite database.

Key capabilities:
- Poll for CodeRabbit review completion with configurable timeout
- Extract review bodies and inline comments via GitHub API
- Classify comments by severity (critical/high/medium/low/info)
- Categorise by type (security/bug/performance/style/docs/testing/etc)
- Idempotent collection (INSERT OR IGNORE on unique comment IDs)
- Query with filters (--pr, --severity, --category, --format json)
- Summary with severity/category breakdown and most-affected files
- Export as JSON or CSV

Design decisions:
- Used jq filter files for SQL generation to avoid shell expansion of
  $variables and backticks in CodeRabbit comment bodies
- SQLite WAL mode + busy_timeout follows mail-helper.sh/memory-helper.sh patterns
- Unit separator (0x1f) for display queries to handle pipes in markdown
- Negative IDs for issue comments to avoid collision with PR comment IDs
- Severity/category classification done in jq (not shell) for safety
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 9, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t166.2

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.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 51 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Feb 9 05:44:31 UTC 2026: Code review monitoring started
Mon Feb 9 05:44:32 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 51

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 51
  • VULNERABILITIES: 0

Generated on: Mon Feb 9 05:44:35 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@marcusquinn marcusquinn merged commit 66d4205 into main Feb 9, 2026
11 checks passed
@marcusquinn marcusquinn deleted the feature/t166.2 branch February 21, 2026 01:59
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