Skip to content

chore: onboard the code review bot - #110

Merged
MarketDataApp merged 4 commits into
mainfrom
chore/onboard-the-code-review-bot
Sep 17, 2026
Merged

MarketDataApp merged 4 commits into
mainfrom
chore/onboard-the-code-review-bot

Conversation

@MarketDataApp

Copy link
Copy Markdown
Owner

This repository has carried .github/code-review/REVIEW.md since the SDK rules landed, but nothing read it: there was no caller workflow and no policy. This is the rest of the onboarding. It is the last of the six SDKs.

What this adds

.github/workflows/code-review.yml — the caller, copied from sdk-js's, which is the shape four of the five onboarded repos run.

Dispatch only for now, deliberately. The automatic workflow_run trigger is written out and commented. sdk-py is the only repo with it armed; sdk-php, sdk-go, sdk-java and sdk-js all hold it back so a person reads the first review before every open pull request gets one. This repository has never been reviewed by the bot, so the same caution applies. Arming it later is deleting two comment markers and the banner.

.github/code-review/policy.yml — Codex first with Claude as fallback, matching the other five. gate: true and require_ci_green: true. ignore_paths adds **/bin/** and **/obj/** on top of the shared list, so a restored or published tree cannot spend the diff budget ahead of the source beside it.

I validated it through the bot's own loader rather than by eye:

policy VALID against the bot
  backends = ['codex', 'claude']   mode = fallback
  gate = True                      require_ci_green = True
  ignore_paths = ['docs/**', '*.md', '.github/**/*.md', '**/*.lock',
                  '**/dist/**', '**/bin/**', '**/obj/**']

One change beyond the onboarding, and why

.github/workflows/ci.yml: name: CI becomes name: Tests.

The bot's trigger names a workflow by its name:, never its filename. Every other SDK names its pull-request workflow Tests — that is what makes the caller file identical everywhere, and docs/setup.md §4a records it as an interface. This repository was the only holdout.

Naming the wrong workflow fails silently: the trigger never matches, no review ever runs, and nothing says why. Leaving CI would plant that trap for whoever arms the automatic trigger later.

Checked before changing it:

  • Branch protection requires the context Tests passed, which is a job name and is untouched.
  • Nothing in this repository references the workflow by name — no workflows: ["CI"] anywhere.
  • The README badge points at the filename ci.yml, so it keeps working; I updated its label to match the new name.

If you would rather not rename it, drop that file from this PR and change the commented trigger to workflows: ["CI"] instead. The rest stands either way.

What happens after merge

Nothing automatic. To take the first review:

gh workflow run code-review.yml -R MarketDataApp/sdk-csharp -f pr=<number>

Or comment @marketdata-code-review on a pull request.

The bot reads REVIEW.md and policy.yml from a pull request's base ref, so both take effect for pull requests opened after this merges.

Review rules already in place

REVIEW.md here resolves to 411 lines: the shared default, the shared SDK rules including the gotchas section, then section 9 on the C# public surface. It has been correct and inert since sdk-csharp#109.

@MarketDataApp
MarketDataApp merged commit 3438f7f into main Sep 17, 2026
8 checks passed
@MarketDataApp
MarketDataApp deleted the chore/onboard-the-code-review-bot branch September 17, 2026 17:03
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6474668) to head (90a61da).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #110   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           69        69           
  Lines         2187      2187           
  Branches       272       272           
=========================================
  Hits          2187      2187           

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 6474668...90a61da. Read the comment docs.

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

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