Repository navigation
fix(runner): Grok environment allowlist, auth only from preflight, Grok login and model listing (#141, #142, #131, #132) - #150
Conversation
…r a nonzero exit (#132) Co-Authored-By: Claude Opus 5.5 <[email protected]>
) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…models (#131) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge Protections🟢 All 2 merge protections satisfied — ready to merge. Show 2 satisfied protections🟢 Queue ready pull requestsAutomatically queue non-draft pull requests targeting main after verify, Unfret, and live-gate pass on the head.
🟢 🚦 Auto-queueWhen all merge protections are satisfied and these conditions match, this pull request will be queued automatically.
|
|
✅ No blocking findingsWalkthroughThis PR tightens how the provider runner launches and classifies Grok lanes. Grok's preflight and model call now get only an allowlisted environment (basic shell, locale, proxy and CA variables, plus anything prefixed
Details
First review of this pull request. @unfret review · @unfret status · @unfret help |
Live evidence: Open Pstack
|
Merge Queue Status
This pull request spent 1 minute 26 seconds in the queue, including 1 minute 12 seconds running CI. Required conditions to merge
|
Live evidence: Open Pstack
|
Closes #141
Closes #142
Closes #131
Closes #132
Summary
Four runner fixes in one PR, one commit per issue. All four change
run.tsor itsprovider-dispatch.mdparagraph.provider-dispatch.mdnow describes the Grok allowlist, the three Grok login lines, the listing rule, and the auth-only-at-preflight class rule. It also restates the malformed-output classes:malformed-output/65 after a zero exit, and the ordinary classification after a nonzero exit (#132). The design pass for each issue is recorded on #141, #142, #131 and #132.Evidence
New tests that fail on the old
run.tsand pass on this head. The lane checked each by reverting onlyrun.ts:unauthenticated/77. After:child-failed/70, with the evidence kept. 11 of 11 tests failed on the old code.unauthenticated/77,unavailable-model/69, cancellation, timeout, and Grok structured errors.unauthenticated/77, and an unlisted default model passed preflight.unavailable-model/69.grokrecords the environment it receives.PSTACK_CANARYreached both the preflight and the model call.GROK_PSTACK_CANARYstill reaches both.Live, real
grok1.0.46, grok.com login, macOS, Claude parent,grok-4.7at low effort. Each lane ran withPSTACK_CANARY=do-not-leak GROK_PSTACK_CANARY=visiblein the parent, and its prompt was to runenvand report thePSTACK_andGROK_PSTACK_lines. The verdict comes from grepping the runner's own files: the output, the receipt and the raw stdout stream.do-not-leakfound inGROK_PSTACK_CANARY=visiblefound inmain0e2a3ff (before)grok-4.7-buildverified, preflight passedgrok-4.7-buildverified, preflight passedgrok-4.7-buildverified, preflight passedThe after-runs also show that grok starts, authenticates and calls the model with only the allowlisted environment. The real
grok modelsoutput passes the new listing rule (#131).Merge Danger
Door: two-way. The change is runner code only, so a revert restores the old behavior.
Blast Radius: Grok lanes
env_key, a credential-helper variable, or enterprise TLS settings outside the listed CA variables. Such a failure is loud: a receipt-bearing dropout, not a silent fallback.child-failed/70 instead ofunauthenticated/77. The CLI's error text stays in the evidence.Acceptance criteria
PSTACK_CANARY, and live in both modes (table above).reviewing the authentication middlewareand exits 1" getschild-failed. Unit-tested, along with four other auth phrases.unavailable-model(exit 69) before the model call". Both unit-tested from the issue's own outputs.provider-dispatch.mdsentence was corrected, andrun.test.ts's existing matrix still holds. A malformed case that carries auth text after exit 1 was added.Gate results
On 99f90d0, each of these exited 0: install, Bun tests (248 pass, 0 fail), strict typecheck, manifest parse, static invariants,
claude plugin validate plugins/pstack, and the verifier's tests, typecheck and Linux-platform replay.Not verified
Available models:format. If one does, the lane fails asunavailable-model.🤖 Generated with Claude Code