Skip to content

feat(list): --full emits description/tags/fields in JSON for bulk queries (REQ-211, #506)#507

Merged
avrabe merged 1 commit into
mainfrom
feat/list-full-json
Jun 6, 2026
Merged

feat(list): --full emits description/tags/fields in JSON for bulk queries (REQ-211, #506)#507
avrabe merged 1 commit into
mainfrom
feat/list-full-json

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Jun 6, 2026

Problem (#506)

AGENTS.md / CLAUDE.md direct agents to rivet list --format json for "machine-readable artifact queries", but that output is summary-onlyid/type/title/status/links across all 917 artifacts. It drops description, tags, and fields, so a bulk query for a field value (e.g. priority, or the acceptance text) needed either one rivet get <ID> subprocess per artifact or a raw YAML parse.

Change

Add an opt-in --full flag to rivet list. With --format json, each entry also carries description (string), tags (array), and fields (object) — matching rivet get <ID> --format json, but in bulk.

$ rivet list --format json --full --filter '(= id "REQ-210")' | jq '.artifacts[0] | keys'
[ "description", "fields", "id", "links", "status", "tags", "title", "type" ]
  • Additive / opt-in. Default output is unchanged; list-output.schema.json is additionalProperties: true, so no existing consumer breaks.
  • Inserted before the --variant block, so a variant's merged fields: view still wins when both flags are set.

Bonus: schema drift fix

schemas/json/list-output.schema.json still typed links as {"type":"integer"} ("Number of outgoing links"), but the actual output has been an array of {type,target} objects since #358. The schema now matches reality and documents the new optional --full keys.

Verification (REQ-211 acceptance)

  • list --format json --full adds the rich keys; plain list stays summary-only; --full's fields for an id equals get's fields (asserted in the new list_json_full_includes_rich_fields test).
  • cargo test -p rivet-cli --test cli_commands128 passed, 0 failed (full suite).
  • cargo fmt --check + cargo clippy -p rivet-cli --all-targets -- -D warnings — exit 0.
  • rivet validate — PASS.

REQ-211 filed + flipped implemented in the same commit (repo convention).

Closes #506.

🤖 Generated with Claude Code

…ries (REQ-211, #506)

AGENTS.md/CLAUDE.md point agents to `rivet list --format json` for
machine-readable queries, but that output is summary-only
(id/type/title/status/links) across all 917 artifacts — it drops
description/tags/fields. So a bulk query for a field value (e.g. `priority`)
needed one `rivet get <ID>` subprocess per artifact or a raw YAML parse
(#506).

Add an opt-in `--full` flag: with `--format json`, each entry also carries
description (string), tags (array), and fields (object), matching
`get <ID> --format json`. Additive — default output is unchanged and
list-output.schema.json is `additionalProperties: true`, so no consumer
breaks. Inserted before the `--variant` block so a variant's merged `fields:`
view still wins when both flags are set.

Also corrects drift in list-output.schema.json: `links` was still typed as an
integer count, but the actual output has been an array of {type,target}
objects since #358 — the schema now matches, and documents the new optional
--full keys.

Confirmed with: `rivet list --format json --full` adds the rich keys while
plain `list` stays summary-only, and --full's `fields` for an id equals
`get`'s `fields`; cargo test -p rivet-cli --test cli_commands (128 passed,
0 failed — full suite, incl. the new list_json_full_includes_rich_fields);
cargo fmt --check + cargo clippy -p rivet-cli --all-targets -- -D warnings
(exit 0); rivet validate PASS.

Implements: REQ-211
Refs: REQ-007, #358

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit 2871c97 into main Jun 6, 2026
19 of 20 checks passed
@avrabe avrabe deleted the feat/list-full-json branch June 6, 2026 08:47
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 6, 2026

📐 Rivet artifact delta

Change Count
Added 1
Removed 0
Modified 0
Downstream impacted (depth ≤ 5) 0

Graph

graph LR
  REQ_211["REQ-211"]:::added
  classDef added fill:#d4edda,stroke:#28a745,color:#155724
  classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
  classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
  classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Loading
Added
  • REQ-211

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-507download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 7628f7e Previous: ecb073a Ratio
store_lookup/1000 23338 ns/iter (± 33) 19344 ns/iter (± 32) 1.21
validate/1000 18042012 ns/iter (± 184268) 14088386 ns/iter (± 242969) 1.28
validate/10000 1433558689 ns/iter (± 19174588) 949773803 ns/iter (± 6493087) 1.51
diff/100 63385 ns/iter (± 277) 52775 ns/iter (± 999) 1.20
diff/1000 725809 ns/iter (± 2227) 601429 ns/iter (± 2712) 1.21
query/100 1189 ns/iter (± 10) 884 ns/iter (± 4) 1.35
query/1000 14833 ns/iter (± 189) 11248 ns/iter (± 15) 1.32

This comment was automatically generated by workflow using github-action-benchmark.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

rivet list --format json is summary-only — no description/tags/fields, so machine-readable queries need N× get or a raw YAML parse

1 participant