fix(kiro): self-healing MCP path resolution in dev checkouts, bump to 2.4.1#72
fix(kiro): self-healing MCP path resolution in dev checkouts, bump to 2.4.1#72jampetz wants to merge 2 commits into
Conversation
… 2.4.1
.mcp.kiro.json's ${KIRO_PLUGIN_ROOT:-$PWD/.kiro/..} fallback resolved to the
repo root instead of plugins/simulator/ when a developer opened the repo
directly in Kiro without running install-kiro.sh, so the server tried to run
a nonexistent <repo>/mcp-server/run.sh. It now probes for mcp-server/run.sh
at that path and falls back to plugins/simulator/ when missing.
install-kiro.sh now sed-resolves the same fallback to the absolute plugin
path when generating a workspace's mcp.json, instead of a plain copy, so an
installed workspace no longer depends on KIRO_PLUGIN_ROOT at runtime either.
Updates README's Kiro install instructions to match and adds .env/.kiro to
.gitignore.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AI ReviewKiro path-resolution bug fix with version bump 2.4.0→2.4.1; two issues found: commit subject line 5 chars over limit and POWER.md version not updated. Checklist
Issues found[error] S5 — POWER.md version not bumped Files updated correctly: Missing update: [warning] U1 — Commit subject line exceeds 70 characters [advisory] U6 — Architectural notes
This review was generated automatically. A human maintainer should still make the merge decision. |
- install-kiro.sh: escape \, & and the # delimiter in PLUGIN_ROOT before splicing it into the sed replacement, so a stray one of those characters in the clone path (unusual but possible) can't corrupt the substitution. - .mcp.kiro.json: add a final guard after the probe/fallback — if mcp-server/run.sh still isn't found under either candidate PLUGIN_ROOT, print a clear error and exit 1 instead of failing with a confusing exec error. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AI ReviewRe-review after synchronize: Kiro path-resolution bug fix with version bump 2.4.0→2.4.1; U6 advisory issues addressed by the new commit; S5 error (POWER.md not bumped) and U1 warning (subject line length) remain open. Checklist
Issues found[error] S5 — POWER.md version not bumped (unresolved from previous review) Fix: add [warning] U1 — Commit 1 subject line exceeds 70 characters (unresolved from previous review) Fixed since last review ✅
This review was generated automatically. A human maintainer should still make the merge decision. |
What & why
When a developer clones the repo and opens it directly in AWS Kiro without running install-kiro.sh, the MCP server failed to start. .mcp.kiro.json's ${KIRO_PLUGIN_ROOT:-$PWD/.kiro/..} fallback resolved to the repo root (since .kiro/ lives there), not plugins/simulator/, so it tried to run the nonexistent /mcp-server/run.sh instead of /plugins/simulator/mcp-server/run.sh. The bug only surfaced in local dev — an installed plugin has KIRO_PLUGIN_ROOT set correctly by the host.
Fixes:
Type of change
Checklist
Notes for reviewers
Manually verified all three scenarios: installed-plugin path (KIRO_PLUGIN_ROOT pre-set), dev-checkout path (unset, probequires .kiro/ to already exist as a directory, which it will since that's where mcp.json itself lives), andinstall-kiro.sh against an external workspace (generated mcp.json has a valid, hardcoded absolute path; resolved run.sh path is correct).