Skip to content

Feat/expand check results#5

Open
adkinsty wants to merge 4 commits intomainfrom
feat/expand-check-results
Open

Feat/expand check results#5
adkinsty wants to merge 4 commits intomainfrom
feat/expand-check-results

Conversation

@adkinsty
Copy link
Copy Markdown
Collaborator

@adkinsty adkinsty commented Apr 6, 2026

Summary

  • Add --ids flag to results list for fetching results for specific check IDs (comma-separated)
  • Use ListChecks with check IDs internally to enrich contract verify scan results — previously only showed ID and status; now shows column, value, ane name of the check as well; check id, check type, dataset dqn, and check definition included in json output only.
  • Extract shared renderCheckRows so both results list and contract verify produce consistent output and JSON fields
  • results list table now shows: dataset, column, name (of check/monitor), value, status, date; check id, check type, dataset dqn, and check definition included in json output only.
  • Add ⚠ warning symbol for warn status in table output
  • Add --exact flag to results list to switch --dataset-name from substring to exact match — useful when a dataset name is a prefix of other dataset names
image

Motivation

The CLI had no way to look up specific checks by ID from the terminal. This is useful both directly — e.g. fetching the checks you care about without filtering by dataset — and as a building block for enriching other commands.

The main beneficiary is contract verify: scan results previously showed check IDs (uuid) and statuses from the scan response. Now the full check record is fetched via --ids, giving you column, value, and a properly sorted results table — without needing to open the UI.

results list and contract verify now share the same rendering logic, so output is consistent across both commands.

Test plan

  • sodacli results list --dataset-name <name> shows correct columns
  • sodacli results list --ids <id1>,<id2> returns specific checks by ID
  • sodacli results list -o json includes id, definition, type fields
  • sodacli contract verify <file.yml> shows enriched results with column, value, and check name
  • warn status shows ⚠ warning in table output

🤖 Generated with [Claude Code](https://claude.com/claude-code

adkinsty added 3 commits April 6, 2026 01:13
  - Add --ids flag to results list for fetching specific checks by ID
  - Enrich contract verify scan results via ListChecks — now shows column, value, and full check
  name
  - Extract shared renderCheckRows for consistent output across both commands
  - Sort contract verify results by column

  Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…passing/failing labels, add

  warning symbol, remove unused Check fields

  Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dqn to JSON output, update

  docs

  Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@adkinsty adkinsty requested a review from santiviquez April 6, 2026 05:24
Two flags where one modifies the meaning of the other is an API smell:
before, `--dataset-name` alone meant substring, and `--dataset-name
--exact` meant equality. Collapse to a single behavior — exact DQN
match (case-insensitive) — which matches how `--dataset <id>` already
works (exact by ID). Substring discovery belongs on `dataset list
--filter`, which already exists for that purpose.

Breaking change for anyone relying on substring matching here, but the
failure mode is obvious (zero rows) rather than silent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@santiviquez
Copy link
Copy Markdown
Collaborator

Hi @adkinsty I pushed a small follow-up that drops --exact and makes --dataset-name always do an exact, case-insensitive match against the fully qualified name.

My reasoning: having a boolean flag that flips the meaning of another flag is an API smell. --dataset-name "orders" alone vs --dataset-name "orders" --exact means two different things, and which is the default is not obvious and would have have to memorize.

Substring discovery still is available when doing dataset list --filter <query>

The rest looks good, let me know if this makes sense for you use case. If so, I'll merge it.

@adkinsty
Copy link
Copy Markdown
Collaborator Author

Sounds good to me

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.

2 participants