You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split Grok reviews: grok-4.6 first pass vs cheaper follow-up - #15
Org-wide Grok PR review splits first-pass vs follow-up to cut the xAI bill on synchronize pushes. One job, two paths via github.event_name / github.event.action. Org ruleset still points at this file; no copies in spine/cache-core/etc.
Both passes use grok-4.6 on https://api.x.ai/v1 with org XAI_API_KEY only. Follow-up is cheaper via effort: low and max_turns: 15, not a second model. The cheaper coding model is on hold: Pro #178 showed it plus dummy auth.json exits 1 with no JSON, and the action blames SuperGrok session expiry. Nathan will not use SuperGrok OAuth.
What changed
File only: .github/workflows/grok-code-review.yml
First pass (opened, reopened, ready_for_review, workflow_dispatch): grok-4.6, default effort (empty input; the pinned action adds --effort only when set), max_turns 50.
Follow-up (synchronize): grok-4.6, effort: low, max_turns: 15, custom_instructions to review only the latest commit and not re-litigate already-posted findings.
Concurrency is split by pass type. The group key is repo + PR + first-pass|follow-up. synchronize does not cancel an in-flight first pass. cancel-in-progress stays on within each group.
~/.grok/config.toml registers only [model."grok-4.6"] at https://api.x.ai/v1 with env_key = "XAI_API_KEY". Dummy grok_auth_json stays "{}" (action input only). Real auth is config.toml + XAI_API_KEY.
Action pin unchanged: 0xr3ngar/grok-build-review-action@eded30018cdee4e83dfca14d18f292b860c30cdd (v1.0.2). Not forked.
Unchanged: XAI_API_KEY only (no SuperGrok fallback), skip-drafts, roast_level: professional, fail_on: never, status_comments: true, if: ${{ env.XAI_API_KEY != '' }}. Fail-closed if the key is empty.
Validation
YAML parses; draft-skip if and concurrency split unchanged.
Workflow file has no grok-build-0.1 string. config.toml parses to model["grok-4.6"] only.
First pass (opened, reopened, ready_for_review, workflow_dispatch) stays
on grok-4.6 with default effort and max_turns 50. Synchronize follow-ups
use grok-build-0.1, effort low, and 15 turns, and are told to review only
the latest commit without re-litigating posted findings.
Register both models in config.toml with quoted table keys so TOML does
not nest dotted ids. Auth remains org XAI_API_KEY only.
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
The workflow implements the stated first-pass versus follow-up split without defects. First-pass events keep grok-4.6, omit effort, and use 50 turns; synchronize sets effort low, 15 turns, and the scoped custom instructions. Concurrency is keyed by repository, PR, and pass type, so a push cannot cancel an in-flight first pass. The pinned action omits --effort when the input is empty and omits custom instructions when they are blank.
The reason will be displayed to describe this comment to others. Learn more.
Grok Build Review
The event split, quoted TOML model tables, and action pin are implemented as specified. The follow-up path is selected only from github.event.action == synchronize, while the job still cancels any in-progress run in the same PR concurrency group. A push during opened, reopened, or ready_for_review therefore aborts grok-4.6 and starts grok-build-0.1 under instructions that assume a first pass already posted findings. That first pass never completes, which is the common case when max_turns is 50 and the author pushes again before the job finishes.
A push during an in-flight opened/reopened/ready_for_review job aborted
grok-4.6 and started grok-build-0.1 under instructions that assume findings
were already posted. Cheap follow-up now requires both synchronize and a
completed Grok status comment or review on the PR. Otherwise the
replacement stays grok-4.6, default effort, and max_turns 50.
cancel-in-progress is unchanged.
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
First-pass events (opened, reopened, ready_for_review, workflow_dispatch)
share one cancel-in-progress group. Synchronize follow-ups share a
separate group, so a push during an in-flight grok-4.6 review no longer
aborts it and then assumes findings were posted. Follow-up runs still
cancel each other.
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
The reason will be displayed to describe this comment to others. Learn more.
Grok Build Review
The pull request modifies the review workflow to select between grok-4.6 for first-pass events and grok-build-0.1 for qualifying synchronize events. The follow-up guard condition depends on case-sensitive substring and regular expression matches against the text of prior status comments. The first-pass path emits empty values for effort and custom_instructions and explicitly sets max_turns rather than delegating to action defaults as described in the added comments.
The reason will be displayed to describe this comment to others. Learn more.
🐞 [bug] First-pass path supplies empty effort to the review action
When the first-pass branch executes, the step writes an empty value for effort and the action invocation interpolates it as "effort: ". The stated behavior for first-pass events is to use the action default effort. An explicitly provided empty value is not guaranteed to be treated as an omitted input by the composite action.
Suggestion: Omit the effort input entirely for the first-pass path, or emit a documented sentinel that the action maps to its default.
The reason will be displayed to describe this comment to others. Learn more.
Not a bug on the pinned action. 0xr3ngar/grok-build-review-action@eded30018cdee4e83dfca14d18f292b860c30cdd documents effort as Empty = CLI default (default: ""). The composite only adds --effort when the value is non-empty:
First pass therefore leaves effort empty on purpose so grok-4.6 uses the CLI default and does not get --effort low. One job cannot omit a with: key on only one path; empty is the action’s documented omit. Leaving this thread open for that reason. We are not changing the first-pass effort input.
…ault
The header said first pass used the action-default max_turns. The workflow
always passes 50 on that path (the same number as the action default).
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
Pro #178 showed grok-build-0.1 plus dummy auth.json exits 1 with no JSON
and the action blames SuperGrok session expiry. Do not register that
model. Follow-up synchronize stays grok-4.6 on api.x.ai with effort low
and max_turns 15. First pass stays grok-4.6 with default effort and 50
turns. Concurrency split is unchanged.
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
cursorBot
changed the title
Split Grok reviews: grok-4.6 first pass, grok-build-0.1 follow-up
Split Grok reviews: grok-4.6 first pass vs cheaper follow-up
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Org-wide Grok PR review splits first-pass vs follow-up to cut the xAI bill on
synchronizepushes. One job, two paths viagithub.event_name/github.event.action. Org ruleset still points at this file; no copies in spine/cache-core/etc.Both passes use grok-4.6 on
https://api.x.ai/v1with orgXAI_API_KEYonly. Follow-up is cheaper viaeffort: lowandmax_turns: 15, not a second model. The cheaper coding model is on hold: Pro #178 showed it plus dummyauth.jsonexits 1 with no JSON, and the action blames SuperGrok session expiry. Nathan will not use SuperGrok OAuth.What changed
File only:
.github/workflows/grok-code-review.ymlopened,reopened,ready_for_review,workflow_dispatch): grok-4.6, default effort (empty input; the pinned action adds--effortonly when set),max_turns50.synchronize): grok-4.6,effort: low,max_turns: 15,custom_instructionsto review only the latest commit and not re-litigate already-posted findings.repo + PR + first-pass|follow-up.synchronizedoes not cancel an in-flight first pass.cancel-in-progressstays on within each group.~/.grok/config.tomlregisters only[model."grok-4.6"]athttps://api.x.ai/v1withenv_key = "XAI_API_KEY". Dummygrok_auth_jsonstays"{}"(action input only). Real auth isconfig.toml+XAI_API_KEY.0xr3ngar/grok-build-review-action@eded30018cdee4e83dfca14d18f292b860c30cdd(v1.0.2). Not forked.XAI_API_KEYonly (no SuperGrok fallback), skip-drafts,roast_level: professional,fail_on: never,status_comments: true,if: ${{ env.XAI_API_KEY != '' }}. Fail-closed if the key is empty.Validation
ifand concurrency split unchanged.grok-build-0.1string.config.tomlparses tomodel["grok-4.6"]only.synchronize→ grok-4.6 / low / 15; other triggers → grok-4.6 / empty effort / 50.XAI_API_KEYfails closed.git diff --check. Diff is this workflow file only.This PR does not add secrets, merge, or publish. Do not copy this recipe into individual pegma-dev repos.