feat(autoreview): add grok review engine - #15
Open
ci wants to merge 6 commits into
Open
Conversation
Owner
Author
|
This PR is part of a stack:
Created with jjpr |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The autoreview helper had no Grok engine, so
--reviewers codex,grokpanels were not possible. Grok Build has a headless mode but a few sharp edges: its plan mode and an empty or unknown--toolsallowlist still allow writes, MCP meta-tools survive the built-in allowlist, it has no ephemeral session mode, and its JSON envelope reports astopReasonthat can mark partial output.Changes
scripts/autoreview: newgrokengine (grok --prompt-file --output-format json --json-schema), pinned togrok-4.6,--effortmapped from--thinking(low-xhigh), prompt passed through a 0600 temp file.--tools read_file,grep,list_dir(+ web tools),--no-subagents,--disallowed-tools search_tool,use_tool;--no-toolsis rejected for grok since there is no reliable tool-off switch.structuredOutput; runs that stop with anything butend_turnare refused as partial.--session-idis deleted in afinallyblock so review bundles do not persist under~/.grok; deletion failure on a successful run fails the review.--no-toolsengine validation now runs after the empty-diff guard, so dry-run and live runs agree and clean targets still exit 0.fablealias (latest Fable) instead of the pinnedclaude-fable-5; a panel may list one engine several times with different models, so an Amp orb can runamp:openai/gpt-5.6-sol:xhigh,amp:xai/grok-4.6:xhigh.test-review-harnessaccepts--engine grok; SKILL.md and UPSTREAM.txt document the engine and the local trust model.Tests
test-review-harness --fixture malicious --vcs git --engine grok: 3 P0 findings (command injection, path traversal, password leak).test-review-harness --fixture benign --vcs jj --engine grok: clean.autoreview --reviewers codex,grokon this branch: clean at the final round;grok sessions listempty afterwards.--engine grok --no-tools --dry-runrejects;--engine codex --no-toolson a clean tree printsempty diff: nothing to review.--session-id;--toolsallowlist blocks writes while plan mode and--tools nonedo not.