Skip to content

fix: backport the MCP dropped-server notice and KAS tool aliases to 0.12.1 (batch 31) - #32202

Merged
buluoray merged 3 commits into
release/0.12.0from
crew/slack/0.12.1-batch-31
Nov 7, 2026
Merged

buluoray merged 3 commits into
release/0.12.0from
crew/slack/0.12.1-batch-31

Conversation

@buluoray

@buluoray buluoray commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Needs Bolin's OK before merge. One hunk in shared code is resolved by hand (listed under What changed), and #31885 changes how Crew reads allowedTools on KAS, next to the permission gate.

Problem / Motivation

Goal: Bring two MCP and KAS fixes that merged on main after v0.12.0 onto release/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

PR Reported What a 0.12.0 user sees today
#31620 zhjunyi, in the Slack bug ledger A stdio MCP server whose program is not on the gateway's PATH is listed in Customize → Connections → MCP Servers, but the agent rebuild left it out of the agent spec, so chat says it "exposes no tools". Nothing on screen says why; the only record is one WARNING line in the log.
#31885 #31864 On KAS, kiro-cli tool alias names in tools, and allowedTools written 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

  • No fix that is not already merged on main; nothing is changed only here.
  • No version bump, no tag, no CHANGELOG.md change. Cutting v0.12.1-rc.N and the bare tag follow docs/build/release.md and stay with the maintainers.
  • fix(kas): log whether a saved MCP sign-in was found, missing or saved #31467 (log whether a saved MCP sign-in was found) is not in this PR. An earlier version of it already shipped on this branch as 1c15f26981 (fix(release): backport KAS MCP sign-in logging to 0.12.0 line #31645). What main adds on top is a once-per-run warning when sign-in saving is off; its code lives in mcp_grant_kas.py, a module this branch does not have, so carrying it means re-writing that part for this branch's kas_secret_storage.py.

What changed (motivation → approach → change)

Each main squash commit was cherry-picked with -x onto release/0.12.0 @ 4d9f6b123e, in merge order, one commit each.

# PR main commit release commit Pick
1 #31620 show servers the agent rebuild dropped on the MCP tab b586455b0b 7ca2598960 one code hunk resolved by hand
2 #31885 read kiro-cli tool aliases, allowedTools * and @builtin like kiro-cli 5a3a9106c8 8b53f45564 clean
3 #32282 read kiro-cli shell spellings when lifting denyByDefault (GPT finding on this PR) f97f336b55 (open on main) 8c3f6c310d one import hunk resolved by hand: kas_permissions.py 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

Hand-resolved hunks:

PR File Resolution
#31620 src/kiro_crew/agent_parts/spec_rebuild.py main wraps write_default_spec(...) in a try / except _AgentSpecUnreadable that this branch does not have. Release's plain write_default_spec(...) call is kept, and #31620's mcp_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.py change that adds unresolved_commands and its new mcp_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

  • CI does not run the backend suite on PRs into 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.
  • Frontend: every touched test file, every test that reads McpTab or the capability types, and every src/i18n/*.test.ts* catalog test, 72 files, 1393 passed.
  • flake8 passes on the changed Python files.

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 main unchanged; 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

buluoray and others added 2 commits November 7, 2026 07:42
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)
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 7, 2026 07:56
@buluoray
buluoray requested review from tim-finnigan and removed request for a team November 7, 2026 07:56
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 8c3f6c310d186741c0b38c093be7cddf9e8650d1 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 8c3f6c3

Verdict parsed from the review's SHA-scoped output markers for commit 8c3f6c310d186741c0b38c093be7cddf9e8650d1.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 8c3f6c310d186741c0b38c093be7cddf9e8650d1 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 8c3f6c310d186741c0b38c093be7cddf9e8650d1 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8c3f6c3

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 8c3f6c310d186741c0b38c093be7cddf9e8650d1 false-positive: <reason, 20 to 500 characters>

@buluoray

buluoray commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

span=2db8bc97b083

fixed in cf128a8: allowed_tools_grant_shell, the check spec_shell_allowlist uses, now folds each allowedTools entry through canonical_kiro_cli_tool_name, so executeCmd, execute_cmd and @builtin/execute_cmd lift denyByDefault like execute_bash. The fix sits in the shared check rather than passing the expanded list, which would turn * into the shell name; * and other wildcards still grant nothing, as test_an_agent_whose_allowed_tools_does_not_name_the_shell_is_still_refused pins. Same commit as #32282 on main.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 8c3f6c310d186741c0b38c093be7cddf9e8650d1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The warning block data-testid="mcp-agent-dropped" in website/src/pages/overview/McpTab.tsx. It shows an AlertTriangle icon, then agent_dropped_not_found ("The program '{{command}}' wasn't found on this computer, so your agent can't use this server's tools."), then agent_dropped_fix with its joined → page path and the "Restart gateway" step. It appears in no screenshot: ux-screenshots.txt is empty, and the blind-read report says "BLIND READ NOT PERFORMED". To close the gap, attach a still of one MCP server row showing this notice to the PR description, ideally with a long command path so wrapping can be checked, and re-run this lane.

Notes

  • The agent_dropped_fix copy has two steps and two arrow paths in one muted 12px line. Once a screenshot exists, check that the "Customize → Connections → MCP Servers" path matches the labels the user actually sees.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

Design-level review of 8c3f6c310d186741c0b38c093be7cddf9e8650d1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

cannot evaluate: missing screenshot of the MCP tab's new agentDropped warning line as rendered on release/0.12.0. This revision renders a new warning row, and the evidence list names no image.

Blockers

No rendered evidence for the new MCP-tab surface
Trigger: the diff adds a new block to McpTab.tsx, "{s.agentDropped && (<div className="text-warn …" data-testid="mcp-agent-dropped">", and the description says "its look is reviewed on its own PR, not here". The evidence list shows 0 images and 0 recordings.
Outcome: McpTab.tsx on release/0.12.0 is not the same file as on main → the new note lands next to rows from a different release (notProbedReason, owner sign-in) → nobody has seen how it looks or reads on 0.12.1, and a screenshot from another PR is not evidence for this one.
Fix: attach a screenshot of the MCP tab on this branch with a server whose command is missing.
Clears when: a github.com/user-attachments image of this branch's MCP tab showing the mcp-agent-dropped line is in the description, or committed under temp-screenshots/.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 8c3f6c310d186741c0b38c093be7cddf9e8650d1 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 ships

Inventory (7 items) — 6 justified

Intent: 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).

  1. The MCP tab shows a warning on a server whose program was not found, naming the program and the fix — justified
  2. GET /api/mcp and the probe responses carry agentDropped on the affected rows — justified
  3. A new mcp-dropped-servers.json file under the data home is rewritten on each rebuild — justified
  4. On KAS, tools and allowedTools accept kiro-cli aliases (fsRead, executeCmd, agent_crew, @builtin/<name>) — justified
  5. On KAS, allowedTools written as * or @builtin grants the built-ins (and * also the spec's own servers), each still checked against the ceiling — justified
  6. Shell spellings in allowedTools now lift the denyByDefault shell restriction — rides along (not yet merged on main)
  7. An @builtin/... entry is no longer read as an MCP server named builtin — justified

[FIRST-PRINCIPLES-REVIEWED] 8c3f6c3

Description read

[DESCRIPTION-READ] 83a23f8c55dae01ccd4cf09d0811fc7dbea6ded5728d2e3fe5e4cf2548cd947b

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

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.
@buluoray
buluoray force-pushed the crew/slack/0.12.1-batch-31 branch from cf128a8 to 8c3f6c3 Compare November 7, 2026 12:19
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026
@buluoray
buluoray merged commit 7a6c711 into release/0.12.0 Nov 7, 2026
24 of 35 checks passed
@buluoray
buluoray deleted the crew/slack/0.12.1-batch-31 branch November 7, 2026 15:55
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 7, 2026
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.

2 participants