Repository navigation
fix: accept Claude JSON event arrays - #48
Merged
Merged
Conversation
Claude and gateway lanes rejected event arrays before reaching the terminal result. Sync the parser behavior from open-pstack PR ericlitman#130 for #38 while preserving fork-specific model verification and gateway accounting. - Select the last result event and retain legacy object output. - Reject terminal errors before requiring final text. - Cover terminal metadata, malformed output, and error precedence across Claude, DeepSeek, MiniMax, and OpenRouter.
thisguymartin
marked this pull request as ready for review
October 13, 2026 22:40
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.
Closes #38
What changed
Claude and gateway lanes rejected JSON event arrays. The shared parser now accepts legacy objects and selects the last
type: "result"event from arrays, including its model, session, usage, and cost metadata.costUsd: nullaccounting.Syncs the parser change from open-pstack PR #130. Its Grok changes are outside this PR.
Verification
bash scripts/check.shpassed on a clean copy of base33eba49plus this PR's two files: 284 tests, strict typechecks, static invariants, manifest parsing, and both Claude plugin validators. All 32 focused parser tests passed; the new cases exposed 16 failures before the fix. Unrelated concurrent workspace edits were excluded from the candidate and PR.Security scan: PASS for the complete two-file diff and parser -> model verification -> receipt boundary. No confirmed findings. No dependency audit requested.
Live evidence:
Candidate: pstack 1.5.0 @
735b8d45699a0ac1ea20f8bfc64ea786f124918d.Claude Code, Codex, OpenCode beta, and OMP: candidate installation and real-surface tests not run, as requested. No installed version or live result is claimed. Setup, scope, and Claude/gateway dispatch checks remain pending under
docs/LIVE-GATE.md.A pull request without live evidence remains a draft. Do not merge, tag, release, or roll it out.