Repository navigation
test(cli): show the CLI's exit status and output in e2e failures - #412
Merged
Merged
Conversation
`run()` threw a `CommandError` whose message was only the command line. Vitest's failure summary prints the message, so CI showed "Command failed: node bin/argos-cli.js …" with no hint of the API error; the stderr only surfaced in the GitHub annotations at the very end of the log. The message now includes the exit status (or the signal), any spawn error, the CLI's stderr and, when non-empty, its stdout. Each stream keeps only its last characters, since the CLI prints its error last and `--json` output can be large. `status`, `stdout` and `stderr` are still set on the error for the tests that read them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Build the message inline in `run()` with one `tail()` helper instead of two formatters and a hand-written copy of the spawnSync result type. Blank streams are left out rather than shown as "(empty)", and the tail is no longer trimmed to a whole line: the omitted-characters marker already says it is cut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
e2e-corehas failed on every PR since late October, always on the same 11 CLI tests that useUSER_ACCESS_TOKEN. The failure summary only saysCommand failed: node bin/argos-cli.js …, becauserun()inpackages/cli/e2e/utils.tsputs only the command line in the error message. The CLI's stderr only shows up in the GitHub annotation block at the very end of the log, which is easy to miss.What
The
CommandErrormessage now contains:ENOBUFS)status,stdoutandstderrare still set on the error, so the tests that read them don't change. Nothing new reads environment values; the command line already contained--token(which GitHub masks).Example:
Testing
tsc --noEmit,eslintandprettier --checkpass.🤖 Generated with Claude Code