Skip to content

fix(pstack): support Codex setup and current CLI output - #59

Open
AojdevStudio wants to merge 1 commit into
ericlitman:mainfrom
AojdevStudio:fix/codex-six-model-setup
Open

fix(pstack): support Codex setup and current CLI output#59
AojdevStudio wants to merge 1 commit into
ericlitman:mainfrom
AojdevStudio:fix/codex-six-model-setup

Conversation

@AojdevStudio

Copy link
Copy Markdown

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

  • Bun suite: 162 tests passed, 671 assertions.
  • All scripts strict typechecks passed.
  • Static invariants, manifest parsing, and git diff checks passed.
  • Installed candidate 1.3.0-codex.2 through Codex plugin commands. All 166 packaged files matched the tested source tree.
  • Live Codex: Fable medium and Opus xhigh returned verified provider-report receipts; native Astra medium and Sol xhigh completed. Kimi xhigh completed through the separately maintained extension runner. All five reviewed the same fixture correctly, confirmed by an independent Fable judge.
  • Live Claude Code: loaded the exact candidate with --plugin-dir, invoked the native pstack-opus-xhigh agent, and observed completed subagent statistics and the parent completion marker. Its persistent configuration was not replaced.
  • Live Grok: both API-key and existing subscription preflights pass. Model execution returns 402 Payment Required, Grok Build usage balance exhausted. This is an external account blocker; the six-family model sheet remains unactivated as the setup gate requires.

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.

@mergify

mergify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@greptile-apps

greptile-apps Bot commented Sep 7, 2026

Copy link
Copy Markdown

Greptile Summary

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

  • Preserves the default four-family panel while permitting explicit family selection and removal.
  • Adds native Codex model/effort overrides using history-free forks.
  • Extends runner tests for Claude arrays and Grok authentication/model checks.
  • Synchronizes the local candidate version across manifests and upstream metadata.
  • The single-family setup path conflicts with the mandatory independent-judge smoke test, and the new extension interface needs an unambiguous format.

Confidence Score: 4/5

The 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

Important Files Changed

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]
Loading

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment on lines +27 to +29
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Extension Format Is Undefined

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 ericlitman left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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 RIGHT Reject unavailable-model Grok preflights — With API-key auth, an exit-0 response such as You are using XAI_API_KEY.\nmodel grok-4.6 is not supported sets authenticated, matches the model token, and makes unavailableStatus return unavailable-model. This condition rejects only unauthenticated, 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 reject unavailable-model.

Non-blocking findings

  • LOW plugins/pstack/skills/setup-pstack/SKILL.md:61 RIGHT Complete 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-pstack flow 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

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.

Fix Codex setup with Claude JSON event arrays and Grok API-key authentication

2 participants