feat: add retrievalCommand to JSON dataProduced#960
Merged
Conversation
Restores the version-pinned retrievalCommand field in each dataProduced entry of the method-summary report JSON output, fixing the backwards compatibility regression from PR #944. Closes #953 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Adversarial Review
Critical / High
None.
Medium
None.
Low
- Unquoted arguments in
retrievalCommandstring (method_summary_report.ts:200-201): Ifdefinition.nameorh.namecontains spaces or shell metacharacters, the generated command string would be incorrect when pasted into a shell. Example: a model namedmy serverwould produceswamp data get my server output.json --version 1(4 positional args instead of 3). However, this is a pre-existing pattern —renderPointersMarkdown(line ~78) already generates the identical unquoted format for the markdown table. The naming validators also make spaces uncommon in practice. Not introduced by this PR.
Verdict
PASS — Minimal, correct change that adds an informational retrievalCommand field to JSON output, matching the existing markdown pattern. Tests properly verify both the field value and the updated shape. No new issues introduced.
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.
Summary
retrievalCommandfield back to eachdataProducedentry in the method-summary report JSON outputjq '.dataProduced[].retrievalCommand'(regression from feat: optimize CLI output for AI agent consumption #944)swamp data get <modelName> <dataName> --version <version>Test Plan
retrievalCommandcontent matches expected formatretrievalCommandin expected keysdeno check,deno lint,deno fmtall passCloses #953
🤖 Generated with Claude Code