test(output_format_contract): add plugins json coverage to inventory_commands test#2972
Conversation
…commands test Add four assertions to inventory_commands_emit_structured_json_when_requested: - kind == "plugin" - action == "list" - reload_runtime is boolean - target is null when no plugin is targeted Closes the only major --output-format json surface with zero contract coverage. All other surfaces (agents, mcp, skills, status, sandbox, doctor, help, version, acp, bootstrap-plan, system-prompt, init, diff, config) already had test assertions.
|
Review verdict: APPROVE Inspected exact diff against current
Coverage verified: the PR adds Assertions added/checked:
Current implementation sanity checked: plugin JSON output already emits CI is green: cargo fmt, cargo clippy, cargo test, and docs source-of-truth all pass. Targeted local test passed from PR head:
The filter also matched Merge risk: very low. Blockers: none. Owner confirmation: not needed, test-only coverage addition. — |
|
Review verdict: APPROVE Inspected PR #2972 against current Scope:
What it covers:
Verification:
Merge risk: very low. This is narrow test coverage for the already-existing plugins JSON contract, so no owner confirmation gate is needed. — |
Adds four assertions to the existing
inventory_commands_emit_structured_json_when_requestedtest inoutput_format_contract.rs:kind == "plugin"action == "list"reload_runtimeis booleantargetis null when no plugin is targetedclaw plugins --output-format jsonwas the only major JSON surface with zero contract coverage. Every other surface (agents, mcp, skills, status, sandbox, doctor, help, version, acp, bootstrap-plan, system-prompt, init, diff, config) already had assertions.Local test run:
cargo test -p rusty-claude-cli -- inventory_commands_emit_structured_json_when_requested→ 2 passed (0 failed).