Repository navigation
fix(runner): run headless Grok lanes in auto permission mode and keep the terminal error in receipts #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(runner): run headless Grok lanes in auto permission mode and keep the terminal error in receipts #116
Changes from all commits
47cd5a2
fb2c4f8
2a731d2
469ea9e
cb0b479
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,8 +128,11 @@ export function invocationCommand(options: RunnerOptions): CommandSpec { | |
| options.model, | ||
| "--reasoning-effort", | ||
| options.effort, | ||
| // Headless Grok cancels the whole turn on a permission prompt, in both access modes. | ||
| // Auto mode reports a blocked call to the model instead; the sandbox still confines | ||
| // writes (read-only, or workspace for isolated-write). | ||
| "--permission-mode", | ||
| permissionMode(options.mode), | ||
| "auto", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Critical · Grok auto mode runs untrusted repo code unapproved Line 135 replaces plan (read-only) and acceptEdits (isolated-write) with auto for Grok lanes. In the base, a shell call outside Grok's built-in read-only list raised a prompt, and headless Grok turned that into a cancelled turn. Repository scripts therefore never executed. Auto mode now approves ordinary commands; the prior live run showed a python3 write executing. A read-only reviewer lane on an untrusted PR that runs |
||
| "--sandbox", | ||
| grokSandbox(options.mode), | ||
| "--tools", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,6 +52,11 @@ function evidence(value: string): string { | |
| return value.trim().slice(0, ERROR_EVIDENCE_LIMIT); | ||
| } | ||
|
|
||
| // A provider's terminal event ends its stream, so malformed output keeps the tail. | ||
| function trailingEvidence(value: string): string { | ||
| return value.trim().slice(-ERROR_EVIDENCE_LIMIT); | ||
| } | ||
|
|
||
| function removeIfExists(path: string): void { | ||
| if (existsSync(path)) unlinkSync(path); | ||
| } | ||
|
|
@@ -839,7 +844,7 @@ async function executeLane( | |
| costUsd: null, | ||
| error: { | ||
| message, | ||
| evidence: evidence(`${result.stderr}\n${result.stdout}`), | ||
| evidence: trailingEvidence(`${result.stderr}\n${result.stdout}`), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }, | ||
| }); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium · Exact candidate cb0b479 lacks mandated live test
AGENTS.md bars merge until the exact candidate is installed and its changed behavior passes a live run from the real user surface in every affected harness. The installed version, surface, action and result must be recorded. The PR says evidence for cb0b479 is still in progress, all three live boxes are unchecked, and the cited runs are prior heads 469ea9e and 2a731d2. This head's Grok auto invocation (line 135) and tail evidence (run.ts:847) have no recorded Claude Code or Codex run. The carried Claude-writer form of this demand is moot because the Claude args now match main, but the gate itself is still unmet. Also reported for this defect: - Exact-candidate live validation remains missing (plugins/pstack/skills/poteto-mode/scripts/runner/commands.ts:135): AGENTS.md requires installation and successful real-user-surface testing of the exact candidate in every affected harness, with version, surface, action, and observed result recorded before merge. The supplied PR metadata explicitly marks cb0b479's live testing as in progress and leaves all three evidence boxes unchecked. Earlier-head Grok runs and passing static checks do not satisfy that gate. This candidate must remain a draft until its changed invocation and receipt behavior have the required Claude Code and Codex evidence. - Exact Grok invocation lacks required live validation (plugins/pstack/skills/poteto-mode/scripts/runner/commands.ts:135): This changes Grok lanes to auto permission mode, but the supplied PR evidence leaves the exact-candidate installation and real-user-surface checks incomplete. Merging this candidate would violate the repository's mandatory delivery gate and could ship a Grok lane that cancels or drops out in an affected harness despite fixture tests passing.