Skip to content

fix(mcp): say when kas cannot sign in to a server with its own client - #34749

Merged
bolichen97 merged 1 commit into
mainfrom
crew/slack/kas-oauth-signin-ux
Nov 11, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
crew/slack/kas-oauth-signin-ux

Conversation

@buluoray

@buluoray buluoray commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On the Kiro Agent engine, a person whose remote MCP server has its own OAuth settings that never reach the engine (a client secret) is told plainly, in the MCP Servers row and in the chat notice, that this server can't sign in yet; no harness-switch path is offered.

A user on Kiro Crew 0.12.1 with the Kiro Agent harness added a Slack MCP server with "oauth": {"clientId": ...}. A KAS session never receives that block, so the server never connects. The user saw two wrong or hidden signals:

  • The MCP Servers row said "Sign-in required … Go to chat, start a new session, and send any message — you'll be asked to approve the sign-in in chat." On KAS no such prompt ever comes.
  • The chat's only signal, "Agent kirocrew sets mcpServers.slack.oauth, which this backend does not receive … Sign-in to MCP server slack will not work on this backend", folded into the turn's collapsed steps after the turn ended. The user found it only under the hidden steps.

Why it matters

Every Kiro Agent user with a remote server that needs its own OAuth client (Slack, and any other server with no dynamic client registration) loses that server with no visible reason, and the page sends them to a chat step that can never succeed.

Not a goal

  • Making servers with a client secret sign in on KAS.
  • Changing Connections provider cards or Crew-held sign-ins (dashboard.feature_previews.crew_oauth). They have their own sign-in path and keep it.

What changed (motivation → approach → change)

Symptom → cause → change:

  • Chat notice folds away. Under the default collapse-all setting, TurnBlock folds every untagged row before the answer. The lost-oauth notice was an untagged notice row. It now carries meta.kind: "mcp_sign_in_unsupported" (only when the lost keys include an oauth block), and TurnBlock.isAlwaysVisible keeps that kind in view, the same way it keeps the agent greeting.
  • MCP Servers row sends the user to chat. The row chose its wording without asking whether the harness can sign in at all. Since fix(kas): always send a remote MCP server's oauth block to the engine #34643, Crew sends a server's own oauth block to KAS, except one that names a clientSecret or keeps nothing Crew sends (mcp_oauth_projection.oauth_withheld). The MCP row now carries oauthWithheld for that case: a new field on src/kiro_crew/mcp_discovery_server_info.py's McpServerInfo, set in src/kiro_crew/mcp_discovery_config.py (_server_from_spec) and src/kiro_crew/mcp_discovery.py. It is a flag only, never the block. On KAS, such a row that is neither a Connections provider nor Crew-held reads Sign-in unavailable, with one plain line ("This server can't sign in with the Kiro Agent engine yet ..."). It offers no Sign in / Sign in again control, no Go to chat link and no hover tip, since none can finish there. A public clientId block keeps the normal row. "On KAS" also covers a stored Kiro CLI pick that loads as KAS: the row reads the kiro_selection_runs_on_kas probe, since the saved value still says kiro. It offers no harness switch for the same reason (kiro_cli_pick_backend). The row cannot see the engine version, so an engine older than 0.66.104, which drops every block, is left to the chat notice (a shortcut: comment on kasCannotSignIn says so). A failed probe on such a row now shows its error through ErrorNotice, as errors-use-error-notice requires. The copy (sign_in_unsupported_on_kas, sign_in_unavailable) is in website/src/i18n/locales/ for all 12 locales. website/src/types/index.capabilities.ts declares clientId and oauthWithheld on McpServer.
  • The chat notice pointed at a switch that does not help. It ended "The kiro-cli backend supports it." Now that the notice stays in view, that advice was the most visible wrong message: a Kiro CLI pick runs on KAS where kiro-cli offers v3. spec_keys_notice (src/kiro_crew/agent_sdk/spec_hooks.py) now ends "will not work on this backend yet."
  • Docs: docs/architecture/mcp.md and docs/guides/connecting-remote-oauth-mcp-server.md say the same.

Backwards compatibility

Compatible: other harnesses, servers without their own client, Connections providers and Crew-held rows render as before; the notice row only gains a meta.kind.

Removes nothing: on KAS a row whose sign-in can never finish loses the Sign in / Sign in again control and chat link that could not work there; every other row keeps them.

Tests

  • test/test_mcp_sign_in_unsupported_notice.py: a lost oauth block tags the notice; other lost keys keep the plain row; TurnBlock.isAlwaysVisible names the same kind string.
  • test/test_kas_agents_mcp_oauth.py: the notice names the server and no longer names kiro-cli. test/test_mcp_sign_in_unsupported_notice.py also checks that the MCP row sets oauthWithheld for a clientSecret block and a clientMetadataUrl-only block, not for a public clientId block or none, and never carries the secret.
  • website/src/test/TurnBlock.mcpSignInUnsupported.test.tsx: the tagged notice stays visible in a collapsed turn; an untagged one still folds.
  • website/src/test/McpTab.kasSignInUnsupported.test.tsx: on KAS a row with oauthWithheld shows the plain line and the Sign-in unavailable badge, with no link at all and no Sign in / Sign in again, also when a Kiro CLI grant is already held, and on a stored Kiro CLI pick that the probe says runs on KAS; a failed probe shows mcp-probe-error; an Outdated row keeps its tip. A row with only a public clientId, a row without a client, and the Kiro CLI harness keep Sign-in required and the chat guidance.
  • Mutation checks: dropping the TurnBlock exemption turned the TurnBlock test and the parity test red; inverting the backend tag condition turned 2 of 3 Python tests red; making kasCannotSignIn return false turned 3 of 5 McpTab tests red; dropping the badge branch turned 2 of 5 red; dropping the held-grant branch turned 1 of 6 red; suppressing every tip on such a row turned the Outdated test red; keying the row on clientId instead of oauthWithheld turned 6 of 9 McpTab tests red; never setting oauthWithheld in _server_from_spec turned the row test red; dropping the kiro_selection_runs_on_kas check turned its test red; dropping the probe-error test id turned its assertion red.
  • Ran: the three new files plus test_kas_engine_features.py, test_agent_welcome_message.py, test_crew_fired_spec_hooks.py, test_flake_pattern_ratchet.py (263 passed); McpTab.test.tsx, McpTab.kasChatNote.test.tsx, src/i18n/ (81 files, 1286 passed); i18n:check, tsc -p tsconfig.app.json, eslint, flake8, mypy, black, isort, docs-lint.

Proof: not provable -- other: reverting the production hunks deletes the constant the new test imports, so prove.py only errors at collection; the manual mutations above stand in.

Manual verification

Rendered the built SPA with stubbed APIs:

  • MCP Servers on KAS, one row with clientId and one without: the first reads Sign-in unavailable with the plain line; the other keeps Sign-in required and the chat guidance.
  • A finished chat turn with the notice, tagged vs untagged: the tagged notice stays above the answer; the untagged one folds into "Worked through 3 steps".

Not run against a live KAS session. (The "Couldn't load your starred bots" toast in the chat shots is the stub's missing fixture, not this change.)

Screenshots / video

MCP Servers row, after:

MCP Servers on the Kiro Agent engine: the row with its own sign-in settings reads Sign-in unavailable with a plain line; the other row keeps Sign-in required

Chat, a finished collapsed turn. Tagged notice (this PR), visible above the answer:

Collapsed turn: the sign-in notice stays visible above the answer

Same turn with an untagged notice (before): it folds into the steps

Collapsed turn: the untagged notice folds into Worked through 3 steps

Related Issues

Closes #34747
Closes #34770

Merge order: rebased on #34643, which this builds on: the row flags only the blocks that #34643 still withholds.

Sibling sweep

Swept: git grep -n "kiro-cli backend supports\|Agent Harness" -- src/kiro_crew website/src/pages/overview and git grep -n "sign_in_required_help\|McpRowSignIn" -- website/src
Sibling: website/src/pages/overview/McpTab.tsx -- changed here
Sibling: src/kiro_crew/dashboard/chat_turn/turn_spec_hooks.py -- changed here
Sibling: src/kiro_crew/agent_sdk/spec_hooks.py -- changed here
Sibling: src/kiro_crew/mcp_oauth_projection.py -- not affected -- #34643 removed withhold_oauth, the log line this PR had edited
Sibling: src/kiro_crew/cron_service/turn_hooks.py -- not affected -- cron runs have no dashboard turn fold

Pattern harvest

Not generalizable: the fold exemption is an explicit per-kind list by design, and each kind that must stay visible is added on purpose.

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

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 10, 2026 19:34
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 51f02b07eef6e90be3ac77260aa61d0e69c71027 — 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

Nothing blocks. The fix is at mechanism level for both signals the user reported. One type field has no consumer.

Notes

  • Item 6 — zero consumers: clientId?: string on McpServer (website/src/types/index.capabilities.ts:425) has 0 non-test readers. I grepped for .clientId / clientId in website/src outside tests, and the only hits are this declaration and an unrelated local in voicePlayback.ts. The row is keyed on oauthWithheld. Subtraction: delete the clientId declaration.
Inventory (7 items) — 5 justified

Intent: a KAS user whose remote MCP server's own OAuth client never reaches the engine is told plainly that it can't sign in. FIX.

  1. The chat's "sign-in won't work" notice stays visible instead of folding into the collapsed steps — justified
  2. On KAS, an MCP row with a withheld oauth block reads Sign-in unavailable, with one plain line and no Sign in control or chat link — justified
  3. The chat notice no longer suggests switching to the kiro-cli backend — justified
  4. A stored Kiro CLI pick that loads as KAS counts as KAS for the row — justified
  5. The MCP API row gains an oauthWithheld flag — justified
  6. The frontend type declares clientId on McpServer — zero consumers, type only
  7. Every errored MCP row now shows its probe error through ErrorNotice, with an ask-agent action — rides along, mandated by errors-use-error-notice

[FIRST-PRINCIPLES-REVIEWED] 51f02b0

Description read

[DESCRIPTION-READ] 970bea6e2f96cadf2556026bae286ae2eb2fa86705837dc0d2e7f79a2a76b79a

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.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the flag is reused from the existing oauth_withheld projection, the take-away is limited to controls that could never succeed on KAS, and the description includes rendered evidence.

Notes

  • The ErrorNotice swap affects every row with status === 'error', on any harness, not just rows where sign-in is unavailable. Say so in the description, or move it to its own PR.
  • oauth_withheld is now computed in two places, mcp_discovery_config._server_from_spec and mcp_discovery.discover_servers_to_sync. A future third discovery path could skip it without anyone noticing, so it is worth setting in one shared spec→info constructor.

[DESIGN-REVIEWED] 51f02b0

Description read

[DESCRIPTION-READ] fb2259f15bd2aacefca904a31dbb333197c3c682953f83dc9832c86240c67cc3

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 commented Nov 10, 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 51f02b07eef6e90be3ac77260aa61d0e69c71027 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing the new chat-notice wording and the restyled probe-error row. shot-02 still shows the old "The kiro-cli backend supports it." line that this PR removes.

Evidence gaps

  • Chat notice, new wording. The diff changes the notice to end "Sign-in to MCP server slack will not work on this backend yet." shot-02 still shows the old "…The kiro-cli backend supports it." line, and no supplied image shows the new text. This is the notice the PR keeps on screen, so its new wording needs a shot. Fix: re-capture shot-02 from this HEAD.
  • Failed-probe row. For every MCP row with s.status === 'error', the red AlertTriangle span becomes <ErrorNotice variant="inline" … askAgent testId="mcp-probe-error" />. That adds an "Ask the agent" action to each errored row, and none of shot-01..03 shows it. Fix: attach a screenshot of an MCP Servers row whose probe failed.

Notes

  • The blind reader could not tell the two badges apart: "'Sign-in required' and 'Sign-in unavailable' look identical (same yellow badge) but mean very different things." Give sign_in_unavailable a neutral or muted tone so it stops looking like a fixable warning.
  • The sign_in_unsupported_on_kas copy states the problem but offers nothing to do ("It gives no next step", "I don't know what the 'engine' is"). Add a docs link to connecting-remote-oauth-mcp-server.md, and say "Kiro Agent" once instead of "Kiro Agent engine".

[UX-REVIEWED] 51f02b0

Description read

[DESCRIPTION-READ] b085d7de64af21436e519c95b478fca3e4df813345b3500f9c928e899d84493a

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 .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 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ human override accepted

Reviewed 51f02b07eef6e90be3ac77260aa61d0e69c71027 — this comment is updated in place on each push.

Human judgment by @buluoray overrides the Opus 5.5 finding for 51f02b07eef6e90be3ac77260aa61d0e69c71027; the recorded reason is authoritative for this commit.

[OPUS-OVERRIDE] 51f02b0

Verdict recorded from an authorized human decision for commit 51f02b07eef6e90be3ac77260aa61d0e69c71027.

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

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 51f02b07eef6e90be3ac77260aa61d0e69c71027 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 51f02b0

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

@buluoray

Copy link
Copy Markdown
Contributor Author

span=5ef05ce21ab4

  • The recommended Kiro CLI switch leaves affected sessions on KAS

fixed in 2ab177d: the row no longer recommends switching harness. It reads "Sign-in unavailable" with a plain line and no link, in all 12 locales and both docs.
Confirmed the finding: a stored Kiro CLI pick loads as KAS once kiro-cli offers v3 (kiro_cli_pick_backend, read in _read_backend_choice), so the switch could not reach the sign-in.
Same class elsewhere: the chat notice and the withhold_oauth log line still end "The kiro-cli backend supports it." Out of this PR's frozen goal; tracked in #34770.

@buluoray

Copy link
Copy Markdown
Contributor Author

span=bfe2ac771ba2

  • Readers won't use the harness link, the only way forward

fixed in 2ab177d: the harness link is gone (the switch would not help: a Kiro CLI pick runs on KAS where kiro-cli offers v3). The row now says, without jargon, "This server can't sign in with the Kiro Agent engine yet. It was set up with its own sign-in settings, which Kiro Agent can't use."
The row has its own badge, "Sign-in unavailable", so it no longer reads like a row chat can fix (the Notes item).
Evidence gap closed: the PR description now carries the chat notice in a finished collapsed turn, tagged (stays above the answer) and untagged (folds into the steps).

@buluoray

Copy link
Copy Markdown
Contributor Author

Goal line edited at the maintainer's explicit request: it no longer promises a harness-switch path. A stored Kiro CLI pick loads as KAS wherever kiro-cli offers its v3 engine (kiro_cli_pick_backend), so the switch cannot reach the sign-in; the diff already offers none. Only the Goal line changed.

@KiroCrewCaptain

KiroCrewCaptain commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates a 14% chance that this change introduces a defect, above the 12% limit for approving on its own.

The PR keeps the KAS "sign-in won't work" chat notice in view: the notice is tagged meta.kind mcp_sign_in_unsupported, and TurnBlock.isAlwaysVisible exempts that kind from the fold. On KAS, an MCP row whose own oauth block is withheld (the existing oauth_withheld projection) now reads "Sign-in unavailable", with no Sign in control and no chat link. Connections providers and rows Crew holds the sign-in for are excluded. Removing the controls is safe: before this PR, such a row's sign-in already ran on kiro-cli (kas_sign_in_routes: an entry with an oauth block is not sent bare), and a KAS chat never reads that grant. The earlier GPT finding about a stale cached probe is fixed (the probe is read only while the config says kiro) and tested. oauthWithheld is sent as a flag only and never carries the secret. Python and frontend tests cover each branch. I found nothing that blocks.

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 51f02b07ee · 471 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@buluoray
buluoray force-pushed the crew/slack/kas-oauth-signin-ux branch from 2ab177d to 127819c Compare November 10, 2026 20:31
@buluoray

Copy link
Copy Markdown
Contributor Author

span=a4904cac2510

  • Existing CLI grants suppress the KAS incompatibility notice

fixed in 127819c: a row where KAS cannot sign in now shows the plain line and the "Sign-in unavailable" badge in every OAuth-challenged state, including when a Kiro CLI grant is held (new signed_in && signInUnsupported branch; badge keyed on any known auth state). Sign-in controls stay suppressed.
Class swept: the three auth states the row renders (sign_in_required, signed_in, error with challenge) all reach KasSignInUnsupported now; unknown has no sign-in evidence and keeps its badge.
Test: "says the same when a Kiro CLI sign-in is already held"; removing the branch turns it red.

@buluoray
buluoray force-pushed the crew/slack/kas-oauth-signin-ux branch from 127819c to 80573fa Compare November 10, 2026 21:19
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 10, 2026
@buluoray
buluoray force-pushed the crew/slack/kas-oauth-signin-ux branch from 80573fa to 2033cf5 Compare November 10, 2026 21:46
@buluoray

Copy link
Copy Markdown
Contributor Author

span=186547ba470e

  • The chat notice now always shows a fix that fails

fixed in 2033cf5: the notice no longer names the kiro-cli backend. It now ends "Sign-in to MCP server slack will not work on this backend yet." The withhold_oauth log line drops the same claim.
Why the claim was wrong: a Kiro CLI pick runs on KAS where kiro-cli offers v3 (kiro_cli_pick_backend), so the switch cannot reach the sign-in.
Test: test_the_notice_names_the_server_and_offers_no_harness_switch asserts "kiro-cli" is absent. This also closes #34770.

@buluoray

Copy link
Copy Markdown
Contributor Author

span=ad870324449f

  • On KAS, a row with its own OAuth client loses every status-badge tooltip

fixed in 2033cf5: the tip is suppressed only where the badge is replaced (signInUnsupported && mcpAuthState(s) !== 'unknown'), so Outdated and Online keep theirs.
Test: "keeps the Outdated tip, which is not a sign-in step"; restoring the old condition turns it red.

@buluoray

Copy link
Copy Markdown
Contributor Author

Not a goal edited at the maintainer's explicit request: removed the line saying the chat notice's words do not change. The notice now ends "will not work on this backend yet." instead of naming the kiro-cli backend (UX finding span=186547ba470e). Only that line changed.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 10, 2026
@buluoray
buluoray force-pushed the crew/slack/kas-oauth-signin-ux branch from 2033cf5 to 1d5c80f Compare November 10, 2026 22:01
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 10, 2026
@buluoray
buluoray force-pushed the crew/slack/kas-oauth-signin-ux branch from 1d5c80f to 454f66f Compare November 11, 2026 01:00
@buluoray
buluoray force-pushed the crew/slack/kas-oauth-signin-ux branch from 7f0b0e9 to b856b00 Compare November 11, 2026 08:04
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 11, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

Rebased onto main after #34643 landed (b856b00). That PR made Crew send a remote server's own oauth block to KAS, so the row rule here was too wide: a server with only a public clientId can now sign in on KAS 0.66.104 and later.

The MCP Servers row now says Sign-in unavailable only when the block reaches no engine (mcp_oauth_projection.oauth_withheld: it names a clientSecret, or keeps nothing Crew sends). The gateway marks that case with a new oauthWithheld row flag. A public clientId row keeps the normal chat guidance. The row cannot see the engine version, so an engine older than 0.66.104 is left to the chat notice (shortcut: comment on kasCannotSignIn).

withhold_oauth is gone on main, so this PR no longer touches mcp_oauth_projection.py. Tests and mutation checks are in the description.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 11, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

Edited the frozen Goal: line and the first ## Not a goal item, at Ray's explicit request. #34643 landed and now sends a public clientId block to KAS, so after the rebase the row only says "Sign-in unavailable" for a block that never reaches the engine (a client secret). The old Goal said every server "set up with its own OAuth client", and the old Not-a-goal item said this needed #34643. Both are now narrowed to match. No code change and no push.

@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 11, 2026
@buluoray
buluoray force-pushed the crew/slack/kas-oauth-signin-ux branch from b856b00 to 51f02b0 Compare November 11, 2026 09:13
@buluoray

Copy link
Copy Markdown
Contributor Author

span=1dddaca9fe04

  • A stale remap probe overrides the current harness

Fixed in 51f02b0. In McpTab.tsx, onKas now reads kiro_selection_runs_on_kas only while the loaded config still selects kiro (ACP_BACKEND_KIRO). A cached probe answer from before a harness switch in another tab no longer marks the row as KAS. All three sites the finding names (sign-in target, badge, controls) read the same onKas, so this one change covers them.
McpTab.kasSignInUnsupported.test.tsx adds a case where the config says claude and the probe says true: the row keeps "Sign-in required" and no unavailable line. Dropping the kiro condition turns that test red.

@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 11, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

span=ad870324449f

  • Withheld oauth block may still sign in through the engine's own client registration

Rebutted, no code change. The trigger needs a server that offers dynamic client registration and also has a hand-configured clientSecret (or only a clientMetadataUrl). A person sets a clientSecret because they registered their own confidential client, and they do that when the server does not offer registration. Slack is the reported case, #34747. For that common case the row's old guidance ("go to chat and approve") can never finish, which is the bug this PR fixes.
Crew has no positive registration signal to gate on. The MCP probe records only the WWW-Authenticate challenge and never fetches the authorization-server metadata (registration_endpoint is read only by connections/l0_probe.py). Adding that fetch is new network scope this PR does not need.
This is the third round on this span (tooltips, then the remap probe, now this), so the seam rule says narrow or defer instead of another patch. Deferred: if a server with a clientSecret and registration turns up, the narrowing is "show unavailable only when the probe saw no registration endpoint".

@buluoray

Copy link
Copy Markdown
Contributor Author

Owner decision (Opus, span ad870324449f, head 51f02b07eef6e90be3ac77260aa61d0e69c71027): Ray's Slack Bot, acting for Ray, accepts the rare case that the Opus finding names. That case is a remote MCP server whose oauth block has a hand-set clientSecret and that also supports dynamic client registration. On the Kiro Agent engine such a row reads "Sign-in unavailable", even though the engine might register its own client.

Reason: a person sets a clientSecret because they registered their own confidential client, and they do that when the server has no dynamic client registration. Slack, the reported case (#34747), is one of these. For that common case the old "go to chat and approve" guidance can never finish, and that is the bug this PR fixes. Crew's probe has no signal for registration support, so it cannot tell the rare case apart without new network scope.

Rebuttal with details: #34749 (comment)

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override fable 51f02b0 owner-decision: Owner accepted the rare edge of a hand-set clientSecret on a server that also supports dynamic client registration; a set secret almost always means no registration (Slack, #34747). Decision: #34749 (comment)

@github-actions

Copy link
Copy Markdown
Contributor

AI-review override not recorded: the handler could not load its command reader (a GitHub read failed, not your command). Re-issue the command.

@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 11, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override fable 51f02b0 owner-decision: Owner accepted the rare edge of a hand-set clientSecret on a server that also supports dynamic client registration; a set secret almost always means no registration (Slack, #34747). Decision: #34749 (comment)

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a owner-decision release (class owner-decision) for the fable AI finding on 51f02b07eef6e90be3ac77260aa61d0e69c71027.

Owner accepted the rare edge of a hand-set clientSecret on a server that also supports dynamic client registration; a set secret almost always means no registration (Slack, #34747). Decision: #34749 (comment)

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 11, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving 51f02b0. I read the whole diff, tests included.

  • Message only; the OAuth flow is untouched. The PR reads main's existing mcp_oauth_projection.oauth_withheld and oauth_servers_in (neither changes) to set a new oauthWithheld flag on the MCP row, and tags the existing session-start notice with meta.kind: "mcp_sign_in_unsupported". What Crew sends to KAS, and how a sign-in runs, are the same as on main. The flag never carries the block itself, and the test checks a clientSecret does not leak into the row.
  • The row. On KAS (or a Kiro CLI pick that runs on KAS), a server whose block KAS never receives shows "Sign-in unavailable" and one sentence instead of the chat-sign-in guidance or a Sign in button, with no harness-switch link. A public client block, a server with no block, the Kiro CLI harness and a cached probe after a harness switch keep the normal guidance; each case is tested.
  • The notice. The tagged row stays out of the collapsed steps (isAlwaysVisible), and its wording drops the "kiro-cli backend supports it" line. A Python test pins the shared kind string between the two sides.
  • The 13 locales each add the same two keys.

No regex in product code. All 97 checks on this head are green.

@bolichen97
bolichen97 merged commit 1e5d13a into main Nov 11, 2026
97 of 99 checks passed
@bolichen97
bolichen97 deleted the crew/slack/kas-oauth-signin-ux branch November 11, 2026 12:07
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 11, 2026
bolichen97 pushed a commit that referenced this pull request Nov 11, 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

3 participants