Repository navigation
fix: backport the MCP dropped-server notice and KAS tool aliases to 0.12.1 (batch 31) - #32202
Conversation
When a server's declared command is not found on the gateway's PATH, the default-agent rebuild leaves it out of the agent spec and says so only in a log warning. The Capabilities MCP tab still listed the server, so a user without the log could not tell why its tools never reached a chat. The rebuild now records each command-not-found drop (name, command, reason class) in mcp-dropped-servers.json under the data home, replaced whole after every rebuild that lands its spec. GET /api/mcp stamps the record onto the matching row as agentDropped, and the MCP tab renders a plain line naming the missing program and the fix: install it or set its full path, then restart the gateway from Settings. What is mounted, the per-drop log warning and ref reconciliation are unchanged. (cherry picked from commit b586455) Release backport, hand-resolved: src/kiro_crew/agent_parts/spec_rebuild.py. main wraps write_default_spec in a try/except _AgentSpecUnreadable that this branch does not have; the record_rebuild_drops call is added right after release's write_default_spec call instead, unchanged otherwise. Every other file applied unchanged. Original author: Ray Xu (#31620).
…e kiro-cli (#31885) Fold fsRead, fsWrite, executeCmd, execute_cmd, agent_crew and @builtin/<alias> to Crew's names before tools, excludedTools and allowedTools are projected. Spell out allowedTools @Builtin as each built-in Crew can place, and * as those plus the spec's own MCP servers; each still meets the governance ceiling. An @Builtin entry is never read as an MCP server named builtin. Fixes #31864 Co-authored-by: Joe Guo <zejiangg@amazon.com> (cherry picked from commit 5a3a910)
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
span=2db8bc97b083
|
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing a screenshot of the new "program wasn't found" notice on the MCP tab. The blind read was not performed because the PR supplies no image. Evidence gaps
Notes
[UX-REVIEWED] 8c3f6c3 Description read[DESCRIPTION-READ] b05fa2cd2b03199fe1fdf7085263fc83c6ff42735e6387b211b4aba86a9b3cdb That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)Design-level review of Design-Verdict: PASS cannot evaluate: missing screenshot of the MCP tab's new BlockersNo rendered evidence for the new MCP-tab surface Notes
[DESIGN-REVIEWED] 8c3f6c3 Description read[DESCRIPTION-READ] 573f0efa7da09cb660682a2737d91ef23c68d8742443188190c7cac5f711ec2e That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The fixes are backported unchanged from main, apart from one third pick: #32282 is still open on main, which goes against this PR's own "Not a goal". Notes
What this change shipsInventory (7 items) — 6 justifiedIntent: give 0.12.x users two fixes from main: a visible reason when an MCP server was dropped from the agent, and kiro-cli tool aliases read correctly on KAS. This is a FIX (backport).
[FIRST-PRINCIPLES-REVIEWED] 8c3f6c3 Description read[DESCRIPTION-READ] 83a23f8c55dae01ccd4cf09d0811fc7dbea6ded5728d2e3fe5e4cf2548cd947b That sha256 names the PR description this verdict read. Recompute it with |
A spec whose allowedTools names the shell lifts toolsSettings denyByDefault, as kiro-cli does. allowed_tools_grant_shell compared the raw entry against execute_bash and shell only, so executeCmd, execute_cmd and @builtin/execute_cmd, all spellings kiro-cli accepts and the projection already folds, kept an empty allowlist: every shell call of that agent, pwd included, was refused. Fold each entry through canonical_kiro_cli_tool_name before comparing. Wildcard entries still grant nothing. (cherry picked from commit f97f336) Backport of #32282 from main. One hunk resolved by hand: the kas_permissions.py import block keeps this branch's imports and adds canonical_kiro_cli_tool_name; main's tools_settings_aliases import belongs to work this branch does not carry.
cf128a8 to
8c3f6c3
Compare
Problem / Motivation
Goal: Bring two MCP and KAS fixes that merged on
mainafterv0.12.0ontorelease/0.12.0, one commit per fix, in a PR of their own so they can be reviewed and reverted apart from the low-risk batches.Why it matters
tools, andallowedToolswritten as*or@builtin, are read differently from kiro-cli, so an agent file written for kiro-cli does not get the tools it names.Not a goal
main; nothing is changed only here.CHANGELOG.mdchange. Cuttingv0.12.1-rc.Nand the bare tag follow docs/build/release.md and stay with the maintainers.1c15f26981(fix(release): backport KAS MCP sign-in logging to 0.12.0 line #31645). Whatmainadds on top is a once-per-run warning when sign-in saving is off; its code lives inmcp_grant_kas.py, a module this branch does not have, so carrying it means re-writing that part for this branch'skas_secret_storage.py.What changed (motivation → approach → change)
Each main squash commit was cherry-picked with
-xontorelease/0.12.0@4d9f6b123e, in merge order, one commit each.b586455b0b7ca2598960allowedTools *and@builtinlike kiro-cli5a3a9106c88b53f45564denyByDefault(GPT finding on this PR)f97f336b55(open onmain)8c3f6c310dkas_permissions.pykeeps this branch's imports and addscanonical_kiro_cli_tool_name; main'stools_settings_aliasesimport belongs to work this branch does not carryHand-resolved hunks:
src/kiro_crew/agent_parts/spec_rebuild.pymainwrapswrite_default_spec(...)in atry/except _AgentSpecUnreadablethat this branch does not have. Release's plainwrite_default_spec(...)call is kept, and #31620'smcp_dropped_servers.record_rebuild_drops(...)call is added right after it, unchanged except for the indent. 11 lines added. The conflicting context comes from #27535 (keep an unreadable agent spec instead of resetting it), which is not on this branch. It was not pulled in as a prerequisite: it is 25 files and about 2,700 changed lines, far wider than this 11-line hunk.Every other file in both picks has added and removed lines identical to its main commit, including #31620's
mcp_sources.pychange that addsunresolved_commandsand its newmcp_dropped_servers.py. #31620's commit is authored with the public identity the push guard requires, because of the hand-resolved hunk; #31885 keeps its original author.builder-security checked: no pick changes a bind, a listener, a route, an auth check, an ingress rule or a storage grant. #31620 adds the dropped servers to the existing MCP tab read; #31885 changes which tools a KAS agent spec names and auto-approves, through the existing ceiling filter.
Backwards compatibility
Compatible: each change is the one already merged on
main, and each PR's own compatibility note applies unchanged.Removes nothing: no pick hides, deletes or renames anything 0.12.0 accepts.
Tests
Proof: not provable -- other: a backport of main commits whose proofs ran on their own PRs
release/*, so the related set was run here: every touched test file plus every test file that imports a touched module, 89 files, one pytest process per batch of 20,-n 0. 4802 passed. 1 failed:test_acp_harness_contract.py::test_a_missing_self_served_binary_names_its_install_command[copilot], the copilot harness-contract failure this branch already carries.McpTabor the capability types, and everysrc/i18n/*.test.ts*catalog test, 72 files, 1393 passed.Manual verification
N/A - every pick was verified on its own main PR. The 0.12.1 RC soak is the end-to-end check.
Screenshots / video
Why no screenshot: #31620's MCP tab change is applied from
mainunchanged; its look is reviewed on its own PR, not here.Related Issues
Backport to the 0.12 line for 0.12.1 of #31620 and #31885. Source issue: #31864.
Sibling sweep
Siblings: none -- each source PR carried its own sibling sweep; this PR only carries those fixes.
Pattern harvest
Not generalizable: this PR only carries fixes already on
main. Each source PR has its own harvest.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.