Skip to content

feat(ci): call the code review bot, dispatch only for now - #72

Merged
MarketDataApp merged 1 commit into
mainfrom
feat/code-review-bot
Sep 16, 2026
Merged

MarketDataApp merged 1 commit into
mainfrom
feat/code-review-bot

Conversation

@MarketDataApp

Copy link
Copy Markdown
Owner

Adds the caller workflow and a policy for the code review bot.

Dispatch only for now, deliberately. The automatic trigger is written out and commented. It's held back so the first review here is read by a person before every open pull request gets one — the default review is language-agnostic, and whether it says useful things about this codebase is the one thing nobody has measured. To arm it: delete the workflow_run comment markers and the banner. Nothing else changes.

When armed, the trigger is CI finishing, not the push. pull_request_target fires on opened/synchronize — the moment CI starts — and the bot refuses to review a commit whose checks are still running. Measured on sdk-py: tests take ~75s, a review reaches that gate in 30–40s. A push-triggered review skips and never returns, while reporting success.

Policy: Codex first, Claude as fallback, matching sdk-py.

  • fallback not first: under first, a live-but-broken credential ends the review with a neutral "Bot error" instead of falling through to Claude.
  • Codex must be listed first or credential-checkout declines the shared credential lease — a backend reached rarely or never shouldn't hold one plan's lease.

No REVIEW.md yet, so this repo gets the bot's language-agnostic default review. A repo-specific one is worth writing once someone who knows this codebase has read a few reviews and can say what the model keeps missing. Guessing at it first would be inventing house rules nobody agreed to.

Setup guide: MarketData-App/code-review-bot, docs/setup.md §4.

Adds the caller workflow and a policy, with the automatic trigger written out
and COMMENTED. Held back on purpose: the default review is language-agnostic,
and whether it says useful things about sdk-java is the one thing nobody has
measured. One review read by a person comes before every open pull request gets
one.

The trigger, when armed, is CI's COMPLETION and not the push.
pull_request_target fires on opened and synchronize -- the moment CI starts --
and the bot refuses to review a commit whose checks are still running, so a
push-triggered review skips and never returns while reporting success. Measured
on sdk-py: tests take about 75 seconds, a review reaches that gate in 30 to 40.

The named workflow is "Tests", this repository's pull-request CI, found by
looking at which checks actually appear on an open pull request rather than by
guessing from filenames.

Codex first with Claude as the fallback, matching sdk-py. fallback rather than
first because under first a live-but-broken credential ends the review instead
of falling through, and codex first because the shared credential lease is
declined for a backend that is reached rarely or never.
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.27%. Comparing base (6d7c438) to head (4d4f92e).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #72   +/-   ##
=========================================
  Coverage     98.27%   98.27%           
  Complexity     1043     1043           
=========================================
  Files           123      123           
  Lines          2606     2606           
  Branches        301      301           
=========================================
  Hits           2561     2561           
  Partials         45       45           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d7c438...4d4f92e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MarketDataApp
MarketDataApp merged commit 845e539 into main Sep 16, 2026
7 checks passed
@MarketDataApp
MarketDataApp deleted the feat/code-review-bot branch September 16, 2026 23:11
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