mirror of
https://github.com/expo/code-review-cli.git
synced 2026-11-15 17:30:42 -10:00
Three fixes to the documentation MCP surfaced by review: Query recall: the sanitizer required a CamelCase-style API anchor, which rejected legitimate queries such as `expo-camera barcode scanner`, `gradle configuration cache`, and `coroutine cancellation cooperative` — exactly the guide, release-note, and Expo topics that have no symbol. Accept hyphenated package tokens as anchors and accept short multi-word lowercase concept phrases. The length, entropy, token-count, and secret checks are unchanged, and a single generic word still fails closed. Honest limits: the search tool advertised limit 1-10 (default 5) while the server silently clipped results to resultsPerQuery (default 2), and the same bound accidentally capped fetch_platform_doc's focused passage count. Derive the advertised schema maximum and default from the enforced cap, and give the focused passage count its own independent bound. Rejection visibility: sanitizer rejections, refused direct-fetch URLs, and budget-exhausted attempts left no audit trace, so operators could not see unmet research demand. Audit each refusal by reason class only (query-rejected, url-rejected, budget-exhausted) — never the refused input, which may be exactly the material the sanitizer refused to send — and surface the counts in progress output and the step summary. Also warn instead of returning silently empty when requested source kinds exclude the Expo search, and record the platform on fetch audit inputs so failed fetches stop mislabeling as react-native.