feat(mcp): add set_finding_status — the durable write half of findings triage (#1535) - #2043
Open
sloemo01 wants to merge 5 commits into
Open
feat(mcp): add set_finding_status — the durable write half of findings triage (#1535)#2043sloemo01 wants to merge 5 commits into
sloemo01 wants to merge 5 commits into
Conversation
…s triage (repowise-dev#1535) The refactoring lifecycle (repowise-dev#1986) already gave plans stable content ids and an open|acknowledged|resolved|false_positive vocabulary, and the web UI can PATCH a status. The missing piece named in repowise-dev#1535 was the agent-facing write: get_health asks agents to flag false positives, but there was nowhere to record that verdict. This tool closes the loop. - set_finding_status (opt-in specialist, safety=mutating): resolves a plan by storage id, content public_id, or the display id a deep link carries (same fallback generate_refactoring_code uses), then writes through update_refactoring_suggestion_status — the single lifecycle owner — so a false_positive recorded here is suppressed by the finalizer on every later run, exactly like the REST PATCH path. - reason is stored on the row for audit. - Tool layer tests pin the vocabulary, the shared-writer routing, and the display-id fallback; the CRUD lifecycle stays pinned by test_refactoring_lifecycle.py (20 pass). - Docs: MCP_TOOLS.md (18 total / 7 specialists + full section), server README count. Drift guards all pass (27).
…dev#1535) The new specialist tool moved the totals from 17 to 18 (and six to seven opt-in specialists) in three more artifacts the drift guards pin: website/mcp-server.md, mcp_cmd.py's docstring, and the INTEGRATIONS.md surface section (regenerated via scripts/gen_agent_matrix.py).
…v#1535) - test_tool_findings.py: drop unused ALLOWED_STATUSES import, unused matched var, combine nested withs - READMEs/website: 17→18 tool counts (server, cli, concepts, index)
…epowise-dev#1535) Main's test_every_registered_tool_declares_a_contract requires every registered tool to have a contract; set_finding_status fell through. Small fixed write response — no shed order, all fields protected. Also records its shape in tool_response_shapes.json.
sloemo01
force-pushed
the
feat/findings-disposition
branch
from
September 1, 2026 10:39
6aff3d2 to
38049ee
Compare
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.
What
Fixes #1535 (track 2 — the disposition lifecycle). A new opt-in specialist MCP tool,
set_finding_status(safety:mutating).Root cause
#1986 (merged Aug 29) already gave refactoring plans a versioned identity and real lifecycle: stable content-derived
public_id, theopen|acknowledged|resolved|false_positivevocabulary, a finalizer that never re-emitsfalse_positiveplans, andupdate_refactoring_suggestion_statusas the single writer. The web UI can PATCH a status. What #1535 still names as missing is the agent-facing write:get_healthand the generated task prompts tell agents to flag false positives, but there was nowhere to record that verdict from inside the agent loop.Changes
public_id, or the display id a deep link carries (same fallbackgenerate_refactoring_codeuses).update_refactoring_suggestion_status— the single lifecycle owner — so afalse_positiverecorded here is suppressed by the finalizer on later runs, exactly like the REST PATCH path. No second writer.reasonis a free-text note stored on the row for audit.open,acknowledged,resolved,false_positive.Tests
4 tool-layer tests (vocabulary validation, missing-plan error, shared-writer routing with reason, display-id fallback) — 20 pass with the lifecycle suite. All 27 MCP surface/drift guards pass.
Note:
test_plugin_contentis red on main itself (v0.47.0 release bug, unrelated to this PR).