Skip to content

fix: show query output when expect-results fails#1

Merged
darcyclarke merged 1 commit intomainfrom
fix/show-failed-output
Mar 3, 2026
Merged

fix: show query output when expect-results fails#1
darcyclarke merged 1 commit intomainfrom
fix/show-failed-output

Conversation

@vltbaudbot
Copy link
Collaborator

When a query fails its expect-results check, the actual query output is now shown in both the CI logs and the step summary. This lets users see exactly which packages matched, making failures debuggable.

Changes

CI log output for failed queries

When a query fails (either expect-results mismatch or vlt CLI error), executeQueries() now logs:

  • stdout — shows which packages matched (e.g. copyleft license packages)
  • stderr — shows CLI errors (e.g. unsupported selector :diff())

Summary table for failed queries

The "Failed Queries" section in the step summary now includes the actual query output in a code block, so users can see results directly in the GitHub Actions summary page.

Configurable show-results input

New optional input show-results (default: failed) controls when query output is displayed:

  • failed — show output only for failed queries (default, backwards compatible)
  • always — show output for all queries
  • never — suppress query output entirely

Tests

Added test cases covering:

  • Failed query output shown in summary (expect-results mismatch)
  • CLI error stderr shown in summary (e.g. unsupported selector)
  • Partial stdout + stderr for CLI errors
  • show-results=never suppresses output
  • show-results=always shows successful query output

Co-authored-by: Darcy Clarke darcy@darcyclarke.me

When a query fails its expect-results check, the action now shows the
actual query output (stdout) in both the CI logs and the step summary.
This lets users see exactly which packages matched, making failures
debuggable.

For CLI errors (e.g. unsupported selector), stderr is also shown in
the CI logs alongside any partial stdout.

Adds a configurable 'show-results' input (default: 'failed') that
controls when query output is displayed:
- 'failed': show output only for failed queries (default)
- 'always': show output for all queries
- 'never': suppress query output

Co-authored-by: Darcy Clarke <darcy@darcyclarke.me>
@darcyclarke darcyclarke merged commit c43b4fa into main Mar 3, 2026
4 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.

3 participants