Clarify trial filter help: facility modes, phase 1/2 semantics, sex all no-op#213
Merged
Clarify trial filter help: facility modes, phase 1/2 semantics, sex all no-op#213
Conversation
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
Improves the clarity of
biomcp search trialhelp text for three filter flags that had confusing or missing guidance:--facility: Now distinguishes between text-search mode (cheap, plain string match) and geo-verify mode (materially more expensive, triggers N extra fetches per result) that activates when--lat/--lon/--distanceare also provided.--phase 1/2: Now explains that the value1/2matches the ClinicalTrials.gov combined Phase 1/Phase 2 label (studies tagged as both phases simultaneously), not Phase 1 OR Phase 2.--sex all: Now explains thatall(alsoany/both) resolves to no sex restriction — no sex filter is sent to ClinicalTrials.gov — so users know the flag is a no-op rather than a missing echo.No changes to underlying filter logic, parsers, search, or render behavior.
Changes
src/cli/mod.rs: Updated doc comments for--facility,--phase, and--sex; addedrender_trial_search_long_help()helper and three CLI help contract tests.spec/04-trial.md: Added "Trial Help Explains Special Filter Semantics" spec section asserting all three clarified surfaces.Test plan
cargo test— 619 passed, 0 failedcargo clippy --all-targets --all-features— cleancargo fmt --check— cleanmake spec— 103 passed (pre-existing Gene→Articles network timeout in spec/02-gene.md is unrelated)biomcp search trial --help— all three clarifications visible in rendered output