Skip to content

test: keep the post-scan CI hint out of non-interactive output - #476

Merged
vibgrate-team merged 3 commits into
mainfrom
cursor/scan-ci-hint-noninteractive-881d
Oct 19, 2026
Merged

vibgrate-team merged 3 commits into
mainfrom
cursor/scan-ci-hint-noninteractive-881d

Conversation

@vibgrate-team

@vibgrate-team vibgrate-team commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The post-scan panel that names the biggest drift driver and suggests vg init --ci github is 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.ts runs vg scan against a local fixture (an old Node engine, offline, no network) and checks:

  • An interactive TTY text report includes the panel, the driver line, and init --ci github, and does not print init --ci github ..
  • A pipe (stdout.isTTY unset or false) and CI=true (even on a TTY) print the drift report and omit the panel.
  • --format json and --format sarif omit the panel on a TTY and on a real stdout pipe. The documents still parse.
  • --junit writes 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. With CI=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 test passes
  • pnpm lint is clean
  • pnpm typecheck is clean
  • Docs updated (README / DOCS / ARCHITECTURE) where behavior changed
  • Determinism preserved — identical input still produces identical graph.json / report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)
  • No proprietary or internal references — public, Apache-2.0 content only
  • Commits use Conventional Commits and are signed off (git commit -s, DCO)

Notes for reviewers

Tests only. The scan's existing decision about when to pass ciHint is unchanged.

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 14, 2026 13:19
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
vibgrate-team marked this pull request as ready for review October 19, 2026 05:17
@vibgrate-team
vibgrate-team merged commit a9a2731 into main Oct 19, 2026
1 check 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.

Test: post-scan drift-driver hint and vg init --ci github nudge never appear in non-interactive output

2 participants