Skip to content

Compare CLI and MCP parameter defaults in the parity test - #20

Merged
NielsRogge merged 1 commit into
mainfrom
claude/parity-default-check
Sep 18, 2026
Merged

NielsRogge merged 1 commit into
mainfrom
claude/parity-default-check

Conversation

@NielsRogge

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #19, prompted by review feedback: instead of asserting that search_papers.mode defaults to the literal hybrid, the parity test now compares every CLI research-flag default against the MCP tool schema default. A future change to pwc search --mode (or any other flag default) on either side fails tests/test_parity.py.

  • argparse "unset" placeholders (None, SUPPRESS, (), []) are treated as the schema's null.
  • DEFAULT_EXCEPTIONS lists the only deliberate divergences, all on limit and already documented in README as the hosted 25-row cap: list_methods (50 → 25), list_benchmarks and list_tasks (50 → server-chosen).
  • The boolean-flag branch keeps its type check; its default check is now covered by the general comparison.

Verification

cd mcp_server && uv run pytest -q   # 56 passed

Negative check: temporarily setting DEFAULT_SEARCH_MODE = "keyword" in server.py makes the parity test fail with AssertionError: ('search_papers', 'mode').

Test-only change; no component release needed.

🤖 Generated with Claude Code

The parity test checked that every CLI research flag has a tool
parameter but only pinned defaults for boolean flags, so the MCP tools
could quietly default differently from `pwc` (as search_papers did
with keyword versus hybrid). Compare every CLI default against the tool
schema default, treating argparse's unset placeholders as null and
listing the documented hosted row-cap divergences on `limit` as the
only exceptions, so a future default change on either side fails
the test.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@NielsRogge
NielsRogge merged commit ceb3287 into main Sep 18, 2026
2 checks passed
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.

1 participant