Skip to content

fix(mcp): name the right selector or include when get_health or get_risk drops an argument - #4366

Open
RaghavChamadiya wants to merge 1 commit into
mainfrom
fix/mcp-health-id-hint
Open

RaghavChamadiya wants to merge 1 commit into
mainfrom
fix/mcp-health-id-hint

Conversation

@RaghavChamadiya

Copy link
Copy Markdown
Member

What

  • get_health(plan_id="fix1_...") returned plan: null, resolved: false with nothing saying the id belongs in fix_id, which reads as "no such plan". A detail lookup that misses on an id minted for another selector now carries a hint naming the right one (Pass fix_first ids (fix1_...) as fix_id, not plan_id.). The id is never resolved under the other selector, so a swapped argument stays visible.
  • unknown_only_keys_hint listed performance_opportunities and refactoring_plans as valid keys without saying they need include=["performance"] / ["refactoring"]. It now leads with the include each include-gated miss needs.
  • get_risk(targets=[...], include=["tests"]) dropped tests (and blast) silently. Without changed_files they land in ignored_arguments with "requires": "changed_files".

How

  • One prefix table in tool_health/details.py (fix1_, act_, finding_, refac, refop, perf, as minted in core) generalizes the existing finding_id hint to every selector; applied after the lookup, on misses only.
  • Default responses are unchanged: every addition is on a miss or an already-ignored argument.

Verification

  • New tests per case (wrong-kind id per selector, right-kind miss stays hint-free, a guard that every minted id format maps to its own selector, include-gated only hint with and without the include, get_risk targets-only vs PR mode).
  • Targeted MCP suites for health, risk, docs drift and wire contracts: 800+ tests pass locally.

…isk drops an argument

A get_health lookup that misses on an id minted for another selector (a
fix1_ id passed as plan_id) carries a hint naming the right selector. The
unknown_only_keys hint names the include an include-gated key needs, and
get_risk names tests and blast in ignored_arguments when no changed_files
were passed.
@repowise-bot

repowise-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🔍 1 thing to check

  1. 2 files that usually change with this PR's files are not in it: packages/server/src/repowise/server/mcp_server/tool_health/request.py changed in 11 of the 19 commits that touched packages/server/src/repowise/server/mcp_server/tool_health/tool.py; packages/server/src/repowise/server/mcp_server/tool_health/loading.py changed in 10 of the 19 commits that touched packages/server/src/repowise/server/mcp_server/tool_health/tool.py

✅ Health of changed files: 8.0 (unchanged)
Average full file score (structure and history) of 6 changed code files, weighted by size before this PR; not the repository score.

Check Result
Coverage 100% of 26 changed lines covered
Tests 4 of 4 changed code files reached by a test · which tests
Security No new findings on changed lines
Doc drift No drift in docs this PR edits
Coverage

Patch coverage 100.0% (26 of 26 changed executable lines covered)

6e9d412 · cobertura · 4 of 8 changed files measured, 4 out of scope

Report from this run for 6e9d412.

🧾 Evidence: 6 not known
Item Status Evidence
Components touched ok · inferred 3 components: docs, packages, tests
Declared owners ok · declared @RaghavChamadiya, @swati510
Suggested reviewers unknown · not known Not known: not gathered on a pull request
Tests reaching the change unknown · not known 0 of 4 changed files reached by a test; 4 not known
Contracts touched ok · measured No workspace contract touched; no breaking signature change
Consumers in other repos unknown · not known Not known: not gathered on a pull request
Decisions crossed unknown · not known Not known: decision records are read only for an AI review
Health delta ok · measured Findings: 0 introduced, 0 worsened, 0 resolved
AI provenance unknown · not known Provenance: unknown, known for 0 of 1 commit; AI share withheld: coverage 0% is below 30%
Diff size rank ok · measured Larger than 46.9% of recent commits
Outcomes since merge unknown · not known Not known: a pull request is not a merged change

AI review is paused: this repository reached its monthly spending limit. Bot settings


📊 See the full report for this PR
Blast radius, every caller of the contracts it changes, and health before and after. No sign-in.
Plain markdown for agents

Settings and updates

Updated 2026-10-21 19:19 UTC
Silence one PR with [skip repowise] in the title · Bot settings
⭐ Star Repowise · 📥 Install on another repo

This branch has not been deployed

No deployments
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