Skip to content

fix: refuse invalid JSON from eb-stack stack from-commit - #237

Merged
HaoZeke merged 1 commit into
mainfrom
fix/from-commit-invalid-json
Nov 19, 2026
Merged

HaoZeke merged 1 commit into
mainfrom
fix/from-commit-invalid-json

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

fix: refuse invalid JSON from eb-stack stack from-commit

With --check-from-commit, eb-pipeline passed the standard output of
eb-stack stack from-commit through without parsing it. When eb-stack
exited zero but wrote a broken document, the check still reported
success. A caller reading the JSON (JavaScript Object Notation) then
got a truncated document and exit status 0.

The check now parses that output and fails when it does not parse. It
uses the shared JSON reader in src/exit.rs, split so the reader also
takes bytes from a pipe.

The integration test replaces eb-stack with a stub that prints a lone
opening brace and records its arguments. It checks the forwarded
stack from-commit --easystack PATH --json and the failing exit.

With `--check-from-commit`, eb-pipeline passed the standard output of
`eb-stack stack from-commit` through without parsing it. When eb-stack
exited zero but wrote a broken document, the check still reported
success. A caller reading the JSON (JavaScript Object Notation) then
got a truncated document and exit status 0.

The check now parses that output and fails when it does not parse. It
uses the shared JSON reader in src/exit.rs, split so the reader also
takes bytes from a pipe.

The integration test replaces eb-stack with a stub that prints a lone
opening brace and records its arguments. It checks the forwarded
`stack from-commit --easystack PATH --json` and the failing exit.
@HaoZeke
HaoZeke merged commit d17430f into main Nov 19, 2026
7 checks passed
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.

1 participant