Skip to content

Split Grok reviews: grok-4.6 first pass vs cheaper follow-up - #15

Merged
FlyOverCoderKY merged 5 commits into
mainfrom
cursor/grok-review-first-pass-follow-up-e8ba
Aug 20, 2026
Merged

FlyOverCoderKY merged 5 commits into
mainfrom
cursor/grok-review-first-pass-follow-up-e8ba

Conversation

@FlyOverCoderKY

@FlyOverCoderKY FlyOverCoderKY commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

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.
  • Expression matrix: synchronize → grok-4.6 / low / 15; other triggers → grok-4.6 / empty effort / 50.
  • Empty XAI_API_KEY fails 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.

Open in Web Open in Cursor 

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

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@github-actions

github-actions Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Grok Grok Build Review — no issues

Review complete. Nothing actionable to report.

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.

Reviewed commit cc208fb · workflow run

@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: a6078426b0

ℹ️ 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".

Comment thread .github/workflows/grok-code-review.yml Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Grok 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.

🐞 0 bugs · ⚠️ 1 warnings · 🤏 0 nits

Reviewed commit a607842 · workflow run

Comment thread .github/workflows/grok-code-review.yml Resolved
cursoragent and others added 2 commits August 20, 2026 16:26
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>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Grok 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.

🐞 2 bugs · ⚠️ 1 warnings · 🤏 0 nits

Reviewed commit 21dabc1 · workflow run

Comment thread .github/workflows/grok-code-review.yml Resolved
@@ -69,7 +115,10 @@ jobs:
grok_auth_json: "{}"
github_token: ${{ github.token }}
pr_number: ${{ github.event.pull_request.number || github.event.inputs.pr_number }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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:

[ -n "$EFFORT" ] && EXTRA_ARGS+=(--effort "$EFFORT")

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.

Comment thread .github/workflows/grok-code-review.yml Resolved
cursoragent and others added 2 commits August 20, 2026 16:38
…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>
@cursor cursor Bot 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
@FlyOverCoderKY
FlyOverCoderKY merged commit aec2dfc into main Aug 20, 2026
1 check passed
@FlyOverCoderKY
FlyOverCoderKY deleted the cursor/grok-review-first-pass-follow-up-e8ba branch August 20, 2026 17:01
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.

2 participants