Repository navigation
feat(shared-crew): guests get the owner's in-crew abilities and see attachment previews - #29609
bolichen97 wants to merge 1 commit into
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS No blockers: every changed guest surface appears in a screenshot, and the blind reader read the owner-only page, the row locks and the access-check notice correctly. Notes
[UX-REVIEWED] 6d45dfe Description read[DESCRIPTION-READ] 37bd55d20597537057804ad9ff40a2e469ad7c1c68e43eeb4ad184bb5b1670d1 That sha256 names everything this verdict read: the PR description, plus the 25 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK The diff adds a fixed owner-only list that returns 403 to guests on writes that work for them on main, with no Notes
What this change shipsInventory (10 items) — 7 justifiedIntent: let a Shared Crew guest work fully inside the Crew and see attached pictures. Framed as an ADDITION.
Blockersproduct-shape change without accepted RFC: guests lose capabilities with no [FIRST-PRINCIPLES-REVIEWED] 6d45dfe Description read[DESCRIPTION-READ] cf597e8e8f2fb0f28ec35e641ed61ff603e4696e4018fdbb4575f70ce324af66 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. Guest-open routes are a pinned list ( Notes
[DESIGN-REVIEWED] 6d45dfe Description read[DESCRIPTION-READ] 343e0d2f6e71397e32fc26d75ba762acce936e383798cbede025ed5df5e044bb 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 |
3fe0b89 to
6934374
Compare
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: |
6934374 to
723c6e0
Compare
723c6e0 to
c458ad5
Compare
c458ad5 to
28e6ec0
Compare
25859f9 to
a329dc3
Compare
|
Thanks for the review. Both items, and the log-stream note, are answered on 2964669:
Optional:
|
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the update. The item from my last review is fixed on this head, but the review found two bugs at the guest schedule acknowledge route and two failing frontend tests.
Earlier items:
- Revoke answers 503 after the share is gone, and the page says "Try again": fixed.
RevokeControlnow treatsschedules_not_pausedas an outcome. It refetches the invite and People lists and showsRevokeUnpausedNoticeabove the lists, and a test inTailscaleInvites.test.tsxcovers it.
-
A guest's schedule acknowledgement can hide a host image in a dict key or a deep list (
shared_crew/guest_scope.py:754).- Trigger: A guest sends
POST /api/crons/{id}/ackon an attended job with{"summary":[{"/project/private.png":null}]}, or with the path nested 17 lists deep. This PR opens the route to guests for the first time. - Outcome:
_strings_inwalks only dict values and stops without an error at depth 16, so it collects no text and the checkpoint lets the write through._ack_job_lockedstores the list,slack/gateway_runtime/cron_turn.py:738renders it as- {a}into the run prompt, andrun_execution.pybindsguest_prompt_originto False. The owner's reader then attaches the host image to the model, and the guest can see the run's result. - Smallest fix: For a guest, accept only a string
summaryat the ack sink. Also make_strings_incollect dict keys and refuse a body that goes past the depth cap instead of skipping it. Add two tests (key position, 17-deep list) that expect 403owner_onlyand fail when the fix is reverted.
- Trigger: A guest sends
-
The store's
summary[:500]cut can create an image path the checkpoint never saw (cron_service/service/job_writes.py:609).- Trigger: A guest acknowledges an attended job with a plain string: 479 padding characters, a space, then
/project/private.png.txt, so.pngends at character 500. - Outcome: The checkpoint judges the full string, finds no image path in any reader view, and lets it through. The store keeps
summary[:500], which ends in/project/private.png, and the next run reads that host image as in item 1. Requiring a string summary (item 1) does not close this. - Smallest fix: For a guest, at the ack sink, judge the value the prompt will actually read: run
_local_image_outside_storeson"- " + summary[:500]off the event loop, and answer 403owner_onlywhen it names an image outside the stores. Add a truncation test.
- Trigger: A guest acknowledges an attended job with a plain string: 479 padding characters, a space, then
-
Frontend Tests (1) and (3) fail on this PR's new
sharedCrew.identity_check_failedstrings (website/src/i18n/locales/fr.json:23388,website/src/i18n/locales/hi.json:22852).- Trigger: Every CI run on this head. The
[changed-values]cases infrStyle.test.tsandhiStyle.test.tscheck values this PR adds. - Outcome: The fr value has a plain space before
:where U+202F is required. The hi value uses the formal आप/आपकी where the catalog requires the तुम register. Both tests go red, and Frontend Coverage Merge follows. - Smallest fix: Use U+202F before the colon in fr ("accès : "). Rewrite the hi value in the तुम register (for example "तुम्हारी पहुंच ... जिनका तुम उपयोग नहीं कर सकते").
- Trigger: Every CI run on this head. The
The Backend Tests (3.12, 3) and Coverage Gate reds come from a skill file this PR does not touch, and they are not yours. A rebase after main fixes that file clears them.
Optional:
- Most of the schedule ring-fence (revoke pause, race re-checks, ack handling) exists only because guests can now write schedules. If guest schedule writes stayed owner-only in this PR and moved to their own PR, items 1 and 2 would go away with them.
/channelsis reachable by a guest, but/api/channelsis now owner-only, so a send or create onChannelPage.tsx(lines 955 and 1106) fails with no Owner only state. Add/channelstoOWNER_ONLY_PATHSor aReader:line for it.- The store-side unattended re-check is tested only for
approval_mode="auto". Parametrizing the two store tests over the script and command variants would pin the other branches.
|
|
/ai-review override first-principles ebb68c6 product-shape: Maintainer decision. With no people_policy.json a Shared Crew guest gets the owner's in-Crew abilities, but writes that act with the owner's credentials or reach the host or installation (channel tokens, deploys, session storage, update, settings, installed apps) stay owner-only. This is the guest scope in shared-crew.md; roles stay as decided 2026-11-01. |
|
AI-review override not recorded: |
|
Thanks for the update. All three items from my last review are fixed on this head, and the review found no code bug that blocks. Earlier items:
PR Readiness is still red on this head. The First Principles lane says that with no Optional:
|
|
Thanks for the review. On the optional items:
|
|
/ai-review override first-principles 36b4029 product-shape: Maintainer decision. With no people_policy.json a Shared Crew guest gets the owner's in-Crew abilities, but writes that act with the owner's credentials or reach the host or installation (channel tokens, deploys, session storage, update, settings, installed apps) stay owner-only. This is the guest scope in shared-crew.md; roles stay as decided 2026-11-01. |
|
AI-review override not recorded: |
|
/ai-review override first-principles b1cd501 product-shape: Maintainer decision. With no people_policy.json a Shared Crew guest gets the owner's in-Crew abilities, but writes that act with the owner's credentials or reach the host or installation (channel tokens, deploys, session storage, update, settings, installed apps) stay owner-only. This is the guest scope in shared-crew.md; roles stay as decided 2026-11-01. |
|
|
AI-review override not recorded: |
buluoray
left a comment
There was a problem hiding this comment.
Thanks for the guest_origin mark: Execute, Retry, start, restart and to-chat now refuse guest text, and GPT passes. One reader is still unmarked, and we reproduced it on this head:
- GET plan-context (src/kiro_crew/dashboard/handlers/taskrunner.py:901-911) returns the plan text without checking guest_origin.
- The plan "Chat" button (website/src/pages/ProjectsPage.tsx:757-762) then auto-sends that text as an owner turn, with no prompt.
- Dict keys still pass the guest write check (src/kiro_crew/shared_crew/guest_scope.py:756-772). So a host image path hidden in a key reaches that owner turn, and ACP reads it as an image.
- docs/system-specs/modules/shared-crew.md:1599 says guest text cannot point at host images, which is not true yet.
Either fix works: (a) carry guest_origin through plan-context too, or (b) make _strings_in scan string dict keys and correct its docstring. (b) also closes other str(body.get(...)) readers, such as the knowledge agent-document route. Please add a route-level test either way. This crosses the guest/owner boundary, so it needs a fix rather than an override.
|
/ai-review override first-principles 82aee95 product-shape: Maintainer decision. With no people_policy.json a Shared Crew guest gets the owner's in-Crew abilities, but writes that act with the owner's credentials or reach the host or installation (channel tokens, deploys, session storage, update, settings, installed apps) stay owner-only. This is the guest scope in shared-crew.md; roles stay as decided 2026-11-01. |
|
AI-review override not recorded: |
|
|
/ai-review override first-principles 327bba3 product-shape: Maintainer decision. With no people_policy.json a Shared Crew guest gets the owner's in-Crew abilities, but writes that act with the owner's credentials or reach the host or installation (channel tokens, deploys, session storage, update, settings, installed apps) stay owner-only. This is the guest scope in shared-crew.md; roles stay as decided 2026-11-01. |
|
AI-review override not recorded: |
…ttachment previews A Shared Crew guest was refused on ordinary crew work (mates, the agent picker, slot creation, approvals, artifacts, skills) because those routes checked for the host owner, and an attached picture failed to load for a guest because the chip fetched the owner-only /api/file-raw. Guests now pass the owner gate on every route outside one pinned owner-only list in shared_crew/guest_scope.py: the share and network, config.json and security policy, credentials and channels, the gateway process and host-run code, the host filesystem, billing and publishing. Credential-backed, disclosure and remote-crew sites ask the strict is_host_owner_dashboard_request. A central checkpoint refuses a guest write to a listed route, a guest write naming a host path, and guest text naming a local image outside the attachment stores. A guest reads a picture only when the Crew produced it: a session copy or an image artifact is marked Crew-origin when its bytes were read through a descriptor pinned inside the scratch tree or the upload directory, and a host picture an assistant reply names stays the owner's. Unattended approval, schedules a guest creates, revoke, the owner and collaborator socket sets and the dashboard's guest view (Owner-only state, locked schedule controls) follow the same split.
|
|
|
Closing by owner decision. The current trust model for a shared Crew is that every admitted person has the same rights as the owner. That is recorded in Per-person limits belong to the roles work: they apply only once the operator turns roles on. The branch is kept, so parts of this change can be reused there. |
Problem / Motivation
Goal: A Shared Crew guest can do everything the owner can inside the Crew, and the pictures a guest or a teammate attaches show up for them.
A guest is refused on ordinary crew work (mates, the agent picker, slot creation, approvals, artifacts, skills) because those routes check for the host owner. An attached image shows "Image failed to load" for a guest because the chip fetches the owner-only
GET /api/file-raw.Why it matters
Shared Crew exists so several people work in one Crew. A guest who cannot start a chat with a mate, approve a tool call or see an attachment is a spectator.
Not a goal
What changed (motivation → approach → change)
Guests get the owner's abilities inside the Crew by default. What manages the share or the host's ceiling stays the owner's, as one pinned list, and a guest only ever sees a picture the Crew itself produced.
is_owner_dashboard_request(dashboard/handlers/source_providers.py) is true for a guest's own session on any route outside the list. The strictis_host_owner_dashboard_requestguards every credential-backed, disclosure and remote-crew site (handlers_instances*.py,handlers_cloud.py,remote_chat_guard.py,remote_dispatch_*), the apps proxy (apps/routes_proxy.py) and turn provenance (chat_send.py,chat_regenerate.py,chat_rewind.py,prompt_queue.py,responsive_chat.py), so a guest's turn is never owner-sent.shared_crew/guest_scope.py: share and network,config.jsonand security policy, credentials and channels, gateway process and host-run code (including/api/app-toolsand saving a workflow's definition from a run), host filesystem, billing and publish, and the installation-wide writes guests only read. The route checkpoint (slot_ownership.py) refuses a listed write, a write naming a host path (HOST_PATH_FIELDS), and guest text naming a local image outside the attachment stores; a guest path whose raw form carries an encoded separator (%2F,%5C) is owner-only, because the router matches the encoded path.GET /api/file-raw(file_api/editor.py) serves a guest only a regular file directly in the upload directory or a session's.attachmentsstore, opened once with no follow.chat_attachments.pynames a copy<sha16>_<name>only when its bytes were read through a descriptor pinned to a file directly in the upload directory, or the gateway downloaded them (read_with_origin); any other copy keeps<sha16>-<name>and stays the owner's, so a host picture an assistant reply names is never a guest's. Image artifacts carry the same answer ascrew_origin(image_artifacts.py,artifact_store/model.py,artifact_store/records.py,artifacts.py,artifacts_writes.py), andGET /api/artifacts/{slug}/asset404s a guest for any other image. The guest prompt builder reads images the same way (acp/prompt_blocks.py,guest_prompt_origin.py).approval_mode=autoor anautospawn (slot_approval.py,messaging_api/spawn.py,taskrunner.py), and cannot start or save a workflow. A plan a guest's request built carriesProject.guest_origin(src/kiro_crew/task_models.py, persisted bysrc/kiro_crew/taskrunner_parts/run_registry.py), so every run of it (src/kiro_crew/taskrunner.py,src/kiro_crew/taskrunner_parts/run_lifecycle.py) and its to-chat turn read images as the guest's, whoever starts them.src/kiro_crew/cron.py,cron_service/service/job_writes.py,cron_service/service/run_registry.py,cron_jobs.py,cron_runs.py,cron_shared.py,cron_board.py). A scheduled run never inherits a guest's prompt mark (cron_service/service/run_execution.py). A guest's schedule is stamped and paused on revoke, including one a request in flight at the revoke creates (routes_invites.py,routes_ssm.py), and its Slack result goes to the owner (gateway_runtime/cron_delivery.py,gateway_runtime/cron_failure.py).ws.py,websocket_hub.py,ws_event_scope.py); crew frames (ws_side_frames.py,card_lifecycle.py,chat_pins.py) reach owner and guest sockets. The gateway log stream is the host owner's on both paths, thesubscribe_logsframe andGET /api/logs(updates_streams.py), and a guest's session export never carries the owner-only layer (session_export.py).GET /api/auth/mereportsis_guest(api/client/sharedCrew.ts,hooks/sharedCrew/). Once the server says the tab is a guest's, its rail hides Apps, Customize, Webhooks, Settings and the terminal (shell/nav/,App.tsx,lib/ownerOnly.ts); a pending or failed identity read never hides the owner's entries, an owner-only page or 403 shows one "Owner only" state (OwnerOnlyGate.tsx,OwnerOnlyState.tsx,ErrorBoundary.tsx,i18n/locales/en.manual.jsonand the other locales), and the Schedule board locks an owner-only job's Run, Delete, checkbox, row menu and detail dialog (SchedulePage.tsx,CronRowActions.tsx,JobCreator.tsx,types/index.jobs.ts).Judgement calls: the terminal, MCP config, hooks, installed apps,
/api/browser, monitors and autonudge, starting or saving a workflow, the host file routes, memory administration andDELETE /api/sessionsstay owner-only, because they run code or reach the host outside an agent's approvals. Agent specs, skills (installing and approving one included), steering, prompts, semantic memory, preferences, lessons and mate rules are open, matching "no limits inside the crew". The tradeoff: what a guest writes there reaches the owner's later sessions, auto-approved schedules included, and stays after a revoke, so revoking a guest does not undo it. The routes opened to guests are enumerated intest/data/shared_crew_guest_open_routes.txt; the owner-only list is documented indocs/system-specs/modules/shared-crew.md("Guest scope"), withhistory.mdandartifacts.mddescribing the two copy names andcrew_origin.What a guest cannot see: a picture the agent wrote (scratch, project folders, browser and computer-use screenshots) and every copy made before this change carry the
-name, so a guest gets no preview of them and nothing leaks. Owner-only reads other than the log stream stay with their own handlers, as on main. A schedule the agent creates withcron_addat a guest's request carries no stamp, so a revoke does not pause it.Backwards compatibility
Breaking: for a Shared Crew guest only, the writes main left open that act with the owner's credentials or reach the host or the installation now answer 403
owner_only(measured by driving every listed write through main's middleware as a guest; the full set is inshared-crew.md, "Central refusal"): channel messaging, uploads, pins and reactions, linking a session to Slack, deploys, session-storage cleanup, the native file picker and screenshot, the ffmpeg download, update arm/cancel and log level, the voice, STT, notification-channel and project settings, theme pack installs, the usage refresh, the mobile sign-in link, the portability preview and installed apps' own routes; theme create, edit and delete stay open, as on main; a guest is no longer served the gateway log stream, a session picture copied from anywhere but the upload directory, or an image artifact whose bytes did not come from it (main served every image artifact to a guest). The owner is unchanged. Writer sweep on origin/main @ 15e5c91: their dashboard callers are below; an app, cron, subagent, CLI or MCP call carries an app or internal claim, is not a guest session, and is not judged (test_everyone_who_is_not_a_guest_reaches_the_handler).Reader: website/src/pages/chat/useChatPageResourcesController.tsx:takeScreenshot -- crew page -- a guest's Screenshot click shows the existing "Screenshot failed" notice with the refusal; test_publishing_installs_native_pickers_and_billing_are_closed_to_a_guest
Reader: website/src/api/client/files.ts:pickFiles -- crew page -- no UI caller; the composer's browser upload
POST /api/upload/filestays open; test_the_composer_upload_stays_open_to_a_guestReader: website/src/components/LinkedSurfacesSection.tsx:connectSlack -- crew page -- a guest's Slack link is refused 403 owner_only; test_a_guest_reads_and_does_not_write_installation_wide_settings
Reader: website/src/pages/useChatPageSlotSwitches.ts:api.slackLink -- crew page -- the auto-link is best-effort and leaves the session unlinked on a refusal; test_a_guest_reads_and_does_not_write_installation_wide_settings
Reader: src/kiro_crew/shared_crew/guest_scope.py:attachment_read -- crew page -- a host-origin or pre-change
-copy is refused to a guest and still read by the owner; test_shared_crew_guest_copied_images.pyReader: src/kiro_crew/dashboard/handlers/artifacts_parts/library_reads.py:api_artifact_asset -- crew page -- a guest gets 404 for an image artifact without
crew_origin(a mate's scratch screenshot included), the owner 200; test_shared_crew_guest_copied_images.pyReader: website/src/hooks/websocket/connection.ts:subscribeLogs -- crew page -- the owner's Logs page still gets the replay and the live tail; a guest's socket gets neither; test_a_guest_socket_is_refused_the_gateway_log_stream
Reader: src/kiro_crew/dashboard/handlers/updates_streams.py:api_logs -- crew page -- no in-tree caller; the owner still streams it, a guest gets 403; test_a_guest_is_refused_the_gateway_log_stream_over_http
Reader: website/src/pages/settings/TailscaleInvites.tsx:RevokeControl -- crew page -- a revoke answered 503
schedules_not_paused(the share is already withdrawn) refreshes the invite and People lists and raisesRevokeUnpausedNoticeabove the People list (PeoplePanel.tsx), which says to pause the schedules left on, links the Schedule page and stays until dismissed; TailscaleInvites.test.tsx 'raises the schedules-left-on notice above the list'Reader: website/src/components/notifications/NotificationFeed.tsx:muteChannel -- crew page -- a guest is not asked to keep or mute a channel (the owner's installation-wide setting): the note shows with no prompt; NotificationFeed.phase3.test.tsx 'asks a Shared Crew guest nothing'
Reader: website/src/components/KiroAccountModal.tsx:refreshButton -- crew page -- a guest gets no Refresh (it asks with the owner's account); KiroAccountModal.test.tsx 'offers a Shared Crew guest no Refresh'
Reader: website/src/pages/settings/DisplayPanel.tsx:installTheme -- crew page -- with VoicePanel, SttSettings, NotificationsPanel, MobileLoginCard, AboutPanelUpdateFlow and SessionStorageScreen, reached only under Settings, which shows a guest Owner only (OwnerOnlyGate.test.tsx); the owner is unchanged
Reader: website/src/pages/LogsPage.tsx:logLevel -- crew page -- the Logs page's stream is refused to a guest as well (test_a_guest_is_refused_the_gateway_log_stream_over_http); the owner is unchanged
Reader: website/src/App.tsx:cancelUpdate -- crew page -- a guest's cancel is refused 403 owner_only; arming and applying an update were already the owner's
Tests
test_shared_crew_guest_parity.pypins the owner-only list, checks each entry still names a registered route, compares the live dashboard's guest-open routes withtest/data/shared_crew_guest_open_routes.txt, and drives the predicate and the shared owner gate as a guest: schedules (create and revoke), skill trust, deploy and publish, the gateway log stream on both paths, and the attachment read's link, hard-link and UNC cases.test_shared_crew_guest_unattended.pycovers every verb on an unattended schedule (including the owner switching it to auto mid-request), the late write after a revoke, task runs naming a spec file or workspace, task-plan rewrites, and encoded-separator paths.test_shared_crew_guest_copied_images.py: an assistant row naming a host image, persisted through both transcript writers (with a variant and a second flush as a fixed point), is rewritten to<sha16>-<name>and refused to a guest while the owner reads it; an upload gets_and the guest reads it, a scratch image gets-; a link inside or onto the upload directory gives the owner a-copy; origin survives a copy between sessions; a guest's text or schedule prompt naming a-copy is refused 403; image artifacts followcrew_origin, legacy records read as false. With the copier and reader changes reverted, both writer cases fail.test_shared_crew_guest_host_paths.pywalks every guest-open write handler for path-like fields;test_shared_crew_guest_prompt_images.pycovers the guest prompt image reader.SchedulePage.guestOwnerOnly.test.tsx(row and detail-dialog locks including Resume, the owner case),OwnerOnlyGate.test.tsx,appRail.guest.test.tsx(a pending or failed identity read shows the owner's entries),CronRowActions.guest.test.tsx(Move to folder disabled on desktop and touch),JobCreator.test.tsx.-n 4twice,-n0, and-n0in reversed order); the schedule vitest file ran three times with--sequence.shuffle, and its dialog test fails with the fix reverted.Manual verification
Rendered the real Schedule page inside the real
OwnerOnlyGatewith a stubbed guest identity (GET /api/auth/meansweringis_guest: true, every/api/**call stubbed at the network layer): the locked board, row menu and detail dialog, and the identity-error notice, in both themes. Not exercised against a live tailnet guest.Screenshots / video
Two surfaces change. For the owner, a revoke that withdrew a share but could not pause every schedule of that person now says so above the People list, after the person's row is gone, until dismissed:
The rest is for a Shared Crew guest. A first note from a new app channel: the owner is asked to keep or mute it; a guest, who cannot change that setting, sees the note with no prompt.
The Kiro Account panel: the owner has Refresh; a guest, whose refresh would ask with the owner's account, has none.
The "Owner only" state on
/settings, with no Customize or Settings in the rail:The owner's Schedule board names the guest who created a job, never the
guest:stamp:A guest's board: the auto-approved and script jobs show "Owner only" with Run, Delete and the checkbox disabled; the attended job is untouched.
A locked job's row menu: Run Now, Pause, View last result, Run at exact time and Move to folder are all disabled (a guest who paused it could not resume it).
A locked job's detail dialog: an "Owner only" line, every field read-only and faded, and Pause, Run Now, Delete and Save disabled.
The same job paused: Resume is disabled too.
When
GET /api/auth/mefails, the page says so in words with a Try again, and the board falls back to the owner's view (the server still refuses an owner-only action):Related Issues
Closes #29547
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.