.github: harden codegenie review (key preflight, CLAUDE_API_KEY, config)#2324
Conversation
Follow-up to the initial codegenie workflow (#2320): - add a preflight step that fails fast with a legible error when the LLM key secret is missing, instead of a generic config_error deep in the run - point llm-api-key at CLAUDE_API_KEY (the org-wide key that resolves for bor; ANTHROPIC_API_KEY_GITHUB_ACTIONS is not provisioned here) - add codegenie.toml: skip generated code (gencodec, protobuf, mocks, CLI docs) and mark consensus-critical zones per .claude/rules Trigger stays comment-only ("codegenie review"); no auto-review on push. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Pull request overview
This PR hardens the on-demand CodeGenie PR review workflow in .github/ by ensuring the correct LLM secret is used for this repo, failing fast when it’s missing, and adding a repository-scoped codegenie.toml to better classify/skip generated code and prioritize consensus-critical paths.
Changes:
- Add an early workflow preflight step that errors clearly when
CLAUDE_API_KEYis missing/empty. - Switch CodeGenie to use the org-provisioned
CLAUDE_API_KEYsecret forllm-api-key. - Introduce
codegenie.tomlwith skip rules for generated code and critical-priority classifications for consensus/EVM/state/txpool/hardfork-related directories.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/codegenie-review.yml |
Adds API-key preflight and updates the action input to use CLAUDE_API_KEY for CodeGenie authentication. |
codegenie.toml |
Adds repository CodeGenie classification rules to skip generated code and prioritize consensus-critical areas. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The rest of bor's workflows pin actions/checkout@v5; align the codegenie lane (v7 came from the upstream template) for consistency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2324 +/- ##
===========================================
+ Coverage 54.05% 54.07% +0.02%
===========================================
Files 907 907
Lines 162012 162012
===========================================
+ Hits 87578 87612 +34
+ Misses 69017 68992 -25
+ Partials 5417 5408 -9 see 23 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Summary
Follow-up to #2320, which added the initial CodeGenie review workflow. That workflow referenced
ANTHROPIC_API_KEY_GITHUB_ACTIONS, which is not provisioned for bor — so triggered reviews failed with a genericconfig_error. This PR fixes that and adds config.Validated end-to-end on a throwaway test PR (#2322): with
CLAUDE_API_KEY, CodeGenie authenticated and posted a full review + inline comments. With the old/repo-localANTHROPIC_API_KEYit failed the LLM call (stale/model-restricted key).Changes:
CLAUDE_API_KEY is missing or empty for this repo) instead of a buriedconfig_error.llm-api-keyat the org-wideCLAUDE_API_KEY(resolves for bor; the org-wideANTHROPIC_API_KEY_GITHUB_ACTIONSPeter referenced is not scoped here).codegenie.toml— skip generated code (gencodecgen_*.go,*.pb.go, mocks, generated CLI docs) and mark consensus-critical zones (consensus,miner,core/vm,params,core/txpool,core/state,core/blockstm) per.claude/rules.Trigger stays comment-only (
codegenie review) as set in #2320 — no auto-review on open/push.Executed tests
pull_requestlane (temporary scaffold oncodeginie-test, not included here) against PR [teat] v2.9.1 to develop #2322. Result: preflight ✅, CodeGenie ✅, review report + 2 inline comments posted. Run: https://github.com/0xPolygon/bor/actions/runs/30104342882Rollout notes
Not consensus-affecting. CI-only. No coordinated upgrade. Non-blocking review lane — no required status check added. Inert until merged to
develop(comment triggers resolve from the default branch).