feat(list): --full emits description/tags/fields in JSON for bulk queries (REQ-211, #506)#507
Merged
Conversation
…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>
📐 Rivet artifact delta
Graphgraph 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
Added
Posted by |
There was a problem hiding this comment.
⚠️ 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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Problem (#506)
AGENTS.md/CLAUDE.mddirect agents torivet list --format jsonfor "machine-readable artifact queries", but that output is summary-only —id/type/title/status/linksacross all 917 artifacts. It dropsdescription,tags, andfields, so a bulk query for a field value (e.g.priority, or the acceptance text) needed either onerivet get <ID>subprocess per artifact or a raw YAML parse.Change
Add an opt-in
--fullflag torivet list. With--format json, each entry also carriesdescription(string),tags(array), andfields(object) — matchingrivet get <ID> --format json, but in bulk.list-output.schema.jsonisadditionalProperties: true, so no existing consumer breaks.--variantblock, so a variant's mergedfields:view still wins when both flags are set.Bonus: schema drift fix
schemas/json/list-output.schema.jsonstill typedlinksas{"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--fullkeys.Verification (REQ-211 acceptance)
list --format json --fulladds the rich keys; plainliststays summary-only;--full'sfieldsfor an id equalsget'sfields(asserted in the newlist_json_full_includes_rich_fieldstest).cargo test -p rivet-cli --test cli_commands— 128 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
implementedin the same commit (repo convention).Closes #506.
🤖 Generated with Claude Code