Skip to content

feat: add retrievalCommand to JSON dataProduced#960

Merged
stack72 merged 1 commit intomainfrom
feat/issue-953-retrieval-command
Mar 30, 2026
Merged

feat: add retrievalCommand to JSON dataProduced#960
stack72 merged 1 commit intomainfrom
feat/issue-953-retrieval-command

Conversation

@keeb
Copy link
Copy Markdown
Contributor

@keeb keeb commented Mar 30, 2026

Summary

  • Adds a version-pinned retrievalCommand field back to each dataProduced entry in the method-summary report JSON output
  • Restores backwards compatibility for scripts that relied on jq '.dataProduced[].retrievalCommand' (regression from feat: optimize CLI output for AI agent consumption #944)
  • The command format matches the existing markdown table: swamp data get <modelName> <dataName> --version <version>

Test Plan

  • Updated existing test to verify retrievalCommand content matches expected format
  • Updated JSON structure shape test to include retrievalCommand in expected keys
  • All 3763 tests pass
  • deno check, deno lint, deno fmt all pass

Closes #953

🤖 Generated with Claude Code

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]>
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.

Code Review

Blocking Issues

None.

Suggestions

None — this is a clean, minimal change. The retrievalCommand field mirrors the existing markdown table format, tests cover both value correctness and structural shape, and no import boundaries are violated. LGTM.

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.

Adversarial Review

Critical / High

None.

Medium

None.

Low

  1. Unquoted arguments in retrievalCommand string (method_summary_report.ts:200-201): If definition.name or h.name contains spaces or shell metacharacters, the generated command string would be incorrect when pasted into a shell. Example: a model named my server would produce swamp data get my server output.json --version 1 (4 positional args instead of 3). However, this is a pre-existing patternrenderPointersMarkdown (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.

@stack72 stack72 merged commit 97da46c into main Mar 30, 2026
10 checks passed
@stack72 stack72 deleted the feat/issue-953-retrieval-command branch March 30, 2026 22:06
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.

method-summary report: add retrievalCommand back to JSON dataProduced

2 participants