Repository navigation
feat(slack): let the owner share Slack access with named people, off by default - #30760
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The switch ships off, so this is not a product-shape change. But it carves an exception to accepted R10, and the only record of that decision is an RFC this same diff adds. Notes
What this change shipsInventory (10 items) — 10 justifiedIntent: let an owner who trusts named teammates let them use the Crew from Slack, off unless the owner turns it on. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 380379b Description read[DESCRIPTION-READ] acbb2ed5aa5e465cfe8feef713f9f3d51e00b58eedcf3e004bcdac9f48349b6e 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 blocks. The opt-in is off by default and only admits people the owner names and Slack confirms, and the PR records why it departs from R10. The move of Notes
[DESIGN-REVIEWED] 380379b Description read[DESCRIPTION-READ] 6f165a5d1b82b3b153fea09068c0b5b6853999b1785e7552f9dbfda94eb9c49b 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) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the confirm dialog that turns sharing on. That dialog is the only way to grant access, so it is the PR's main path, and none of the eight screenshots shows it. Evidence gaps
Notes
[UX-REVIEWED] 380379b Description read[DESCRIPTION-READ] 141c98d60ee4ba46673676d709e363ff16b07d1cccc11c0c798c5623f2da767f That sha256 names everything this verdict read: the PR description, plus the 11 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 |
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: |
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: |
bolichen97
left a comment
There was a problem hiding this comment.
Requesting changes on head 88566c8. The feature itself is accepted: an owner opt-in, off by default, that lets named people drive the bot from Slack. I read the product code in the diff (config, the shared_access module, the Slack event, dispatch, queue, approval and modal paths, and the dashboard routes), not every test or locale line. Three things need to change.
-
A shared user can get past an owner-only refusal.
shared_command_refusedin slack/shared_access.py askshandler.is_shared_user(user_id), which needs a fresh Slack confirmation (600 seconds). A listed person whose confirmation is 598 seconds old is admitted in_route_message, then a file download takes a few seconds, the confirmation ages out, andshared_command_refusedreturns False. The owner-only/harness command or the!temporaryor!incognitomodifier then rides into the admitted turn. The Opus review describes the same path. The diff already definesis_shared_listed, which does not need a fresh confirmation, for exactly this kind of refusal gate. Please use it here, as the cron and task-runner gates do, and add a test that ages the confirmation out between admission and dispatch and still sees the refusal. -
Keep
is_allowed_userowner-only, as on main. Widening it to "owner or shared user" means every owner-only site must remember to addand not is_shared_user(...). The diff does that by hand at the Home tab, the sessions keyword, the slash command,!dashboard, the message shortcut, code channels and trust, and any reader it does not touch now admits shared users without anyone deciding it. The Design Review names three:runs_script_hooks(the owner's hooks would run on a shared user's DM),send_messagewithtarget_userin dashboard/handlers/messaging.py, and the stop and kill buttons in interactions_sessions. Please add a separate check, default deny, for the sites that are meant to admit a shared user (message routing, their own requester prompt, the queued re-check, modal submissions), and leaveis_allowed_useralone. -
The Static Ratchet Gate is red on test_error_code_contract:
slack_shared_access.py: dynamic_status 0 -> 1 (lines [47]). Line 47 is the_denyhelper, which builds its error response with a status and an optionalcodethat defaults to empty. Several callers pass none: the 403 write refusals in the switch, add and remove routes, both "invalid JSON" answers, and "enabled must be a boolean". Please makecodea required argument of_denyand give each of those answers a lower_snake id. Do not regenerate the baseline.
Smaller notes: Backend Lint & Type Check and Await Fast Gate are also red on this head (I did not read their logs), and the Opus review points out that the Slack gateway and messaging specs were not updated for the new trust model.
I will review again once these are in.
88566c8 to
d9a68e1
Compare
d9a68e1 to
142c673
Compare
|
Checked head 142c673 against my change request. Two of the three points are resolved, thank you: The second point is still open. The branch now also conflicts with main, so please update it onto main. The new head's checks are still running, so I have not seen the lane results yet. |
142c673 to
ba6a9be
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Re-reviewed at 69853ab. Thank you: point 3 of my change request is now fixed. is_allowed_user is owner-only again, and the sites that should admit a shared user ask the new is_shared_user on purpose, so every other reader stays owner-only by default. The branch also merges with main again.
Four items from this head's CI block the merge:
- Line budget test (Backend Tests (3.12, 2)):
test_security_gate_liveness.py::test_the_package_stays_within_its_line_budgetreports the package grew past its budget. Please move the new lines out of that package, or shrink them, so the budget holds. - Docs path test (Backend Tests (3.12, 4)):
test_docs_settings_channel_paths.py::test_channel_settings_paths_go_through_messaging_channelsasks forSettings → Messaging Channels → <channel>wording, since there is no per-channel Settings tab. - GPT 6.1 (upheld),
slack/handler_runtime/dispatch.py:128: an OPTIONS answer such as/workspacefrom an admitted shared user reachesshared_command_refusedeven though_answer_optionscallshandle_messagewithinterpret_commands=False, so the card shows the answer but the agent never gets it. Please skip that refusal when commands are not interpreted. - Opus 5.5,
slack/interactions_sessions.py:550: the inline Stop gate checks only for a live binding, so a shared user can still press Stop from a code channel that was revoked. Every other shared-user code-channel gate in this PR refuses revoked channels; please make this one match.
Once these are in and CI is green, I will approve.
69853ab to
5c2dc7b
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Re-reviewed at 5c2dc7b. Thank you, two of my four points are fixed:
- The docs and strings now say
Settings → Messaging Channels → Slack, in every locale. - The inline Stop gate now refuses a shared user in a revoked code channel, with a test.
The security package line budget failure (Backend Tests (3.12, 2)) also fails on main and has its own fix pending, so it does not block this PR.
Still open:
- OPTIONS answers (GPT 6.1, upheld again).
slack/handler_runtime/dispatch.py:128still runsshared_command_refused(user_id, text)when an OPTIONS answer arrives withinterpret_commands=False, so a shared user's/tmpanswer is refused instead of reaching the conversation. Please apply that refusal only wheninterpret_commandsis true.
New on this head, both from this change:
2. Backend Tests (3.12, 1): test_ssm_loopback_trust_sites.py::test_every_loopback_trust_site_is_classified says is_direct_local_request is now called from a place its list does not know. Please add the new call site to that list with its classification.
3. Backend Tests (3.12, 7): test_facade_mirror_guards.py::test_no_test_patches_a_shared_name_on_an_owner_directly says a new test patches a name that more than one mirrored module binds, directly on its owner. Please patch it through the facade the guard names.
Once these are in and CI is green, I will approve.
5c2dc7b to
13df52b
Compare
|
@bolichen97 thanks. Re-reviewed points from your 5c2dc7b review, at b4d129c (rebased onto current main, including #21429):
New since your review, from the rebase onto #21429: code channels stay owner-only for shared users on every new path. That covers the code-channel slash commands, Archive, threads linked to a code channel's session (live tab or closed), pinned answers, every spelling of the session key, card answers (checked before the claim), agent-session Stop and rename, |
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 20% chance that this change introduces a defect, above the 12% limit for approving on its own. Adds an off-by-default owner opt-in (slack.shared_access) that lets named, Slack-confirmed users drive the Crew from Slack as the owner. It is a recorded maintainer decision, written up as an RFC exception to R10, and the settings warning discloses that a shared user acts as the owner. I verified: with the switch off every gate keeps its owner-only result and Slack is never called. A listed ID counts only after users.info/auth.test confirm it; a failed check refuses the person, and a reconnect clears all confirmations. Removing someone or switching off applies to the next event, including queued messages and open modals. The gates that keep shared users out use is_shared_listed (listed now, or admitted earlier in this process), so neither an aged-out confirmation nor a mid-message removal gets past them. Those gates cover Trust, other people's prompts, !dashboard and the other ! commands, /kirocrew, messages starting with /, privacy modifiers, run/cron/spawn/status/sessions, the Home tab and other buttons, and code channels on every route I traced. Dashboard writes need an owner-gated request made directly on this machine and never from an app token or internal caller. Shared Crew Tier: 3, held for a person: merge conflict. 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 |
|
Thank you for this work. The design is accepted on record in this PR's review history. The PR now waits for a maintainer to approve it. The open change request also needs a re-review at this head. Points 2 and 3 of that request look addressed. For point 1 you kept the refusal and moved it ahead of the card claim, and the reviewer has to accept that answer. This change widens who the Slack gateway admits, so a maintainer decides whether to accept it. What this review checked on head b4d129c: Optional:
|
…by default slack.shared_access (enabled: false, user_ids: []) lets the Slack users the owner lists drive this Crew as the owner in DMs, mentions and threads, once Slack confirms each ID (users.info: same workspace as auth.test, a person, not deactivated, not the owner). slack.allowed_users, !allowlist and /kirocrew @user stay inert. A shared user answers only the tool prompts their own turns post and never grants Trust. The access list, Trust/YOLO, !dashboard and every other ! command, /kirocrew, the Home tab, the sessions list, cron and run keywords, other buttons and code channels stay the owner's. Removal or switch-off applies to the next event. Admissions and refusals are audited by user ID. Settings -> Slack gets a Share Slack access toggle with a warning that is always shown, a confirm to turn it on, and the ID list with each person's name. Docs, the configuration reference, the feature map and a design note record the decision.
A shared user's caption-less file was refused as a "/" command: the check read the ingested text, which leads with the attachment's temp path. The command refusal now reads what the person typed (spool_text). A privacy token inside an attachment, a voice transcript or a forwarded body never changes a mode for a shared user; a card label is judged only for a leading "/"; a review revision is judged on the person's feedback before the draft is consumed, and a refused one is audited with the owner-only notice. The UX round on 9ab098d (CI UX Review, then local GPT, Opus, First Principles and UX lanes), changed since 9ab098d: - The page refuses at the switch while anyone listed (apart from the owner's own ID) is unconfirmed and names them, so the confirm only names people who get access. UI guard only: the switch route and config.json handling are unchanged. - After the confirm the page cancels any read in flight, reads the list again and turns sharing on only if it is the list just confirmed (ID, confirmation and reason) and still off. While it reads, the switch is busy and Add and Remove are held; a failed read or leaving the page sends nothing. - Switch hints hold only while the list still says so. - A 409 not_applied carries unread: ["slack"] when the slack section was unreadable (names only); the notice says so in plain words, says to restart, and says the switch and list show what is in effect. The 409 error string and _live_matches docstring name the real causes. - Copy in all 13 catalogs: the pending hint says "Remove {{names}}, or fix what each row says"; a malformed ID's hint carries how to find a member ID; the unverifiable row says when the page asks Slack again; fr uses U+202F; zh-CN not_applied wording restored. The docs line matches. - The section is its own row of the Slack card and a failed chunk load uses the inline layout, so the raw load error is never printed. - config/sections_slack.py imports USER_ID_RE inside is_slack_user_id, so the config.sections facade binds no new owner name (test_sections_facade.py).
|
@bolichen97 thanks for the three reviews. Where each ask stands at 380379b (rebased onto current main): 5792229642
5802201110
5806360025
Line cap. R10. This PR departs from R10 of your Could you take another look? |
Problem / Motivation
Goal: Let the owner share the Crew's Slack bot with named Slack users, who then act as the owner. The feature is off by default.
Today the Slack bot answers only the owner (
KIROCREW_OWNER_ID).slack.allowed_users,!allowlistand/kirocrew @userexist but do nothing, on purpose: anyone the bot answered would act under the owner's identity and credentials. A team that wants a teammate to ask the Crew something in Slack has no way to allow it, even when the owner accepts that trade.Why it matters
An owner who trusts a teammate can let them use the Crew from Slack (DMs, mentions, threads) without handing over a dashboard login. The grant is explicit and named. The settings page states plainly what it gives away, and nothing changes for anyone who leaves it off.
Not a goal
rfc-per-person-execution).slack.allowed_users,!allowlistor/kirocrew @user. They stay inert, and turning the new switch on never admits a staleallowed_usersentry.Backwards compatibility
Compatible:
slack.shared_accessis off with an empty list by default, and off is pinned by tests to today's owner-only behaviour.slack.allowed_users,!allowlistand/kirocrew @userkeep their current inert behaviour.The change only adds a config section, routes, a settings section and an allow path behind a default-off switch. Every existing gate keeps its owner-only result when the switch is off.
One definition moves to keep
code_channels/routing.pyunder the line cap:options_answer_permittednow lives incode_channels/shared_refusal.py, with the shared-user refusal this PR adds, androuting.pyre-exports it, so every caller keeps importing it fromrouting. Its readers on main:Reader: src/kiro_crew/slack/interactions_options.py:_handle_options_several_submission -- chat -- imports options_answer_permitted from routing at call time; the re-export serves it (test_slack_code_channels_options_permit.py)
Reader: src/kiro_crew/slack/interactions_options.py:_handle_options -- chat -- imports options_answer_permitted from routing at call time; the re-export serves it (test_slack_code_channels_options_permit.py)
What changed (motivation → approach → change)
Approach. A plain owner opt-in, decided by Kyle on 2026-11-05 and recorded in the new
docs/request-for-change/rfc-slack-shared-access.md(in-progress). It is a deliberate exception to R10 of the acceptedrfc-per-person-execution, which says work for an unlinked channel user runs as a guest account or not at all, never as the owner: only people the owner lists and Slack confirms, with the switch on (a turn already running finishes as the owner after a removal). Everyone else stays under R10. The RFC's "Relation to rfc-per-person-execution R10" section records this.Config.
SlackSharedAccessConfiginconfig/sections_slack.py, built by_build_shared_accessinconfig/section_builders.pyand wired inconfig/sections.py:slack.shared_access.enabled(defaultfalse) andslack.shared_access.user_ids(default[]);config-baseline.jsonis regenerated.The gate.
is_allowed_userstays owner-only, as on main. The sites that admit a shared user on purpose askis_allowed_user(x) or is_shared_user(x)(slack/handler_runtime/access.py); a test pins that list, so every other reader refuses shared users by default.users.infoconfirms it againstauth.test(same workspace, a person, active, not the owner);slack/shared_access.pycaches a pass 10 minutes, a refusal 1./commands,run, cron, code channels) testis_shared_listed(listed, or admitted as shared earlier in this process), so neither an aged confirmation nor a mid-message removal gets past them. Code-channel refusals hold with Slack Code on or off, revoked bindings included, and cover the workers a code channel's own session dispatches (feat(slack): let a code channel's own session dispatch its workers #22001,bindings.worker_conductor).slack/code_channels/shared_refusal.py(shared_sender_dropped, re-exported fromrouting.py), which keepsrouting.pyunder the 2,000-line cap.What a shared user can do. They drive work in DMs, mentions and threads:
!stopand the Stop button (not in a code channel),!title,!compact, question cards, the review-mode draft of their own turn, and the tool prompts their own turns post._PendingApproval.requester,SlackApprovalDecider.requester_for()). A shared user can't answer someone else's prompt and never grants Trust.What stays the owner's is the table under "Owner-only line" below.
Queue and modals. A queued entry records whether its sender is listed; the drain asks Slack again and drops it if access ended. Every modal submission refreshes the confirmation in
handle_view_submissionfirst.Dashboard.
dashboard/slack_shared_access.pyaddsGET/PUT /api/slack/shared-access,POST /api/slack/shared-access/usersandDELETE /api/slack/shared-access/users/{user_id}.require_owner_dashboard_request). Writes also need a direct local request.confirm: true; otherwise the route returns 400confirm_required.not_applied, and GET reads the live config, so the page shows who still has access. Every refusal carries acode.SlackSharedAccess.tsx, client calls inapi/client/messaging.tsandapi/client.ts). It loads as its own chunk throughlazyRetry(SlackPanel.tsx), which keeps the Settings page chunk under its size budget; if that chunk fails to load, a one-line notice with Try Again takes its place (the raw load error is read out to assistive tech, never printed) and the rest of the Slack form stays as typed. The warning shows before the switch can be turned on and stays while it's on. Turning on needs everyone listed (apart from the owner's own ID) to be confirmed by Slack; the switch says who isn't and why, and the confirm counts and names the people who get access. After the confirm, the page reads the list from the server again and turns sharing on only if it is the list the owner just confirmed. Strings are underpages.settings.slackSharedAccess.*inwebsite/src/i18n/locales/*.json(12 locales plusen-XA); the confirm's two plural keys are registered inpluralKeys.json.Audit. Every admission and refusal is a security event log row with the Slack user ID and no message text; list and switch writes log
slack.shared_access.switch|add|remove.Docs. The Access control section of
slack-integration.mdgains "Sharing Slack access". The change also adds rows toconfiguration.md, the feature map and the RFC index, and updates the Slack trust row insecurity-deep-dive.mdand the access notes in theslack-gateway.mdandmessaging.mdspecs.Owner-only line
This split is a judgment call, and Kyle can widen it:
!dashboardand other dashboard links!command (!channel,!agent,!ta, ...) and/kirocrew/, including a question-card answer whose label starts with/;!temporary/!incognito/agent,/model,/tools trust-all): the harness reads a leading/as a command whatever the Crew'sinterpret_commandssays, so the/refusal does not depend on it. Privacy modifiers keep a turn out of the owner's record; they are judged only whereinterpret_commandsreads them, so never on a card answersessionslist, and thespawn listandstatuskeywordsrunand natural-language cron keywordsSecurity
A shared user acts as the owner, and the agent is not narrowed in their turn (decided 2026-11-05, option A). Tools run under the same approvals as the owner's turns, and the shared user answers their own turn's prompts. So the Crew tools the default agent runs without asking reach the owner's data for them:
list_sessions,search_chat_history,get_chat_session(withall_workspaces): read the owner's other conversations.memory_recall,learn_add/learn_remove, memory writes: read saved memory and change what Kiro remembers. A lesson they add reaches the owner's later sessions.artifact_*,workflow_run,spawn_run, cron tools: read and change artifacts, run work, manage schedules.config.json, this list included. With the sandbox on,config.jsonis sealed read-only.The settings warning says this in five plain bullets: they can drive work as you with your files, Git and cloud credentials and connected tools; they can see and act in any thread they're part of; they can read your other conversations and this Crew's saved memory and change what this Crew remembers; they can't start runs or schedules by typing a command, but while the agent works on their messages it can still create schedules and start tasks as you, and a schedule it creates keeps running as you after you remove that person, and it names the Schedule page, where it can be deleted; only add people you trust. Refusing these tools when a turn's requester is a shared user is follow-up #30678. It needs the requester carried into the tool gate (SCR-watched hook code), so it is left out of this PR.
Also left as is on purpose:
SlackTransportadmits the listed IDs for that notice only (shared_access.listed_ids, none while the switch is off); replay starts no turn.Known limit: Enterprise Grid. A listed ID counts only when
users.infogives the sameteam_idas the bot'sauth.test. On an org-wide Enterprise Grid install, a person whose home workspace differs from the one the bot token reports is refused, and the settings page lists them with "This person is in a different Slack workspace.", even inside the same org. This fails closed: the person gets no access. Matching onenterprise_idinstead is left for a follow-up if a Grid owner needs it.Sensitive change review: none needed. The diff touches no
SENSITIVE_GLOBSpath, which I checked withsensitive_files()from.github/scripts/sensitive_change_review.py. It adds no rows tosecurity_posture*.pyorexfil.py.Tests
Proof: not provable -- other: feat PR adds a new capability behind a default-off switch, so there is no fix to revert
test/test_slack_shared_access.py(47 tests) covers the following. With every production hunk reverted, the 8 core admission and refusal tests all failed.allowed_usersentry is never admitted./command or privacy modifier is still refused once the confirmation has aged out./commands and privacy modifiers refused before the turn.test/test_slack_shared_access_routes.py(12 tests): after an unapplied removal the page still shows the live grant; every route is owner-gated; an app or internal caller and a remote session change nothing; turning on needs the confirm; an add is kept only once Slack confirms it; a removal is stored and audited by ID; a re-listed ID is checked again; an unapplied write isn't reported as done, and its 409 namesslackwhen that section was unreadable, never a file or a value.website/src/test/SettingsSlackSharedAccess.test.tsx(35 tests): sharing doesn't turn on while anyone listed is unconfirmed (the page names them and says to remove them or fix what each row says), so the confirm only ever names confirmed people, and it won't open when Slack confirmed nobody; the warning shows while off and stays while on, including that the agent can still create schedules and start tasks as you, naming the Schedule page in bold, with no link, in the warning and the confirm; turning on needs a confirm that names who gets access, a cancel changes nothing, turning off needs none, and with nobody listed it doesn't turn on; each person is listed by name, with the reason first when Slack didn't confirm them, and the owner's own ID gets no "can't use" line, neither blocks turning on nor appears in the confirm; a row gives the reason first, then, in warning text, that they can't use the Crew now and get access without asking the owner if Slack says the account is fine at their next message; while off, a row gives only the reason; a line at the switch says the state in words (off: nobody below can use the Crew, and the list is titled "People to share with"; on: the people Slack confirmed can, under "People with access"); the owner-only line is hidden on a remote session, and a remote viewer's row never says to remove someone; a check that failed (Slack unreachable) shows as an error notice in the list, saying when the page asks Slack again, while Slack's own verdicts stay plain status text; a malformed ID is refused locally, with how to find a member ID; the not-applied notice says the earlier list and switch are still in effect, says in plain words when the Slack settings could not be read, and sits under the switch and opens with the state in effect and the change that was saved ("Sharing is still on: turning it off is saved but not applied yet.", or the person added or removed), then why and what to do; after the confirm the list is read from the server again, and a change the page had not shown yet, a refetch that left before the click, a failed read, the owner's own ID turning into someone else's, leaving the page during the read, or another window having turned sharing on sends nothing, and while it reads the switch is busy (it keeps its tab stop) and Add and Remove are held, so one change is sent (each fails on6d9044092e); a hint at the switch drops once the list no longer says so; a failed load offers Try again and re-reads the section; read-only on a remote session; inside the Slack panel, a failed load of the section keeps the form and its typed values, prints no raw load error (fails on theblocklayout), and Try Again loads it (fails on a plainlazy+Suspenseversion).test/test_slack_shared_access.py: a person removed (or sharing switched off) while their message is in flight is still refused the owner-only controls (fails without the fix).test/test_slack_code_channels_events.py: with Slack Code off, a shared user can't answer a card, mention the bot, reply in a linked thread or Stop in a bound or revoked channel; an unreadable store refuses them.test/test_slack_shared_access_code_channel_surface.py(32 tests): a shared user runs no code-channel command, can't archive, rename or Stop there, can't reach a code channel's session through a linked thread, a pinned answer or any spelling of its key, including a worker that session dispatched (feat(slack): let a code channel's own session dispatch its workers #22001); quarantined and revoked rows stay fenced. A plan-canvas comment (feat(slack): code-channel bar actions, canvas comments, view tabs #22370's read-back) from a shared user, a listed but unconfirmed ID or an unlisted one is refused, audited and not read again, with the feature on or off, and the route the read-back uses refuses a shared user on its own. Neither the context bar's Stop nor Slack's own Stop at the channel root lets a shared user stop the channel's session, with Slack Code on or off.test/test_slack_shared_access.py:is_allowed_userrefuses a confirmed shared user, and only the named sites callis_shared_user.test/test_slack_inline_stop.py: a shared user's Stop button stops their turn, except in a code channel.test/test_slack_events_coverage.py: a listed person whose confirmation aged out between the two reads is still refused/kirocrew dashboard(fails without the fix).website/src/test/settingsCoverage.test.ts: the new section is mapped for settings search (scripts/settingsExtract.ts; regeneratedsettingsRegistry.gen.ts,settings-registry.generated.json,ui-index.generated.json) and its draft input accounted for.test_slack_handler_composition_contract.py(shape digest),test_slack_post_message_call_sites.py(dispatch.py 10, transport_dispatch.py 5),test_ssm_loopback_trust_sites.py(dashboard/slack_shared_access.py: 1),test_slack_code_channels_events.py,test_slack_events_coverage.py,test_interactions_approvals.py,test_review_mode.py,test_config_refactor_contract.py,test_action_interactions.py,test_slack_agent_session_stop.py,test_slack_gateway_channels.py,test_slack_options_one_click.py,test_slack_reconnect.py,test_stop_clears_only_its_own_sender_slack.py.test_kas_bundle,test_decisions_sagemaker_provider,test_terminal_commands,test_cli_stt_memory_doctor,test_cli,test_kas_cli_floor,test_bedrock_kb_connector), none from this change.test_codex_session_mcp.pytests that also fail on the clean base.test/test_slack*.py, the shared-access suites, the ratchets in PR mode and the config and settings tests (237 files): 8,570 passed; the changed test files three more times, 306 passed each; all 21 Fast Gate steps, Semgrep's diff scan and the agent-SDK boundary check pass.137482b60fon mainfb1d703759: backend onb484461645(base77091ea555): the 20 changed test files (999 passed), every ratchet and tree-scan test in PR mode (234 files, 12,864 passed, 14 skipped), the process-cache-floor ratchet, the prepush static gates, the file line cap, all 22 Fast Gate steps, Semgrep's diff scan and the agent-SDK boundary check; web onb484461645: the changed web tests three times (237 passed each), i18n style tests (1,270 passed), i18n:check, tsc, eslint and the bundle size gate; vitest related to the changed web files on16f86ea358(3,695 files, 57,842 passed). After the rebases onto main's ladder, config, catalog and conftest changes: the ladder, section-builder, web-ask and changed test files (66 files, 4,228 passed, on137482b60f), the web tests, i18n style (1,270 passed), i18n:check, tsc, eslint, the file line cap, all 22 Fast Gate steps, the prepush static gates and Semgrep onc3ed531024.380379b7b7on mainf99b644158(the ErrorNotice fix on top of137482b60f, checked on0670cb897d; after the '=' rebase onto main's config-loader change, the config-loader, shared-access and torn-config test files: 23 files, 1,319 passed): the Share Slack access and Slack panel tests, settings coverage and API surface (237 passed; the three not-applied tests fail on137482b60f), i18n style tests (1,270 passed), i18n:check, tsc, eslint, the file line cap, the bundle size gate and the 13 screenshots.Manual verification
website/scripts/capture-slack-shared-access.mjsand checked each of the 13 captured states by eye (see Screenshots).Screenshots / video
Turning sharing on confirms with the people Slack confirmed, by name:
With nobody listed, the switch doesn't turn on and says what to do:
Off with the warning, on with two people, a malformed ID, and the read-only remote view
Slack confirmed nobody, a person Slack could not be asked about, the switch refused while someone is unconfirmed, saved but not applied, a failed save, a failed load, and the chunk-load Try again notice
Review notes handled
On
70318715e0:is_slack_user_idnow validates throughUSER_ID_REfromvalidation_parts/input_bounds.py, the pattern the messaging schemas use; its own character set is gone. A probe table (valid U and W, lowercase, empty,Ualone, 20 and 21 characters, a trailing newline, spaces, non-ASCII letters and digits, non-strings) gives the same answer as the old loop on every probe, andtest_a_member_id_is_what_the_messaging_schemas_acceptpins it.0b3c0110d9(block, off state): while off, "Off: no one below can use this Crew from Slack." sits at the switch and the list is "People to share with"; "People with access" only while on. Search lands on the switch; the list keeps itsdata-setting-keyanchor in both states. Not taken (a later lane's note, asked again oncddef2b55f): one heading in both states; the conductor ruled for the two headings above.a5af3b4980(block, not applied): the notice now says the change is not applied yet, that Slack still uses the earlier list and switch so anyone who had access still has it, and that the change is saved. (Corrected on9ab098de9c: it applies after a restart, not on its own; see below.) Note: a failed load of the section now has Try again, which re-reads it.9ab098de9c(block, the confirm named a person it then told you to cancel for): the page doesn't turn sharing on while anyone listed is unconfirmed. The hint at the switch names them and says to remove them or fix what each row says, so the confirm only ever opens with people who get access, and its count and names agree. The hint is worded from the list as it is now, so it drops a name once that person is removed; a list holding only the owner's own ID reads as nobody listed; and if a refetch changes the list while the confirm is open, the confirm does not turn sharing on and says the list changed. This is a UI guard: the server's switch route, its confirm requirement and config.json handling are unchanged, and the gateway still admits only IDs Slack confirms. No Remove action in the confirm, for the reason above.addaudit row and rewrite config.json for someone already listed. Instead the row says what the code does: the page asks Slack again when it is reopened or regains focus, and an answer can be up to a minute old (a refusal is cached for 60 s when the page's client is the gateway's own bot). The not-applied notice names what Kiro Crew could not read (in plain words since6d9044092e, see below): the 409 carriesunread,["slack"]when this process once read theslacksection as unreadable (the one observation the Slack watcher waits on; names only, never a value). Then it says to restart, because the loader keeps that observation until the gateway restarts (config/resolution.py). Otherwise it promises no restart: it says another setting, such as the same one in config.local.json, still holds the earlier value, and that The switch and the list show what is in effect.Since
9ab098de9c(the UX round), folded into the second commit:9ab098de9c, facade red):config/sections_slack.pyimportedUSER_ID_REat module level, sotest_sections_facade.pyfound an owner name theconfig.sectionsfacade does not bind. The import now sits insideis_slack_user_id, so the facade and its frozen import inventory are unchanged and the assertion is as strict as before. The local gate set missed it because it ran four named facade tests but nottest_sections_facade.py; it now runs everytest/test_*facade*.py.:;!?, as the fr style test requires.6d9044092e(block, the post-confirm check read the cache): after OK the page now reads the list from the server, and sends nothing unless it is exactly the list the owner confirmed, by ID, confirmation and reason. A failed read sends nothing and shows the load-failed notice with Try again.a6d7476c52(block, writes could start while the list was read again): while that read is out, the switch, Add (button and Enter) and Remove are busy, so no second confirm and no list write starts under the answer being checked, and one change is sent. A refetch already in flight is cancelled first, so the answer can't predate the click (Opus), and leaving the page during the read turns nothing on.5ce9f1d49a(block, the switch showed On beside "What you saved: turn sharing off"): the not-applied notice now sits under the switch, not at the foot of the section, and opens with the state in effect: "Sharing is still on: turning it off is saved but not applied yet." (or off/on, or "Ada is still on the list Slack uses: removing them is saved but not applied yet."). The cause and what to do follow as a second line, which names the settings file. Notes: Slack's check is "verified", so it no longer shares a word with the confirm dialog ("the people below that Slack verified", "while Slack hasn't verified someone on the list"); the owner-only line is "Only you can change this list or switch, approve tool prompts for a whole session, or use Slack Code channels." Not taken: removing Reload page from the chunk-failure notice. That notice is the sharedlazyRetryinlinelayout, so dropping the button or warning about unsaved fields is a new control in a shared component, outside this PR; Try Again, which keeps the form, comes first.137482b60f(block, errors-use-error-notice): the not-applied notice under the switch now renders throughErrorNotice(title: the state in effect; message: why and what to do), so a rejected request reads as an error, in the same place. Every other value from a rejected request on this page already goes throughErrorNotice(a failed save or add, a failed load, a failed Slack check in a row); the switch hint and the member-ID hint come from the list and local validation, not from a request.137482b60f(PASS), notes deferred to a follow-up (lead ruling, 15:40Z): each needs new strings in all 13 catalogs and new screenshots, and would risk another UX round on a head where UX passes. (1)save_failedis one message for the switch, add and remove: name each change ("Could not turn sharing off", "Could not add U...") next to its control. (2) The on-state row of a person deactivated after sharing was turned on should say so ("Deactivated since sharing was turned on; Slack blocks them until reactivated."). (3) "Slack verified" / "Slack hasn't verified": no row is ever marked verified; add a "Verified" tag on confirmed rows or reword.0670cb897d(PASS), notes deferred with the three above (same reason): (1)not_applied_unreadshould lead with the action ("Restart Kiro Crew to apply it; you don't need to change the switch again."), the config.local.json check second. (2) A failed switch save should show under the switch, the way the not-applied notice does (with note 1 above). (3) Keep the find-a-member-ID help visible under the Add field when the list is not empty.d8c1c85393(PASS, the blocker above answered; notes): the restart line says where config.local.json is: "(first check the slack section of config.local.json in the Kiro Crew data folder)". Not built (each needs new logic, which this round takes no further): putting "until you restart" in the bold line, because only the unread case is fixed by a restart, so it needs its own branch and keys; naming the change in a failed save ("Could not turn sharing off"), because the generic failure would need a per-change message.8fa81f8c10(minors): the capture script waits for the current copy; a 409 on turning sharing on is tested too; the CJK space between joined sentences is gone with the two-line notice.647da76607(PASS, notes): an "On: the people below that Slack confirmed can use this Crew from Slack." line sits where the off line does; the pending hint opens "You can't turn sharing on while someone on the list isn't confirmed by Slack."; a not-applied notice names the saved change (reworked on5ce9f1d49a, below).647da76607(minor): the docs' memory sentence says "this Crew's saved memory, and change what this Crew remembers", as the page does.cddef2b55f(PASS, notes): the owner-only line and the memory bullet use the labels the product shows and "this Crew": "press Trust session on a tool prompt, get a dashboard link from Slack, change channel settings, or use Slack Code channels"; "this Crew's saved memory, and change what this Crew remembers". In the read-only view a row no longer says "Remove them to keep them out" (there is no Remove there). One heading in both states: not taken, see the0b3c0110d9entry.cddef2b55f(minor): the re-read tests run with the app's never-stale cache, so they fail if the read'sstaleTime: 0is dropped.a71ea1c77f(minors): the switch is marked busy, not disabled, while its own change is checked or written, so it keeps its tab stop and is announced as busy; a re-read that finds sharing already on (another window) writes nothing.a6d7476c52(minors): the section is its own row of the Slack card, so the one-line load-failure notice sits in a padded row; the docs line says "remove them, or fix what their row says"; the focus test now proves the in-flight refetch case.6d9044092e(block, the not-applied notice left the switch unexplained): it no longer shows the raw(slack)key, says "could not read its Slack settings", and ends "The switch and the list show what is in effect." Notes: the pending hint says "Remove {{names}}, or fix what each row says"; a malformed ID's hint carries how to find a member ID, which the empty-list help no longer shows once anyone is listed; a failed chunk load uses theinlinelayout, so the raw load error is read out and shown on hover, never printed.6d9044092e(minors): the "add someone first" and "nobody confirmed" hints hold only while the list still says so; zh-CNnot_appliedgets its full first sentence back; the 409'serrorstring and the_live_matchesdocstring name the real causes (config.local.json overrides it, or the slack section was unreadable); the focus test restores focus inonTestFinished.Related Issues
Part of #22759. Follow-up: #30678 (refuse owner-scoped Crew tools in a shared user's turn).
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)