Skip to content

feat(slack): opt-in Slack MCP switch in the generated app manifest - #38169

Open
kyleseaman wants to merge 2 commits into
mainfrom
feat/slack-manifest-mcp-switch
Open

kyleseaman wants to merge 2 commits into
mainfrom
feat/slack-manifest-mcp-switch

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: One Slack app can serve both Kiro Crew's Slack bot (chat and code channels) and Slack's official MCP server, by turning on one opt-in switch, "Slack tools for your agents", in the manifest Kiro Crew hands out.

Today the generated manifest has no way to turn on Slack's MCP server (settings.is_mcp_enabled), PKCE or the localhost sign-in address the Slack Connections card uses. So a person who wants their agents to read Slack through https://mcp.slack.com/mcp has to edit the app by hand or make a second app. The manifest's user scopes are also an older list (with the legacy search:read) that does not match what the Slack card signs in with.

Why it matters

Slack MCP is the read path for agents to search and read Slack as the signed-in person. Without the switch, every user hand-edits a one-way setting (PKCE) and a scope list that has to match the Connections card exactly, and a mistake fails only at sign-in time.

Not a goal

  • The Slack Connections card itself (registry entry, OAuth client, sign-in flow). That is feat(connections): crew-owned oauth for the slack mcp server #34811, already merged; this PR does not touch registry.json or crew_oauth.py. It only corrects docs/guides/oauth-app-registration/slack.md for an app that also runs the bot (see Manual verification).
  • Any write scope for Slack MCP (posting, reactions, canvas or list edits).
  • Changing the default manifest. With the switch off it is byte-identical to main's.
  • Checking an installed app's user scopes or MCP setting: a bot token cannot read them.
  • Changing the exfil deep-link validator: it rebuilds every switch combination already.

What changed (motivation → approach → change)

Builds on #34811, which added the Slack card under Settings → Connections. The manifest can now carry what that card signs in with.

Off by default, and off changes nothing. With the switch off, every rendered manifest and deep link is byte-identical to main's, user scopes included. With it on, the manifest gains three settings and its user scopes are replaced:

Manifest line Switch on
settings.is_mcp_enabled true
oauth_config.pkce_enabled true
oauth_config.redirect_urls http://localhost:48106/callback, the Slack card's redirect
oauth_config.scopes.user exactly the Slack card's recommended_scopes: 18 read-only scopes, no write scope

Turning it on replaces the legacy user-scope list. Nine of the old ten scopes are in the new list; search:read leaves the manifest, and nine come in (the granular search:read.*, files:read, canvases:read, lists:read). Scopes an installed app was already granted stay on it until the app is reinstalled. A template line can now be gated on a switch being off (#@!slack_mcp), which is how search:read renders only without the switch. It adds no bot scope, event or feature block.

Design. FEATURE_SCOPES maps each switch to the bot scope it runs on, and the capability probe, latches and runtime gate read it. This switch runs nothing in the gateway, so it stays out of that mapping: it is listed in MANIFEST_ONLY_FEATURES, and FEATURES is FEATURE_SCOPES plus MANIFEST_ONLY_FEATURES. The named set answers the Design Review note: with one entry it is small, but it puts the split in one place, so a loop over FEATURES that needs a bot scope skips those switches by name instead of relying on a single in REQUIRED_SCOPE guard, and test_every_switch_has_a_bot_scope_or_is_manifest_only fails if a switch is in neither. Code that loops FEATURES and needs a bot scope skips the manifest-only switches by name. Everything that renders or diffs the manifest iterates FEATURES, so the CLI, GET /api/slack/manifest, feature_sets() and the exfil exemption need no change.

Scope diff and drift. The manifest diff (slack_manifest.py) gains added and removed user scopes and added app settings. The Update your Slack app panel lists them as plain lines, never marked held or missing; search:read, which the switch drops, reads "No longer requested: search:read". While such a switch is saved, the pill says what was checked and names the next step, "Slack bot permissions OK · save the manifest in Slack if you haven't", in a neutral tone instead of "Up to date"; the badge wraps instead of clipping on a narrow screen. The note under it starts "Not checked: whether the manifest with Slack tools is saved in Slack", because Slack does not report an app's user scopes or settings. Only while the Slack card is offered does the note add the save as a step to do once. That step and the disclosure say the PKCE point once, in the same words: "Saving it turns on PKCE, which stays on but doesn't affect the bot." The panel's rows read "Permissions people grant (user scopes)" and "Sign-in settings (app settings)", and its copy button reads "Copy manifest", like the first-time setup card.

Settings copy. The switch is "Slack tools for your agents". Its description leads with the consent fact ("Nothing is read until someone connects their own Slack account"), then says agents read Slack as that person, private messages and DMs included, and cannot post or change anything. Manifest detail sits in a closed disclosure, which leads with plain words and puts the terms in brackets ("permissions that each person grants when they connect (user scopes)", "a Slack sign-in safeguard ... (PKCE)"). Off, one short muted note that says where the change happens: "This only changes the manifest below. Slack changes when you save it there." Nothing one-way is said on the switch. The disclosure also says that what was already saved in Slack (the Slack tools setting, the sign-in address, the extra sign-in permissions and the security setting) stays on the app until it is edited there. On, a warning box headed "Before you save this manifest in Slack" lists the internal-app, Connect and 30-day points. With no Slack card, its first point leads with what to do and why ("Turn this switch off until the Slack card is on"), and that point links the Connections guide (src/kiro_crew/docs/connections.md) itself; the disclosure only says why there is no card, with no config.json hand edit.

Shown only when it can be used. The settings GET reports slack_mcp_card: the Connections gallery is on (connections_ui) and the registry shows the slack entry. The page and settings search (commandPalette/) both read it. A switch already on without the card stays visible with a note. The Slack card shows with the Crew-owned sign-in preview off (the default), so the switch does too.

Connections guide. docs/guides/oauth-app-registration/slack.md (lines 10, 73, 105, 118) no longer tells an operator whose app also runs the bot to remove its Bot Token Scopes. Slack's rule that a PKCE localhost sign-in cannot request bot scopes limits what the sign-in asks for, and the Slack card asks for user scopes only. A separate MCP-only app may still leave Bot Token Scopes empty. slack-setup.md and slack-integration.md say the same and no longer carry the not-yet-tested caveat.

The 17 new strings are in all 12 catalogs (website/src/i18n/locales/); en-XA is regenerated. The gated lines are in src/kiro_crew/slack-manifest.yaml, the toggle in pages/settings/SlackCodePanel.tsx and slackCodeSwitches.ts, the panel in SlackManifestUpdate.tsx, the wire types in api/client/messaging.ts. Config field slack.slack_mcp (config/sections_slack.py, section_builders.py), slack-integration.md, slack-setup.md, the slack-gateway spec and the feature map are updated, with settingsRegistry.gen.ts, ui-index and config-baseline.json regenerated.

Backwards compatibility

Compatible: with the switch off, the rendered manifest and the app-create deep link are byte-identical to main's for every existing switch combination, so nothing that works today changes. The switch is off by default and a config without the key reads as off.
Reader: src/kiro_crew/security/exfil.py:_slack_manifest_payload_re -- chat -- rebuilds the pattern from stripped_template() for every feature_sets() combo, so the on-state list without search:read is exempt and a mixed list is not; TestExfilExemption::test_every_combination_link_is_exempt, test_a_payload_mixing_both_user_scope_lists_is_redacted
Reader: src/kiro_crew/dashboard/slack_code_settings.py:manifest_status -- crew page -- compares bot scopes only, which the switch does not change; test_slack_code_settings.py status tests run every combo
Reader: src/kiro_crew/cli_setup.py:_manifest -- release -- renders through slack_manifest.render; test_cli_setup.py is unchanged from main and TestSlackMcpSwitch::test_cli_and_endpoint_render_the_same_bytes covers the on-state
Reader: src/kiro_crew/slack/features.py:REQUIRED_SCOPE -- chat -- still FEATURE_SCOPES, so latches and availability ignore the new switch; test_slack_features.py
Reader: src/kiro_crew/slack-manifest.yaml:oauth_config.scopes.user -- release -- only with the switch on, the manifest stops asking for the legacy search:read. A search integration configured separately on the same app's user token keeps the scope it was already granted but loses it at its next consent, and the granular search:read.* scopes take its place; with the switch off nothing changes; test_user_token_scopes_are_exactly_the_reviewed_set, test_it_changes_no_bot_scope_event_or_feature

Tests

  • Off-state equals main: test_switches_off_keeps_the_pre_toggle_payload keeps main's digest (bca5f538…), test_cli_setup.py is untouched, and test_user_token_scopes_are_exactly_the_reviewed_set pins the legacy ten for every combination without the switch. A one-off script also compared this branch with origin/main for all 4 existing combinations, with and without comments, 3 aliases and the deep links: 24 renders, 0 different.
  • TestSlackMcpSwitch: for all 8 combinations, with and without comments, off means the legacy user scopes and no is_mcp_enabled, PKCE or redirect; on means exactly the 18 scopes and the 3 settings, with no duplicate. It also checks the on-state drops only search:read, adds no bot scope, event or feature, has no write scope, and that only a real true turns it on ("true", 1, other-switch combinations). CLI and API render the same bytes. Deep links are exempt for every alias variant (someone, kirocrew, A_b-9, x, a 32-character alias). A partial MCP payload, a widened one (chat:write added) and one mixing both scope lists are redacted.
  • test_an_off_gate_renders_only_while_its_switch_is_off: the #@! gate, for all 8 combinations.
  • test_the_manifest_matches_the_slack_connections_card: user scopes, redirect URL and PKCE equal the real slack registry entry's. It fails if the entry is missing.
  • Card signal: slack_mcp_card follows the registry entry and is_visible, is true on a default config, and is false when connections_ui is anything but a real true (False, None, "true", 1).
  • test_features_are_the_registry: SLACK_MCP is in FEATURES and not in FEATURE_SCOPES. test_every_switch_has_a_bot_scope_or_is_manifest_only: FEATURE_SCOPES and MANIFEST_ONLY_FEATURES are disjoint, together make FEATURES, and every other switch has a REQUIRED_SCOPE entry. test_a_switch_without_a_bot_scope_passes_every_scope_keyed_reader registers a second scope-less switch and checks every scope-keyed reader treats both as "cannot run" without raising.
  • test_it_changes_no_bot_scope_event_or_feature: the on-state reports search:read as its one removed user scope, and the reverse diff removes exactly what the on-state adds.
  • test_slack_code_settings.py: PUT/GET round trip for slack_mcp. Every catalog's slack_mcp_details states the live on-state user-scope count (18) and slack_mcp_desc states no number.
  • SettingsSlackCodePanel.test.tsx: hidden with no card while off; shown while on with the no-card line as the warning box's first point, no Slack-card line, no connections_ui in the box, the Connections guide link (new tab, noopener noreferrer) inside the no-card point, and the disclosure saying why there is no card with no link and no config.json instruction. The consent-first description and closed <details>, which carries what stays on the Slack app after turning the switch off. Off: the muted note is exactly "This only changes the manifest below. Slack changes when you save it there.", names nothing one-way ("Slack support", "remove"), and nothing is at warning weight. On: the off note goes and the box has its heading and exactly its points. The "Slack bot permissions OK · save the manifest in Slack if you haven't" pill (no to-do, wrapping classes) with its "Not checked:" note directly under it (and no "every permission" line), the save step worded as a once-only step that says the PKCE point in the same words as the disclosure, no "for good" anywhere, the plain row labels and the "Copy manifest" button, and only while the card is offered, no other "only Slack support" line on the page, the events footnote only when a saved switch subscribes events, the bot-only switch keeping "Up to date", user-scope chips not borrowing a bot-scope "missing", "No longer requested: search:read" without a strike-through, and Copy and Open staying on offer when a feature is workspace-disabled but Slack tools is saved.
  • settingsSearchGovernance.test.ts: search reads slack_mcp_card and slack_mcp from the cached Slack config, withholds the switch only when that read says neither, and issues no request.
  • Each new frontend behaviour fails a test when reverted. Locale style and glossary tests pass for every catalog.

Manual verification

Run by the owner at about 17:00 UTC on 2026-11-19 in a test Slack workspace, on the owner's own gateway. All three steps passed:

  1. Created an app from the manifest with slack.slack_mcp on. Slack accepted the manifest.
  2. Install to Workspace issued an xoxb- bot token. With the xoxb- and xapp- tokens saved, the bot answered a DM in 6 s.
  3. Saved the app's Client ID and Client Secret on the Slack card under Settings → Connections and selected Connect. The sign-in succeeded and the card shows Connected. A new chat read the workspace's DMs and channels through the Slack MCP server.

So one Slack app with bot scopes, PKCE and the localhost redirect serves both the bot and the Slack card's sign-in. The Connections guide is corrected to match (see What changed).

Real-machine verification

Machine: the author's own dev host (no EC2 machine was launched), Amazon Linux 2 x86_64, kernel 5.10, 16 vCPU / 61 GiB

Before (main 3688176): PYTHONPATH=<main worktree>/src python rmv.py -> off-state renders: 36, sha256 bfb93ceb6b11e802 and slack_mcp switch: absent
After (head c712bf5): python rmv.py -> off-state renders: 36, sha256 bfb93ceb6b11e802 (the same bytes for every combination of the existing switches, three aliases, with and without comments, plus each deep link), and with the switch on the render carries is_mcp_enabled: true, pkce_enabled: true, http://localhost:48106/callback and the six search:read.* scopes, with no bare search:read
Slack sandbox (steps 1-3 above): passed, run by the owner in a test Slack workspace on 2026-11-19. From the commit message: "created from the slack_mcp-on manifest, Install to Workspace issued an xoxb- token and the bot answered a DM, and Connect on the Slack card succeeded with Slack MCP reading DMs and channels."
Cleanup: own computer; the detached main worktree used for the Before run is removed

rmv.py imports kiro_crew.slack_manifest, renders every combination of the switches main already has and hashes the bytes, then prints the MCP lines of the on-state render.

Screenshots / video

Frontend-only harness (the real built SPA with stubbed api answers, headless Playwright), re-shot on this head.

Slack card offered, switch off. "Slack tools for your agents" leads with "Nothing is read until someone connects their own Slack account"; the detail is in a closed disclosure. Under it, one short muted note that says where the change happens: "This only changes the manifest below. Slack changes when you save it there." Nothing at warning weight shows while the switch is off:

Slack Code section, Slack tools switch off, dark

The same row with "What this adds to your Slack app" opened: plain words first, with user scopes and PKCE in brackets, and what stays on the Slack app after the switch is turned off:

Slack tools row with the disclosure opened

Switch saved on. The warning box is headed "Before you save this manifest in Slack" and lists the internal-app, Connect and 30-day points. The pill reads "Slack bot permissions OK · save the manifest in Slack if you haven't"; the note under it starts "Not checked:", then gives the save as a once-only step that says what is permanent and what it costs. The update panel lists the added user scopes, "No longer requested: search:read" and the sign-in settings:

Slack Code section, Slack tools switch on, update panel

Switch on while Connections offers no Slack card (the gallery is turned off), disclosure opened: the box's first point leads with "Turn this switch off until the Slack card is on", and that point links the Connections guide; the disclosure says why there is no card. With the switch off and no card, the row is hidden.

Slack tools switch on without a Slack card

Light theme, switch off

Slack Code section, light

Related Issues

N/A: no tracking issue for this change, at the owner's request. Builds on #34811 (merged), which added the Slack Connections entry this switch's manifest lines match.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • 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

@kyleseaman
kyleseaman requested review from a team and KiroCrewCaptain as code owners November 16, 2026 23:39
@kyleseaman
kyleseaman requested a review from CrysisDeu November 16, 2026 23:39
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

No design-level concerns. The switch is opt-in, and with it off the manifest is byte-identical to main's. It stays out of the bot-scope registry on purpose, and the code that loops over every switch skips it.

Notes

  • features.enabled(cfg, "slack_mcp") now gets past toggle() and reaches available(), which has no bot scope to check for this switch. No caller does that today. Having enabled() refuse a manifest-only name outright would stop that from becoming a hidden trap later.

[DESIGN-REVIEWED] a017fab

Description read

[DESCRIPTION-READ] 940f43971838675716b0f9d37c315712ec492e2d16025558c7d80512b25218bb

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 16, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of a017fabb8855368d72964d799b42789ea02df6ab — 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 new switch is off by default, its job is stated, and every item has a consumer. One registry tuple has only one entry and one reader.

Notes

  • Item 6 — one consumer, generalized: MANIFEST_ONLY_FEATURES: tuple[str, ...] = (SLACK_MCP,) has 1 entry and 1 production consumer. Grepping MANIFEST_ONLY_FEATURES finds slack_code_settings.py:400 plus the FEATURES definition; the other hits are tests. There, feature not in MANIFEST_ONLY_FEATURES means the same as feature in slack_manifest.FEATURE_SCOPES. Subtraction: delete the tuple, write FEATURES = (*FEATURE_SCOPES, SLACK_MCP), and gate the capability line on feature in FEATURE_SCOPES.

What this change ships

Inventory (8 items) — 7 justified

Intent: let one Slack app serve both the Kiro Crew bot and Slack's MCP server by turning on a single manifest switch. This is an ADDITION.

  1. New opt-in Settings switch "Slack tools for your agents" (slack.slack_mcp, off by default) — justified
  2. With it on, the manifest adds is_mcp_enabled, PKCE and the localhost redirect, and replaces the user scopes — justified
  3. Manifest template gains a #@!flag gate for lines kept only while a switch is off — justified
  4. The "Update your Slack app" panel lists added/removed user scopes and added settings — justified
  5. Pill reads "Slack bot permissions OK · save the manifest…" and the copy button is relabelled "Copy manifest" — rides along
  6. A switch is hidden unless Connections offers the Slack card (slack_mcp_card); the hide logic sits in a one-entry registry tuple — one consumer, generalized
  7. Guides no longer tell an operator whose app also runs the bot to remove its Bot Token Scopes — justified
  8. Settings search, config field, i18n strings and generated registries — justified

[FIRST-PRINCIPLES-REVIEWED] a017fab

Description read

[DESCRIPTION-READ] 36529fc9cf710868b530335675de3c50d517162c1ed5cc79be173fc2350dacca

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 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🔴 BLOCK

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

UX-Verdict: BLOCK

The blind reader would not turn on "Slack tools for your agents", the main control this PR adds. Its off-state note never says that turning it on reads nothing.

Blockers

First-time user won't turn on the main switch
Trigger: someone opens Settings → Slack and finds the new switch off (shot-01).
Outcome: the description they read is about later use: "private messages and DMs included". The off-state note under it, "This only changes the manifest below. Slack changes when you save it there.", points at a manifest that isn't on screen. Nothing near the switch says flipping it is harmless. The blind reader understood the switch correctly but answered "no. The words 'private messages and DMs included' scare me." By contrast, the Agent sessions note "changes nothing in Slack yet" got a "yes", because it says flipping is safe. Severity: every first-time user × the feature never gets turned on × on every visit.
Fix: rewrite slack_mcp_switch_safe in the shape of the Agent sessions note, for example "Turning this on reads nothing and changes nothing in Slack yet. It only adds lines to the app manifest you save in Slack in the steps below."

Notes

  • status_permissions_up_to_date: the pill "Slack bot permissions OK · save the manifest in Slack if you haven't" puts an instruction inside a status. The reader asked "Is it OK or not?" Have the pill say only "Slack bot permissions OK" and leave the save step to the note under it.
  • slack_mcp_details promises "18 read-only permissions", but the panel lists only the 9 additions, and the reader noticed the mismatch. Either say "9 more read-only permissions", or have the row label say these are additions.
  • The no-card state (shot-04) puts "Turn this switch off until the Slack card is on" right after the user turned it on, and the reader called this contradictory. Lead slack_mcp_no_card with the reason it is shown: "This switch was turned on earlier, but…".

[UX-REVIEWED] a017fab

Description read

[DESCRIPTION-READ] ca0b435a509a832468a74bf9cfa604a0d60d4f667334304226e1dc5164d18813

That sha256 names everything this verdict read: the PR description, plus the 8 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 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] a017fab

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

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

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] a017fab

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

@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 17, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-manifest-mcp-switch branch from ed62df9 to a017aa5 Compare November 17, 2026 00:46
@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 17, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-manifest-mcp-switch branch from a017aa5 to ee5286d Compare November 17, 2026 02:19
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 17, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider raised 2 possible problems and estimates a 60% chance that this change introduces a defect; a person should check them.

The switch is opt-in, off by default, and leaves the manifest unchanged when off; the code and tests are solid. But the feature's purpose, one Slack app with bot scopes plus PKCE and a localhost redirect, rests on an untested assumption. The merged oauth-app-registration guide says Slack rejects that setup, and the author says the switch must not ship until a sandbox Slack workspace confirms it works. Saving the manifest in Slack turns PKCE on for the user's production bot app, and only Slack support can turn it off, so a wrong assumption can't be undone. Run the verification first, then either fix the guide or rework the switch around a separate app.

Things to check (possible problems the decider raised; at this confidence many turn out to be fine):

  • The PR's stated goal (one Slack app serving both the bot and Slack MCP sign-in) rests on a Slack-side assumption that nobody has verified, and the repository's own merged guide contradicts it. A wrong assumption cannot be undone: saving this manifest in Slack turns PKCE on for the user's production (src/⁠kiro_crew/slack-manifest.yaml, high)
  • After this PR the repository gives two contradictory instructions for the same Slack app setup. One of them is wrong until a real Slack workspace confirms which. Either verify the setup and update the oauth-app-registration guide, or do not ship the one-app path. (docs/guides/slack-setup.md, medium)

Tier: 2, held for a person: security-sensitive path.

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

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this. The code works as written, and turning the switch off leaves the manifest byte-identical to main. One thing has to happen before it can merge.

  1. src/kiro_crew/slack-manifest.yaml:48-53. The sandbox check your PR body requires has not run. Say an operator turns on slack.slack_mcp and saves the rendered manifest on their existing bot app. That turns on pkce_enabled: true and adds the http://localhost:48106/callback redirect, and every bot scope stays on the same app. PKCE cannot be turned off again without Slack support. No one has confirmed that Install to Workspace still issues the bot token, or that Connect on the Slack card is accepted on this app. The merged docs/guides/oauth-app-registration/slack.md is the guide the card links to. It says this setup is rejected (line 73), and its troubleshooting row (line 105) tells the operator to remove all Bot Token Scopes. On a one-app setup, following that row breaks the bot. Smallest fix:
    • Run the three sandbox steps from your Manual verification section and post the results on this PR.
    • If they pass, change lines 10, 73, 105 and 118 of that guide so it stops telling a one-app operator to remove bot scopes. Do it here or in a stacked PR.
    • If step 2 or 3 fails, the one-app switch should not ship as written, as your body already says.

Optional:

  • The in-app warning box in website/src/pages/settings/SlackCodePanel.tsx leaves out the "not yet tested against Slack" caveat and the separate-app fallback. Both docs carry them. The two surfaces should say the same thing.
  • The update panel lists only added user scopes, so it never shows that search:read leaves the manifest when the switch is on. A "removed user scopes" line would show it.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 17, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 17, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-manifest-mcp-switch branch from ee5286d to db50861 Compare November 18, 2026 16:51
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 18, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Thanks for the quick fixes. Every item from my earlier change requests is resolved on this head. A maintainer now has to approve before this can merge.

Status of my earlier items:

  • Sandbox results: fixed. Your 2026-11-19 comment and the PR body report that all three steps passed.
  • Lines 10, 73, 105 and 118 of docs/guides/oauth-app-registration/slack.md: fixed. The guide no longer tells a one-app operator to remove bot scopes.
  • The "save in Slack" pill in website/src/pages/settings/SlackManifestUpdate.tsx: fixed. It now shows a muted "Slack bot permissions up to date", and a test pins it.
  • Optional items (removed user scopes line, in-app caveat, off-state text, MANIFEST_ONLY_FEATURES): fixed, or answered in the body with a reason that holds.

My earlier change request is still on record until a maintainer approves. No item in it is still open.

What this review checked on this head:

  • With the switch off, every existing switch combination renders the same manifest and deep link as main, byte for byte.
  • With the switch on, the user scopes are exactly the 18 read-only scopes of the Slack Connections card, with no write scope. The redirect matches the card's callback. A test pins both against registry.json, so the manifest and the card cannot drift apart.
  • Every reader that needs a bot scope skips slack_mcp. The capability probe, the latches and the runtime gate never see it.
  • This review ran the PR's Slack manifest, features and code settings tests at this head, and 344 passed.

Why a maintainer decides:

  • The PR edits docs/feature-map/README.md and the Slack app's OAuth settings, so a maintainer must approve it.
  • Security: the exfil filter builds its Slack manifest exemption from feature_sets(), so this PR widens the exemption. A deep link that carries the slack_mcp manifest (user scopes, PKCE and a localhost redirect) now passes, where main redacts it. The exemption is still an exact match: tests show that partial, widened and mixed scope payloads are still redacted. A maintainer decides whether to accept this widening.

To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/).

Optional:

  • SlackManifestUpdate.tsx:451: while slack_mcp is turning off, the box still shows its lines the same way as in the on state. Nothing says that the next manifest saved in Slack ends the Slack tools connection for everyone who connected. One line for the pending off state would make that clear.
  • The draft RFC docs/request-for-change/rfc-crew-oauth-sign-in-redesign.md builds on this PR and expects a Connection manifest with no bot scopes. A short comment here that records the shape you and the RFC owner agree on would help.
  • test/test_slack_code_settings.py:160: the off case does not check that nothing was stored, although the comment says so. Adding else: assert "slack_mcp" not in _stored(env) would pin it.

@KiroCrewCaptain
KiroCrewCaptain dismissed their stale review November 19, 2026 22:14

Withdrawn: every item in this review is fixed or answered on the current head (see the follow-up comment). Other holds on this PR are listed there.

@kyleseaman
kyleseaman force-pushed the feat/slack-manifest-mcp-switch branch from c712bf5 to 0faf86d Compare November 19, 2026 23:21
@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 19, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-manifest-mcp-switch branch from 0faf86d to ca5ded6 Compare November 20, 2026 01:26
@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 20, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-manifest-mcp-switch branch from ca5ded6 to 508add8 Compare November 20, 2026 03:03
@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 20, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-manifest-mcp-switch branch from 508add8 to 9b05621 Compare November 20, 2026 04:57
@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 20, 2026
Kyle Seaman and others added 2 commits November 20, 2026 06:35
A sandbox Slack workspace confirmed one app serves both: created from the
slack_mcp-on manifest, Install to Workspace issued an xoxb- token and the
bot answered a DM, and Connect on the Slack card succeeded with Slack MCP
reading DMs and channels. So the Connections guide no longer tells a
one-app operator to remove Bot Token Scopes (a separate MCP-only app may
still leave them empty), and the docs drop the not-yet-tested caveat.

Off, the note under Slack tools for your agent uses the Agent sessions
row's words: turning it on changes nothing in Slack yet, and turning it
off later leaves the Slack tools setting, sign-in address and extra
sign-in permissions on the app until it is edited in Slack. The one-way
PKCE step stays at the save step in the update panel. On, the warning box
has one heading with the no-card line as its first point. The pill says
what is left for Slack tools, and a dropped scope reads "Removed: <scope>".

MANIFEST_ONLY_FEATURES names the switches with no bot scope, so a loop over
FEATURES skips them by name instead of relying on one REQUIRED_SCOPE guard.
@kyleseaman
kyleseaman force-pushed the feat/slack-manifest-mcp-switch branch from 9b05621 to a017fab Compare November 20, 2026 06:36
@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 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants