Repository navigation
fix(doctor): stop reporting unrouted MCP servers as having no identity channel - #17652
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Before merge, check on a real macOS or Windows install that strict tools like What this change shipsInventory (3 items) — 3 justifiedIntent: stop
[FIRST-PRINCIPLES-REVIEWED] 0ff6cd6 Description read[DESCRIPTION-READ] 244860f7f908ab546222db293e3f10ed058ec8a9ebfe946662349db4b89eb908 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 0ff6cd6 Description read[DESCRIPTION-READ] 099035599bf7902c68458f425180b518e8e12bae55a9ce650e925ec8b97b5e57 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 |
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: |
779d899 to
ef0ec48
Compare
ef0ec48 to
e97f566
Compare
e97f566 to
0ff6cd6
Compare
UX Review (Opus 5.5) — ⏭️ skippedRevision |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (2 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: fix with a diff that matches its description.
iamwhatever
left a comment
There was a problem hiding this comment.
This PR rewrites the kirocrew doctor strict-identity note so a stock unrouted install is no longer told it lacks an identity channel or that strict tools are refused because of it. That is the real cause of the #9566 misdiagnosis, and the change touches output text only, with no resolver or routing logic. I checked the new wording against main's mcp_core.py: the strict resolver does read the signed per-session token first with no gateway, and the refusal diagnosis names the failed channel itself, so the note is accurate. The new test asserts the old "no identity channel" / "are refused while" phrasing is gone and that the note says routing needs no change. It would fail on base, which still says to route the servers. All checks pass, the Opus, GPT, Design and First Principles lanes PASS with no findings on 0ff6cd6, there are no open change requests, and the head test-merges cleanly onto main. — crew-pr-reviewer
Problem / Motivation
Goal:
kirocrew doctorstops telling Windows and macOS users that their stock install has "no identity channel" for Crew's MCP servers and that strict tools such ascron_addare refused because of it.#9566 asks for chat to create scheduled tasks and agents through native tools instead of the
kirocrewCLI. The reporter's stated root cause was this doctor line on Windows 0.7.0:strict identity: ⏹ no identity channel for kirocrew-core, kirocrew-dashboard, kirocrew-work, followed by text saying strict tools "are refused while a server is unrouted". On current main that is no longer true. Each session's managed MCP element carries a signed per-session token that the strict resolver reads with no gateway (session_token_sig, #11383; design notedocs/architecture/design-notes/mcp-stub-decoupling.md, "Session identity does not depend on the stub"). The runtime refusal text inmcp_core.strict_identity_diagnosiswas already updated to say so. Main's doctor header no longer says "no identity channel" (#17450), but its note still tells users to route the servers "if you use those tools", even though an emptymcp_gateway.stub_serversis the default and needs no routing.Why it matters
Doctor is the first place a user looks. Today it flags every stock Windows and macOS install with a "no identity channel" warning and sends the user to set up MCP routing, a broker plus one stub process per server, to fix a refusal that routing does not cause. In #9566 that misdiagnosis turned a question about the native
cron_addpath into a bug report about identity routing.Not a goal
cron_addworks from chat on Windows. This Linux host cannot verify that. A live refusal still prints its own diagnosis naming the channel that failed.What changed (motivation → approach → change)
no identity channel for kirocrew-core, ...and says strict tools are refused while a server is unrouted._doctor_strict_identitywas written when per-call caller injection, which exists only for servers inmcp_gateway.stub_servers, was the only identity channel on the kiro backend's session-unboundAcpRuntime. The signed per-session token on every managed MCP element (acp/runtime.py_own_stub_session/_unpooled_control_planes,acp/session_mcp.pykiro_control_plane_servers) later became the default channel, and doctor kept its old wording.strict identity: ⏹ not routed through the gateway: <names>and rewrote the docstring. After rebasing, this PR keeps main's header and docstring.src/kiro_crew/doctor_checks/mcp.py, only the explanatory note under that header changes. It now opens with "This is the default and needs no change", namescron_addamong the strict tools, says those tools identify the session from the signed per-session token, says this check reads config only, and says to route only when a tool's own refusal reports that the element carried no session token. That condition is the last branch ofstrict_identity_diagnosis, so the two messages now agree. Main's note still told users to "Route them ... if you use those tools". The check is still note-only, still skipped on Linux, and still never appends toissues.Backwards compatibility
Compatible: the only change is doctor's human-readable output for one note. No exit code,
issuesentry, config key, or behaviour changes.Removes nothing: the check, its skip rule, its routed-case output and its note-only contract all stay. Only the wording of the unrouted case is replaced.
Tests
test/test_strict_identity_diagnostics.py::TestDoctorStrictIdentity:test_unrouted_is_not_reported_as_a_missing_identity_channelchecks that the unrouted note no longer contains "no identity channel" or "are refused while". It also checks that the note says "needs no change", names the per-session token, and listscron_add.src/kiro_crew/doctor_checks/mcp.pyreverted toorigin/main, the new test fails on "needs no change" (1 failed, 28 passed). With the change, it passes.PYTHONPATH=<worktree>/src(the import was confirmed to resolve inside the worktree):test_strict_identity_diagnostics.pyplustest_doctor*.pygave 190 passed.Manual verification
N/A: unit coverage is sufficient for a text-only change. Unverified on this Linux host: whether
cron_addfrom a Windows dashboard chat succeeds on current main. The check is skipped on Linux by design, so its live output was not reproduced here.Related Issues
Refs #9566 (this draft is the decision-free first slice; the native agent-creation part stays an owner decision).
Decision for the owner
#9566 asks whether chat should create scheduled tasks and agents through native tools instead of the CLI. This draft only stops doctor from misreporting a stock install as having "no identity channel", because
cron_addalready has a gateway-free native identity path on main, and it leaves native agent creation to the Captain confirm-to-apply work (#15326) instead of adding a second, unconfirmed agent-creation tool.Pattern harvest
Rule candidate: review-prompt
Pattern: a diagnostic or doctor message that hard-codes which channel is "the only" one goes stale when a later change adds another channel. Make it defer to the live diagnosis instead of restating the topology.
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.