fix(pstack): support Codex setup and current CLI output - #59
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
Greptile SummaryThis PR updates provider setup and dispatch guidance, adds optional Astra and extension-based model families, accepts current Claude event-array output, and recognizes Grok API-key authentication with exact model matching.
Confidence Score: 4/5The PR is not yet safe to merge because an explicitly permitted single-family setup cannot satisfy the mandatory independent cross-judge smoke test. The runner changes are well covered and no security defect was established, but the setup workflow contains one blocking contradiction; the extension interface also needs a concrete format to avoid inconsistent integrations. Files Needing Attention: plugins/pstack/skills/setup-pstack/SKILL.md; plugins/pstack/skills/poteto-mode/references/provider-dispatch.md
|
| Filename | Overview |
|---|---|
| plugins/pstack/skills/setup-pstack/SKILL.md | Generalizes setup to selected and extension families, but permits a one-family configuration that cannot satisfy its required independent cross-judge smoke. |
| plugins/pstack/skills/poteto-mode/references/provider-dispatch.md | Adds Astra, extension routing, effort-cap rules, and compatible Codex fork settings; the extension contract lacks a concrete interoperable format. |
| plugins/pstack/skills/poteto-mode/scripts/runner/parse-output.ts | Extracts the terminal Claude result from JSON event arrays while preserving existing object output handling. |
| plugins/pstack/skills/poteto-mode/scripts/runner/run.ts | Accepts Grok API-key authentication and checks model availability using escaped, token-bounded matching. |
| plugins/pstack/skills/poteto-mode/scripts/runner/model-matrix.test.ts | Updates matrix invariants for optional families while preserving the exact default quartet. |
| plugins/pstack/skills/poteto-mode/scripts/runner/parse-output.test.ts | Adds successful and fail-closed Claude event-array parsing coverage. |
| plugins/pstack/skills/poteto-mode/scripts/runner/run.test.ts | Adds coverage for Grok API-key authentication and exact model-token availability. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Load current model sheet] --> B[Load built-in matrix]
A --> C{Dispatch extension configured?}
C -->|Yes| D[Load extension families and routes]
C -->|No| E[Use built-in families]
B --> F[Apply additions, removals, efforts, and caps]
D --> F
E --> F
F --> G[Probe every selected family]
G -->|Any failure| H[Leave configuration unchanged]
G -->|All pass| I[Render and confirm role map]
I --> J[Write sheet and parent integration]
J --> K[Run mixed-panel smoke]
K --> L[Independent cross-judge]
Reviews (1): Last reviewed commit: "fix(pstack): support Codex model setup a..." | Re-trigger Greptile
| Treat the normalized values as current role-to-family assignments. Overlay those rows on the complete first-run role map in step 7. Materialize any missing documented role row from that map on the next successful write. A duplicate or unknown role row is inconsistent state; report it and resolve it before probing. A bare host-native slug from an older sheet is also invalid because it does not say which provider owns it. A versioned Claude model outside the two migration families remains inconsistent state. If the sheet is missing, use the complete first-run role map and the model matrix's Default effort cells. | ||
| Treat the normalized values as current role-to-family assignments. Overlay those rows on the complete first-run role map in step 7. Materialize any missing documented role row from that map on the next successful write; if its seed names an unselected family, resolve that lane to a selected family or alias before probing. A duplicate or unknown role row is inconsistent state; report it and resolve it before probing. A bare host-native slug from an older sheet is also invalid because it does not say which provider owns it. A versioned Claude model outside the two migration families remains inconsistent state. If the sheet is missing, use the complete first-run role map and the default families' Default effort cells, subject to the user's supplied choices and caps. | ||
|
|
||
| Before effort collection or probing, apply the user's role changes in memory. Every added family must occupy a role; replace every removed family's occurrence with a selected family or alias. Require at least one selected family and require the resulting role map's family set to equal the selected set. Keep the loaded assignments by default; resolve missing assignments before probing. Membership persists only through role descriptors. |
There was a problem hiding this comment.
Single-Family Smoke Cannot Complete
The new removal flow permits a configuration with only one selected family. However, the mandatory behavioral smoke later requires an independent cross-judge from that same selected set. With only one family, no independent judge exists, so setup either cannot complete after writing the configuration or must incorrectly describe a same-family run as independent. Require enough diversity for this check or define valid reduced-panel smoke behavior.
| An extension declares additional provider/model families, selectable efforts, a proposed effort, parent-specific launcher argv, and authentication/model/completion evidence. It adds routing capabilities, never role assignments or a second mutable model configuration. Require unique families and provider/model pairs; extensions cannot override built-in families, routes, aliases, or the user's effort caps. Only families selected by a role descriptor or the user participate in setup. Persist all selected families in the role map. | ||
|
|
||
| The parent routes an extension descriptor directly to its declared launcher, with the same unique paths, retained background handle, access boundary, and receipt checks as built-in external lanes. Read the launcher's help before first use. Never send an extension provider to the built-in runner or reinterpret it as a native model. Shared skills consume this contract through the model sheet; no runtime resolver or machine-specific dependency is required. |
There was a problem hiding this comment.
The new dispatch-extension contract names the required data but does not define concrete syntax, placeholders, parsing rules, or a canonical example for family rows, launcher arguments, and evidence. Independently authored extensions therefore cannot be validated or invoked consistently, which can cause valid metadata to be rejected or paths and arguments to be substituted incorrectly. Please specify and test an unambiguous extension format before setup executes declared launchers.
ericlitman
left a comment
There was a problem hiding this comment.
Gavel verdict: Request changes
1 blocking finding; 0 unconfirmed plausible findings; 0 killed by adjudication.
Quorum: 4/3 successful reviewers.
Continuity: 1 open · 0 resolved · 0 reopened.
Scope: initial full review.
Top findings
- MEDIUM
plugins/pstack/skills/poteto-mode/scripts/runner/run.ts:383-385 RIGHTReject unavailable-model Grok preflights — With API-key auth, an exit-0 response such asYou are using XAI_API_KEY.\nmodel grok-4.6 is not supportedsetsauthenticated, matches the model token, and makesunavailableStatusreturnunavailable-model. This condition rejects onlyunauthenticated, so the runner launches a model the preflight explicitly rejected instead of returning exit 69 without model execution. Require a non-error status or explicitly rejectunavailable-model.
Non-blocking findings
- LOW
plugins/pstack/skills/setup-pstack/SKILL.md:61 RIGHTComplete the required installed setup live passes — This adds parent-specific Astra and extension setup behavior, but the recorded real-surface runs never complete the changed setup flow: the Codex six-family attempt stops on Grok's HTTP 402 and leaves the sheet unactivated, while the Claude check only invokes the existing native Opus agent without running setup. The repository's mandatory merge gate therefore remains unmet; run the installed/setup-pstackflow successfully in both affected harnesses while exercising the optional-family/extension route and record the observed results.
Gavel run panel:60f1547dcef598b9d919052d036a0e116596055e:mFoboxqhtAw:svlOQZ9o7qw · Commit 60f1547dcef598b9d919052d036a0e116596055e
Judge: native (primary) openai/gpt-6-astra · tools: yes
Full record: GET /gavel/run/panel:60f1547dcef598b9d919052d036a0e116596055e:mFoboxqhtAw:svlOQZ9o7qw
Closes #58.
Codex setup rejected successful Claude JSON event arrays and Grok API-key authentication. The runner now extracts the terminal Claude result and accepts either supported Grok authentication mode while requiring an exact model token. Error and missing-model cases still fail closed.
Setup now supports optional Astra and explicitly loaded dispatch extensions without changing the default four-model panel. It reuses supplied model choices and effort caps, and native Codex overrides use compatible fork settings. The optional matrix column matches the schema proposed in #55; this change does not import its other optional families.
Verification
The installed candidate is a local prerelease for verification. No merge or release was performed.
Changes made with GPT-5.6 Sol at xhigh and GPT-6 Astra at medium in Codex, with independent Astra review.