Repository navigation
fix(mcp): offer Stop sharing on a paused row; doctor survives unreadable .env - #29585
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design concerns block this: the paused row gains a real exit through the existing Notes
[DESIGN-REVIEWED] 102a6f0 Description read[DESCRIPTION-READ] c072b29919f56fd4c16e13fd7f0f4d9ffddee1c8491ca3fcdb5aa92ea0729255 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The blind reader understood "Don't share this server" correctly, and all three screenshots show the paused row as the PR describes it. Notes
[UX-REVIEWED] 102a6f0 Description read[DESCRIPTION-READ] f23cd9e8a02a4373e30a86263ec6ef84358813ed56f6f028cefcb0b09729a473 That sha256 names everything this verdict read: the PR description, plus the 6 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 Nothing blocks. Both fixes trace to linked issues (#29582, #29583) and reuse existing helpers: What this change shipsInventory (8 items) — 8 justifiedIntent: let a person stop sharing a paused MCP server without approving its new command, and keep
[FIRST-PRINCIPLES-REVIEWED] 102a6f0 Description read[DESCRIPTION-READ] d37749017f88f8538550ef6511483e7a71c4f4c192f85879daddd79b33df6c9f That sha256 names the PR description this verdict read. 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: |
bf765b6 to
ce21987
Compare
|
|
|
|
|
|
3d44c47 to
1c34a96
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Requesting changes on head 30a8385. The red Opus 5.5 Review and UX Review checks come from this change. I read both comments on this head.
-
Opus 5.5 Review, blocking, doctor_checks/services.py (around line 35). When
cfg.load_credentials()raisesPermissionError, the new_unreadable_skips_sectionpath keeps going with only the environment's credentials. The channel checks then see no token stored in the credentials file, so Discord prints "token: missing" and adds an issue, Slack prints "not configured", and doctor can exit failing on something it never measured, which defeats the skip. Suggested fix from the review: record inDashboardBindingthat the credentials read was denied (for examplecreds_unreadable: bool), and have the Slack, Discord, other-channel and remote-bind checks print "unknown, credentials not readable" without adding an issue. -
UX Review, blocking, McpManagementLaunchReview.tsx. A paused server row shows "Paused, command changed" next to "0 of 1 shared", yet offers "Stop sharing". The new hint
stop_sharing_hint("Nothing is approved; each chat keeps its own copy.") reads as a status line and does not say what the press does, so a reader may not press it. Suggested fix from the review: state the outcome and explain the count, for example "Removes the share mark without approving the new command. Paused servers count as not shared." That string needs the same change in each locale file this PR touches.
In the saved diff I confirmed that the services.py change wraps the credentials read in _unreadable_skips_section, and that the hint string is added in 13 locale files and shown in the launch review component. I did not run the code.
I will re-review on the next head.
Code change approver recommendation: A person should decideWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 575 lines, more than the 400 it may approve on its own. Both fixes do what the PR says, and each has tests that fail without it. MCP Management: a paused row whose launch can be approved now shows two buttons, Approve update and Don't share this server. The second calls the row's existing Doctor: An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
|
Rebased: main moved in docs/architecture/mcp.md and website/src/i18n/locales/*.json since this head went green (ab65f7a -> 2503fd9); CI re-running. Synced with a merge commit from main (84b0d43), no force push; the PR's own commit aabcf2c is unchanged. The PR's doctor tests (68) pass on the merged tree and every locale file keeps this PR's keys. Written by the Crew Tasks Bot on behalf of mbriones98. |
bc8d7a8 to
ea832b5
Compare
|
Rebased: main moved in docs/architecture/mcp.md and website/src/i18n/locales/*.json since this head went green (2503fd9 -> a02e90c); CI re-running. The branch is again one commit, ea832b5, on main a02e90c, pushed with the lease pinned to bc8d7a8. The merge commit the update-branch step added had put the PR over PR Hygiene's two-commit cap, so it was squashed away. range-diff against the reviewed commit aabcf2c shows it unchanged ( Written by the Crew Tasks Bot on behalf of mbriones98. |
Written by the Crew Tasks Bot on behalf of mbriones98. |
|
Backend Tests (3.12, 8) on ea832b5 fails Written by the Crew Tasks Bot on behalf of mbriones98. |
ea832b5 to
0b3bc53
Compare
|
resolution: narrowed -- the label now carries the meaning, so the hint line under it is removed rather than reworded
Written by the Crew Tasks Bot on behalf of mbriones98. |
Written by the Crew Tasks Bot on behalf of mbriones98. |
0b3bc53 to
26c3266
Compare
|
Rebased: main moved in website/src/i18n/locales/*.json since this head went green (9b32941 -> 27e9359); CI re-running. The branch is one commit, 26c3266, on main 27e9359, pushed with the lease pinned to 0b3bc53. The new base includes #36290, which fixes the main-red Written by the Crew Tasks Bot on behalf of mbriones98. |
|
resolution: narrowed -- the test now patches the owning module directly, so it no longer depends on the facade write-through the lane kept doubting
Written by the Crew Tasks Bot on behalf of mbriones98. |
26c3266 to
472ce81
Compare
|
Correction to the Opus disposition for span dd3282ba37f4: 472ce81 puts the doctor test back to patching Written by the Crew Tasks Bot on behalf of mbriones98. |
A shared MCP server whose launch was refused is paused, and its row had no way to unshare it: the switch only moved focus to Approve update. The row now draws no switch and offers two buttons, Approve update and "Don't share this server". The second sends the same stub=false write as the switch on a shared row and approves nothing; its label agrees with the card's count, which already treats a paused server as not shared. Below md the two buttons take a full-width line under the server's name. The strings are in every catalog, and docs/architecture/mcp.md describes the row this way. kirocrew doctor read the credentials file unguarded, so a denied read ended the whole report on a PermissionError. The Configuration section now starts from the credentials the process environment holds and wraps only the credentials read in render._unreadable_skips_section, so a denied read is a skip inside a sandbox and an issue outside one. The binding it returns records that the read was denied, and the Slack, Discord, Other Channels and remote-bind checks then report a token absent from the environment as unknown rather than missing, and count no issue for it, since the token may be in the file doctor could not read. Missing non-secret config is still read and still counts. Fixes #29582 Fixes #29583
472ce81 to
102a6f0
Compare
|
self-added: no
Written by the Crew Tasks Bot on behalf of mbriones98. |
bolichen97
left a comment
There was a problem hiding this comment.
Re-approving at 102a6f0. The new push dismissed my approval on 6269f5a. I compared that head's PR diff with this one. The doctor half is unchanged; only main's neighbouring line moved. What changed is the paused-row UI:
- The button is renamed from "Stop sharing" to "Don't share this server" in every locale. The separate
stop_sharing_hintline is gone, and the button keepsaria-describedbyto the row's own hint or Details. It still takes the mark off (stub=false) and approves nothing. - Below
md, a paused, approvable row's two buttons take a full-width line under the server name (pausedControls), so they can't squeeze the name column. Frommdup the cell is the same as before. - The unreachable
if (!approvable) return nullbranch is dropped.cannotShareabove already draws a non-approvable refusal with Remove, so an unapprovable launch still never gets an Approve button. connections.mdand the spec describe the row as it now draws.
No regex, no refusal, and all 97 checks are green. Approving without auto because the author holds auto-merge.
Problem / Motivation
Goal: Let a person unshare a paused MCP server from its row without approving its changed command, and keep
kirocrew doctorrunning when the credentials file can't be read.kirocrew doctorended its whole report on aPermissionErrortraceback from the Configuration section.Why it matters
Someone who doesn't trust a server's new command is pushed toward approving it, because nothing on the page undoes the share. And doctor is the first tool people run when something is wrong, so a crash inside the sandbox leaves them with no report at all.
Not a goal
load_credentialsitself or how the gateway reads.envat boot.What changed (motivation → approach → change)
kirocrew doctor, credentials file unreadablePermissionErrortraceback, report endscredentials:row, report continues: a skip inside a sandbox, an issue outside one. Channel tokens that may be in the unreadable file read "unknown", not missingDon't share this server calls the row's existing
onStop, the samestub=falsewrite the switch sends on a shared row. It carries noexpected_launch, and the gateway'sstub=falsepath revokes the name's approvals, so pressing it approves nothing. Its label agrees with the card's "0 of 1 shared" count, which already treats a paused server as not shared, so the row needs no hint line. The paused row's old switch wrote nothing and only moved focus to Approve, so dropping it keeps the row at two controls without losing an action. Belowmdthe two buttons take a full-width line under the server's name. Thestop_sharingstring is in every catalog underwebsite/src/i18n/locales/, anddocs/architecture/mcp.mdand the packaged guidesrc/kiro_crew/docs/connections.mddescribe the paused row the same way.In doctor,
_doctor_configuration(src/kiro_crew/doctor_checks/services.py) starts from the credential keys the process environment holds, passed through the sameresolve_env_credentialsstepload_credentialsuses, and wraps onlycfg.load_credentials()in the existingrender._unreadable_skips_section. That helper decides skip versus issue, as it does for the task store.DashboardBindingrecordscreds_unreadable, andcli_doctorpasses it to the Slack, Discord and Other Channels checks, which print "unknown — credentials not readable from this shell" for a token absent from the environment and count no issue; the remote-bind Slack check does the same. Missing non-secret config is still read fromconfig.jsonand still counts.Backwards compatibility
Compatible: a paused row gains a way out and doctor prints a row where it used to crash; nothing that works today stops working.
Reader: website/src/pages/settings/McpManagementLaunchReview.tsx:ShareAction -- crew page -- the paused row's focus-only switch is removed; its only behaviour (moving focus to Approve) is covered by the Approve button itself, see McpManagement.oneStep.test.tsx "offers a refused row (%s) exactly Approve and Don't share this server, writing nothing on render"
Tests
website/src/test/McpManagement.launchApproval.test.tsx— a paused row shows Approve and "Don't share this server", no switch and no hint; belowmdboth buttons share one full-width cell; Don't share this server sendssetStub('alpha-mcp', false, undefined)once and never astub=truewrite.website/src/test/McpManagement.oneStep.test.tsx— both refusal kinds offer exactly Approve and "Don't share this server" and write nothing on render; the approve paths are unchanged.test/test_doctor_unreadable_credentials.py— outside a sandbox the denied read is one issue; inside one it is a skip; a raising confinement probe counts the issue; environment Slack tokens are kept; an unresolved environmentsecret://reference is dropped; with the read denied, Slack, Discord, Other Channels and the remote-bind check report unknown and add no issue, while a readable file still counts a missing token or missing config.test/test_cli_doctor_refactor_report.py— the full doctor run handscreds_unreadableto all three channel sections,Truewhen the read is denied andFalseotherwise.The paused-row label test fails against the previous row (it read "Stop sharing" with a hint). The doctor tests fail with the fix reverted: 9 of 17 in
test_doctor_unreadable_credentials.py, and both cases of the new call-site test with onlycli_doctor.pyreverted.Proof: not provable -- other: prove.py --per-hunk catches the cli_doctor call sites; the remaining services.py/channels.py hunks only error at collection when reverted alone (new keyword and field), and the docstring hunk has no behaviour; the doctor tests were run against the pre-fix files and fail there
Local on this head: the 18 McpManagement and i18n vitest files (406 tests),
tsc -p tsconfig.app.json, eslint on the changed files, and the two doctor test files (68) pass;en-XAwas regenerated withi18n:pseudo.Manual verification
Rendered the built dashboard with stubbed gateway answers (one paused, approvable server) in dark and light at desktop width, and dark at 420 px, and confirmed the row shows Approve update and Don't share this server, no switch and no hint, under a "0 of 1 shared" count.
Screenshots / video
Related Issues
Fixes #29582
Fixes #29583
Sibling sweep
Swept: git grep -n "load_credentials()" -- src/kiro_crew/doctor_checks src/kiro_crew/cli_doctor.py
Sibling: src/kiro_crew/doctor_checks/services.py:404 -- changed here
Swept: git grep -n "dashboard.creds" -- src/kiro_crew
Sibling: src/kiro_crew/cli_doctor.py:959 -- changed here
Swept: git grep -n "launchIsApprovable(" -- website/src/pages/settings
Sibling: website/src/pages/settings/McpManagementHero.tsx -- not affected -- the review dialog only approves or skips for now and never claims to unshare
Pattern harvest
Not generalizable: each is a single missing branch (a row state with no exit control, one unguarded file read in doctor), not a repeated code shape a rule could match.
Checklist