Skip to content

feat: add CodeRabbit provider support - #3383

Open
MonkeyMed wants to merge 4 commits into
steipete:mainfrom
MonkeyMed:feat/coderabbit-provider
Open

feat: add CodeRabbit provider support#3383
MonkeyMed wants to merge 4 commits into
steipete:mainfrom
MonkeyMed:feat/coderabbit-provider

Conversation

@MonkeyMed

@MonkeyMed MonkeyMed commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Adds first-party provider support for CodeRabbit (coderabbit) in CodexBar.

  • Data source: Local CLI probe executing coderabbit usage and coderabbit auth status.
  • Metrics: Tracks billing period review count, active/inactive usage billing state, reset countdown date, user, and organization.
  • Authentication: Managed via coderabbit auth login (~/.coderabbit/auth.json).
  • Icons & Assets: Added ProviderIcon-coderabbit.svg and updated base64 serve icons.
  • Manifests & Documentation: Regenerated provider manifests, added docs/coderabbit.md, updated docs/providers.md and README.md.
  • Tests: Unit tests for parser, snapshot mapping, and probe in Tests/CodexBarTests/CodeRabbitUsageParserTests.swift.

Test Plan

  • Unit tests: Verified parsing of standard CLI output, auth status output, and error conditions.
  • Generated files check: Scripts/regenerate-provider-manifests.sh check passed (70 providers).
  • Documentation link check: Scripts/check-documentation-links.mjs passed (192 links OK).

Redacted authenticated CLI-to-CodexBar proof (after fix)

Real authenticated flow, observed in CodexBar after the fix (79fa173fa), captured via codexbar usage --provider coderabbit with --format json --pretty:

== CodeRabbit (cli) ==
Reviews: 26
Organization: MonkeyMed
Usage billing: inactive
Period resets: 2026-09-30
Account: max@example.com
Plan: Pro · 26 Reviews

Captured at 2026-09-02T15:23:08Z; the dashboard snapshot reflects the same plan, identity, and billing details. Redacted: no token material is shown.

Naming policy (fixed)

Linux Swift Testing cases now use sentence-style backticked names per the repository convention:

  • parses standard coderabbit usage text
  • parses coderabbit usage combined with auth status text
  • signed out output throws notLoggedIn
  • empty or invalid output throws parseFailed

@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T12:41:19.522467Z d582df1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d582df1526

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let primary: RateWindow? = {
if let periodResets {
return RateWindow(
usedPercent: 0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid synthesizing a zero-percent review quota

Whenever the CLI supplies a reset date, this creates a real rate window with usedPercent: 0, even though the parsed review count has no accompanying limit. The normal menu formatter therefore reports “Reviews: 100%” in remaining mode, and the status icon stays completely full regardless of the number of reviews. Keep this reset/count as detail-only data unless the CLI exposes a denominator from which an actual percentage can be calculated.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Sep 2, 2026
@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed September 2, 2026, 3:37 PM ET / 19:37 UTC.

ClawSweeper review

What this changes

Adds an opt-in first-party CodeRabbit provider that reads local CLI usage and authentication output, displays the parsed review and billing data, and registers its icons, documentation, and tests.

Merge readiness

Blocked until stronger real behavior proof is added - 9 items remain

Keep open: the new balance-only descriptor makes an existing gatekeeper assertion fail, and the submitted trace does not consistently demonstrate the claimed authenticated CLI path.

Priority: P2
Reviewed head: feb4fe46272eebddbd5dba609d738775b8b8c22f
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The provider implementation has useful focused coverage, but a definite gatekeeper failure and inconsistent real-behavior proof leave it below merge-ready quality.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The changed production owner runs coderabbit usage and optionally coderabbit auth status, but the submitted after-fix terminal trace claims --format json --pretty while showing text-format output; it does not reliably prove the authenticated CodeRabbit-to-CodexBar path on this head. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The changed production owner runs coderabbit usage and optionally coderabbit auth status, but the submitted after-fix terminal trace claims --format json --pretty while showing text-format output; it does not reliably prove the authenticated CodeRabbit-to-CodexBar path on this head. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Introduced capability classification: The PR marks CodeRabbit as balance-only, adding it to the registry derived from provider descriptors.
Gatekeeper invariant is not updated: Current main's capability characterization expects exactly five balance-only providers and does not include CodeRabbit; merging the introduced descriptor will make that assertion fail.
Late-finding continuity: The gatekeeper file is unchanged between the immediately preceding reviewed head and this head, so this newly reported finding was equally visible in the preceding cycle.
Findings 1 actionable finding [P1] Update the balance-only registry expectation
Security None None.

How this fits together

CodexBar provider descriptors turn local provider data sources into shared usage snapshots for the menu-bar app and CLI. This change adds a CodeRabbit CLI probe and parser to that descriptor-driven pipeline.

flowchart TD
    A[Local CodeRabbit CLI] --> B[Usage and auth-status probe]
    B --> C[CodeRabbit output parser]
    C --> D[Provider usage snapshot]
    D --> E[Provider registry]
    E --> F[CodexBar menu and CLI output]
Loading

Decision needed

Question Recommendation
Should CodeRabbit be accepted as a permanent first-party provider rather than remaining an unsupported integration? Adopt first-party support: Accept the provider direction, then require the test repair and valid real-account proof before merge.

Why: This PR adds a stable provider ID, local executable integration, documentation, and settings exposure; that product-scope choice requires repository-owner intent beyond a mechanical repair.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The changed production owner runs coderabbit usage and optionally coderabbit auth status, but the submitted after-fix terminal trace claims --format json --pretty while showing text-format output; it does not reliably prove the authenticated CodeRabbit-to-CodexBar path on this head. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Update the balance-only registry expectation (P1) - balanceOnly: true adds CodeRabbit to the descriptor-derived set, but the gatekeeper still expects only five providers. The full test suite will fail until that expected membership includes CodeRabbit (or this classification is removed). Late review note: this relationship was already visible at the preceding reviewed head, whose gatekeeper file was unchanged.
  • Resolve merge risk (P1) - The full test suite will fail until the intentional balance-only membership is reflected in the gatekeeper assertion.
  • Resolve merge risk (P1) - The supplied authenticated proof claims JSON output but contains text output, leaving the real CodeRabbit CLI contract and after-fix path unverified.
  • Complete next step (P2) - Confirm the first-party CodeRabbit direction, update the balance-only gatekeeper expectation if intentional, and add a redacted current-head authenticated trace with a format consistent with the command.
  • Improve patch quality - Update the balance-only capability assertion if that descriptor classification is intentional.
  • Improve patch quality - Post a redacted current-head authenticated trace using text mode with text output or JSON mode with valid JSON, then update the PR body for re-review.
  • Improve patch quality - Obtain maintainer confirmation that CodeRabbit should be a first-party provider.

Findings

  • [P1] Update the balance-only registry expectation — Sources/CodexBarCore/Providers/CodeRabbit/CodeRabbitProviderDescriptor.swift:24
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production vs test growth production +429, tests +308 A new provider crosses core parsing, registration, app integration, CLI assets, and documentation, so its validation contract needs to remain green.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    If maintainer direction approves first-party CodeRabbit support, preserve the opt-in default, update the intentional capability registry, and attach a redacted trace from the real local CLI using a format consistent with the command.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

If maintainer direction approves first-party CodeRabbit support, preserve the opt-in default, update the intentional capability registry, and attach a redacted trace from the real local CLI using a format consistent with the command.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR proposes a new provider rather than reporting broken existing behavior; the contributor's claimed real integration trace is insufficient as merge proof.

Is this the best way to solve the issue?

Unclear: the implementation follows the descriptor architecture, but first-party provider admission needs maintainer direction and the branch must repair its broken gatekeeper invariant.

Full review comments:

  • [P1] Update the balance-only registry expectation — Sources/CodexBarCore/Providers/CodeRabbit/CodeRabbitProviderDescriptor.swift:24
    balanceOnly: true adds CodeRabbit to the descriptor-derived set, but the gatekeeper still expects only five providers. The full test suite will fail until that expected membership includes CodeRabbit (or this classification is removed). Late review note: this relationship was already visible at the preceding reviewed head, whose gatekeeper file was unchanged.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against acdf208234d5.

Labels

Label justifications:

  • P2: This is an opt-in provider expansion with a concrete pre-merge test failure, but no demonstrated impact on existing enabled providers.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The changed production owner runs coderabbit usage and optionally coderabbit auth status, but the submitted after-fix terminal trace claims --format json --pretty while showing text-format output; it does not reliably prove the authenticated CodeRabbit-to-CodexBar path on this head. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-02T12:46:09.324Z sha d582df1 :: needs real behavior proof before merge. :: [P2] Do not invent a zero-percent quota from a reset date
  • reviewed 2026-09-02T14:56:43.732Z sha cd459db :: needs real behavior proof before merge. :: [P2] Remove the invented zero-percent quota window
  • reviewed 2026-09-02T15:14:28.885Z sha 79fa173 :: needs real behavior proof before merge. :: [P3] Use sentence-style Swift Testing names
  • reviewed 2026-09-02T15:29:30.259Z sha feb4fe4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-02T15:36:16.459Z sha feb4fe4 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 2, 2026
@MonkeyMed

Copy link
Copy Markdown
Author

@clawsweeper re-review

P2-Finding ist durch den aktuellen Head behoben79fa173fa hat die erfundene 0%-RateWindow-Konstruktion aus dem Reset-Datum entfernt:

  • Der toUsageSnapshot-Pfad übergibt primary: nil und hält periodResets als subscriptionRenewsAt-Detail statt als synthetisches Fenster. (Sources/CodexBarCore/Providers/CodeRabbit/CodeRabbitUsageSnapshot.swift:62-70, 79fa173fac9)
  • Der Fix-Commit entfernte die Closure, die RateWindow(usedPercent: 0, ...) aus periodResets erzeugte; der Review-Kommentar der vorherigen Runde bezog sich auf den älteren Head cd459dbbc, wo der Befund noch vorhanden war.
  • Verifiziert am aktuellen Head: grep -n "RateWindow(" CodeRabbitUsageSnapshot.swift findet keine Konstruktion mehr; der Snapshot übergibt primary: nil.
  • Der neu hinzugefügte Linux-Parser-Test (cd459dbbc) deckt das korrigierte Verhalten ab: Reset- und Review-Daten bleiben Detail-Rows ohne erfundene Quote.

Der P2-Befund aus der vorherigen Runde ist damit am aktuellen Head behoben — der Fix-Commit 79fa173fa ist der Nachweis. Ein frischer Re-Run sollte die Priorität aktualisieren.

@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@MonkeyMed

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@MonkeyMed

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant