Repository navigation
feat(cli): add --output-format json to upload and validate - #1277
Merged
trunk-io[bot] merged 1 commit intoNov 4, 2026
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dylan/trunk-22404-print-the-cli-summary-on-stdout-and-remove-endoutput #1277 +/- ##
==========================================================================================================
+ Coverage 82.75% 85.94% +3.19%
==========================================================================================================
Files 85 85
Lines 19105 19258 +153
==========================================================================================================
+ Hits 15811 16552 +741
+ Misses 3294 2706 -588 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
acatxnamedvirtue
approved these changes
Nov 2, 2026
dfrankland
force-pushed
the
dylan/trunk-22405-add-output-format-json-to-upload-and-validate
branch
from
November 4, 2026 18:34
f3d1ce1 to
4e5a468
Compare
|
😎 Stack merged successfully - details. |
`--output-format json` (or `TRUNK_OUTPUT_FORMAT=json`) prints the summary on stdout as the same JSON that `--summary-output-file` writes, instead of the text summary. Logs, notices and progress stay on stderr, and a run that fails outright prints its JSON error object on stdout. Exit codes don't change. The flag lives in its own args struct used only by `upload` and `validate`: `test` includes `UploadArgs`, and its test command writes to stdout. The summary schema now covers the validate report (`"type": "VALIDATE"`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dfrankland
force-pushed
the
dylan/trunk-22405-add-output-format-json-to-upload-and-validate
branch
from
November 4, 2026 19:55
4e5a468 to
66bbf52
Compare
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.
Part of TRUNK-18881. Closes TRUNK-22405. Stacked on #1273 (which is stacked on #1266).
--output-format json(orTRUNK_OUTPUT_FORMAT=json) onuploadandvalidateprints the summary on stdout as the same JSON that--summary-output-filewrites, so it can be piped into other tools.OutputFormatArgs, used only byuploadandvalidate.testdoesn't get it: it includesUploadArgs, and its test command writes to stdout."type": "VALIDATE"), sosummary-output-schemadescribes it too.A run stopped by SIGINT/SIGTERM prints nothing on stdout, as in text mode.
Tests
New integration tests in
cli/testscheck that stdout parses as JSON (and matches--summary-output-file), that the exit code andexitCodeagree, and that logs, notices and a progress message (mock API slowed to 3s) go to stderr, forupload, a faileduploadviaTRUNK_OUTPUT_FORMAT, andvalidatewith and without errors.🤖 Generated with Claude Code