Repository navigation
test: keep the post-scan CI hint out of non-interactive output - #476
Merged
Merged
Conversation
Drive vg scan in each non-interactive mode and assert the drift-driver panel and the init --ci github suggestion stay out of piped stdout, JSON, SARIF, JUnit, and CI=true. An interactive run still names the same driver the JSON score ranks first. Document --quiet as the switch that hides the panel on a terminal. Fixes #390 Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
Lock the scan command so the biggest-driver panel and the vg init --ci github suggestion stay off a pipe, CI, JSON, SARIF, and the JUnit file. Fixes #390 Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
vibgrate-team
marked this pull request as ready for review
October 19, 2026 05:17
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.
Summary
The post-scan panel that names the biggest drift driver and suggests
vg init --ci githubis only for a person at a terminal. This adds end-to-end checks that the panel cannot leak into output a tool or a CI log would parse. No output-path change was required.src/reporting/commands/scan-ci-hint.test.tsrunsvg scanagainst a local fixture (an old Node engine, offline, no network) and checks:init --ci github, and does not printinit --ci github ..stdout.isTTYunset orfalse) andCI=true(even on a TTY) print the drift report and omit the panel.--format jsonand--format sarifomit the panel on a TTY and on a real stdout pipe. The documents still parse.--junitwrites XML with no hint text. On a TTY the text report still shows the panel, so the file check is not passing because the scan had nothing to say. WithCI=true, JSON, or SARIF, stdout and the JUnit file both omit it.The piped cases spawn the CLI so the child sees a real non-TTY stdout.
Related issues
Fixes #390
Checklist
pnpm testpassespnpm lintis cleanpnpm typecheckis cleangraph.json/ report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)git commit -s, DCO)Notes for reviewers
Tests only. The scan's existing decision about when to pass
ciHintis unchanged.