Repository navigation
feat(relay): list Team Crews with no settings and host a team Crew from its key alone - #38801
cruisercohen wants to merge 2 commits into
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: existing hosts stay off through the one-time off marker, the tunnel lock still caps hosting, and the reshaped Team Crews surface comes with three rendered images. Notes
[DESIGN-REVIEWED] 47e3648 Description read[DESCRIPTION-READ] 43e174a8c54e8316f41cbea0505dfe822a9cc73e82cbbe1e309d4e778019628d 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 |
First Principles Review (Opus 5.5) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK product-shape change without accepted RFC: the Team Crews list is now always on for everyone, and setting a lease credential now starts hosting. No RFC on the base commit records either default. Notes
What this change shipsInventory (8 items) — 4 justifiedIntent: a desktop user sees their Team Crews without any config, and a team Crew host goes live from its key alone. ADDITION.
Blockersproduct-shape change without accepted RFC: Team Crews on by default (item 1) product-shape change without accepted RFC: hosting starts from the credential (item 6) [FIRST-PRINCIPLES-REVIEWED] 47e3648 Description read[DESCRIPTION-READ] 93056589f92a749f3a1f003c7df972ba7f42a5c4bc33b03a343ec7b53af542f8 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS No new controls. Both states this PR changes are in the screenshots: the Team Crews group showing (shot-01) and hidden (shot-02). Notes
[UX-REVIEWED] 47e3648 Description read[DESCRIPTION-READ] 2e7685159a52947aba58a75aef36e9fbd98d1bb9b01d742bf9572656898e2883 That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. Notes:
[OPUS-REVIEWED] 47e3648 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/config/loader_pipeline.py:1440 -- Cache-hit reloads can lose Remote Control’s keep-off decision (origin: validation)
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 (fenced; I'm upholding it). I checked the conditions in the code:
So a watcher load in that gap can leave a remote-access tunnel running against the operator's off choice, with no retry on unchanged bytes. The race window is narrow, but the inputs are ordinary (a hand edit plus a concurrent API request), so a FLAG isn't justified. False positive or not applicable? A repository writer can comment: |
3ce3e28 to
cc8ba49
Compare
|
span=5749030c4a14
|
|
span=5749030c4a14
|
|
span=236aa930dc94
|
|
Owner decision on the product shape. Remote Control stays off by default, and signing in never turns it on by itself. A host that was not hosting before this release does not start hosting because of it. The owner turns it on with kirocrew remote-control on. Team Crews no longer needs a separate viewer setting, and a person who is signed out sees nothing there. I accept this change in shape without a separate RFC. It removes a setting and keeps the default safe, and the PR body lists what is left for later. |
|
/ai-review override first-principles cc8ba49 owner-decision: owner decision recorded at #38801 (comment) |
Human judgment recorded@cruisercohen recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
Human judgment recorded, but the following reviewer lane(s) could not be re-run automatically: First Principles Review. Re-run the lane's latest workflow run for |
cc8ba49 to
b5c8281
Compare
|
span=0823735da92d
|
|
span=f19d52db6b9b
|
|
/ai-review override first-principles b5c8281 owner-decision: owner decision recorded at #38801 (comment) |
Human judgment recorded@cruisercohen recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
b5c8281 to
4ce8d89
Compare
4ce8d89 to
fbfc1ce
Compare
|
/ai-review override first-principles fbfc1ce owner-decision: owner decision recorded at #38801 (comment) |
Human judgment recorded@cruisercohen recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
Human judgment recorded, but the following reviewer lane(s) could not be re-run automatically: First Principles Review. Re-run the lane's latest workflow run for |
fbfc1ce to
098393a
Compare
|
/ai-review override first-principles 098393a owner-decision: owner decision recorded at #38801 (comment) |
Human judgment recorded@cruisercohen recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
098393a to
0dbbb87
Compare
|
span=7def4fb5bf12
|
|
/ai-review override first-principles 0dbbb87 owner-decision: owner decision recorded at #38801 (comment) |
Human judgment recorded@cruisercohen recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
Human judgment recorded, but the following reviewer lane(s) could not be re-run automatically: First Principles Review. Re-run the lane's latest workflow run for |
0dbbb87 to
d1b8532
Compare
|
span=0b88fd613097
|
|
span=6c337e978474
|
|
span=0823735da92d
|
|
/ai-review override first-principles d1b8532 owner-decision: owner decision recorded at #38801 (comment) |
Human judgment recorded@cruisercohen recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
…ings The desktop app's Team Crews list needed tunnel.relay_viewer_enabled turned on, and a set tunnel.relay_viewer_relay_domain could filter the list and pin where a Crew opened. Now the viewer is on in every desktop app with nothing to set. - The viewer routes always answer. tunnel.relay_viewer_enabled is kept as a deprecated, ignored setting so an existing config still loads. - A set relay domain is ignored, with one warning in the gateway log; each Crew opens at the exact address the control plane lists. - A person with no relay access sees no Team Crews: a list read refused as signed out, remote access off, access denied, or any load failure with the generic text hides the group and the Shared Crews cards. A generic load failure after a list has loaded keeps the last good list until the next good read. Refusals about a listed Crew, a throttle or this install's setup still show, and the gateway log keeps every code. - After a refusal the list is read less often: every 15 minutes after remote access off or access denied, not at all while signed out (a sign-in reads it again), and never sooner than a throttle asks. - The remote Crew guide and the configuration reference say so.
A team Crew host on a crew API key had to set the credential reference, tunnel.relay_lease_token_type = API_KEY, and turn Remote Control on. - Token type: an empty token type with a credential stored as secret://NAME or an absolute file path now sends API_KEY. A new explicit value, NONE, sends no TokenType header, for a host that keeps an IAM Identity Center bearer in a secret or a file. An explicit API_KEY or EXTERNAL_IDP is sent as before, and a reference that is neither a secret nor a file is never taken for a crew API key. - Starting: a set lease credential (not empty and not kiro-sign-in) starts hosting at the next start, with no remote-control on step. Turning Remote Control off writes the new tunnel.relay_turned_off marker, which outranks the credential and which the Settings page cannot clear; turning it on clears it. A Kiro sign-in alone never starts hosting, and Remote Control stays off by default. - Upgrade: every config.json stores relay_enabled false, so on the first load by this build a stored key with relay_enabled false and no marker gets tunnel.relay_turned_off once, through the config write lock, and the adoption ledger records the check. A host that was not hosting before this release does not start hosting because of it. - The pod seed floor writes the same marker, so a seeded pod never hosts on the operator's credential. - The setting help, the 401 hint, the off notice and the remote Crew guide say so.
d1b8532 to
47e3648
Compare
|
Rebased: main moved in config-baseline.json, docs/feature-map/README.md, docs/system-specs/modules/cli.md, docs/system-specs/modules/config.md, src/kiro_crew/config/integration_sections.py, src/kiro_crew/config/section_builders.py and src/kiro_crew/remote_control/cli.py since this head went green (5ca1430 -> 37911da); CI re-running. |
Problem / Motivation
Goal: A desktop app user sees the Team Crews they can open with nothing to set, and a team Crew host goes live from its crew API key alone.
Today a desktop app user sees no Team Crews until someone runs
kirocrew config set tunnel.relay_viewer_enabled true. A hand-settunnel.relay_viewer_relay_domaincan also filter the list and pin where a Crew opens. A team Crew host needs three steps: the credential reference,tunnel.relay_lease_token_typeset toAPI_KEY, andkirocrew remote-control on.Why it matters
People added to a team Crew expect to open it from the desktop app after signing in, and a hidden config key means most never see the list. Flipping a default would not reach them:
config.jsonstores every key, so a changed default reaches only new installs. Each extra host setting is one more way for a team host setup to go wrong.Not a goal
What changed (motivation → approach → change)
Client. The gate is a stored setting, so it is removed, not flipped.
dashboard/handlers/relay_viewer.py: the crews, seen and token routes always answer, with their checks unchanged. A set relay domain is ignored, with one warning in the gateway log; each Crew opens at the address the control plane lists.tunnel.relay_viewer_enabledstays inconfig/integration_sections.pyas a deprecated, ignored field so an existing config still loads;config-baseline.jsonand the comments inwebsite/src/api/client.tsfollow.useRelayViewerCrews.ts: signed out, remote access off, access denied, or a generic load failure hides the Team Crews group and the Shared Crews cards; the gateway log keeps the code (relay viewer: crews -> <code>). Refusals about a listed Crew, a throttle or setup still show; a loaded list stays through a failure.Because a signed-out user sees nothing in Team Crews, the list-level sign-in item and links #38437 and #38304 added under that notice never show; sign-in stays in Settings, and a listed Crew's Open refusal still links to the Kiro account tab.
Host.
relay_client/provider.py,lease.py: withtunnel.relay_lease_token_typeempty, a credential stored assecret://NAMEor an absolute file path sendsAPI_KEY. The new valueNONEsends no type.remote_control/defaults.py,setting.py,guard.py,cli.py: a set lease credential (not empty and notkiro-sign-in) starts hosting at the next start. Turning Remote Control off writes the newtunnel.relay_turned_off(config/section_builders.py).Exposure: Only hosts with a team key or a workload credential in
tunnel.relay_lease_credentialstart hosting, on every build except LTS, which ignores the tunnel settings. An organization with remote access off refuses the host, which retries every 15 minutes at most; a Builder ID or social sign-in is refused locally. Personal hosting on your own sign-in stays opt-in withkirocrew remote-control on. Turning Remote Control off writestunnel.relay_turned_off, which outranks the key; a malformed marker, an off overlay over an unreadableconfig.json, or an unreadableconfig.local.jsonover a key-only host also keeps it off. Settings cannot clear that marker, and the dashboard still cannot turn Remote Control on.Release note: "A host that was not hosting before this release does not start hosting because of it; turn it on with remote-control on. A fresh install whose config.json already holds a key before this release first loads it needs remote-control on too."
Upgrade: on the first load by this build,
config/migration.pywrites onlytunnel.relay_turned_off: truetoconfig.json, once, under the config write lock, when the merged config stores a key with no marker andrelay_enablednot true; the check leaves one adoption ledger record on every host, which shows nowhere unless the marker was written; a later load never overwrites a recorded marker. Ifconfig.local.jsonturned hosting off over a stored true, removing that line turns hosting back on: a stored true outranks the marker. A seeded pod's floor writes it too (pod/runtime.py).Docs:
remote-crew.mdgives the team host setup: a key in Settings > Secrets, one config set line, restart.Backwards compatibility
Reader: src/kiro_crew/dashboard/handlers/relay_viewer.py:_settings -- crew page -- stops reading the viewer flag and the domain; test_every_route_answers_with_the_old_setting_false
Reader: src/kiro_crew/auth/service.py:_load_relay_viewer_cps_url -- crew page -- stops reading the viewer flag; test_poll_idc_asks_the_relay_viewer_control_plane_first
Reader: src/kiro_crew/dashboard/handlers/config_all_settings.py:READONLY_PATHS -- crew page -- drops the deprecated flag, adds the off marker; test_config_all_settings.py
Reader: website/src/components/TeamCrewsGroup.tsx:TeamCrewsSwitcher -- chat -- hides on a quiet refusal; TeamCrewsGroup.test.tsx "shows no sign-in item and no notice for a hidden 409 SIGNED_OUT list refusal"
Reader: website/src/components/SharedCrewsCards.tsx:SharedCrewsCards -- crew page -- hides with the hook; SharedCrewsCards.test.tsx "renders nothing on a 409 SIGNED_OUT list refusal"
Reader: src/kiro_crew/config/superseded_defaults.py:adopted_superseded -- doctor -- leaves out a Remote Control check that changed nothing; test_doctor_says_nothing_about_adoption_when_none_happened
Reader: src/kiro_crew/edition_locks.py:relay_selected -- release -- follows the credential rule; test_remote_control_credential_hosting.py
Tests
The 15 new and changed Python test files pass 663 of 663, three runs in a row, and the 23 ratchet test files pass 330 of 330. Determinism: the round's new and changed host tests passed 20 runs at
-n0(87 each), 10 at-n 4beside two sibling files (191 each) and one shuffled run (seed 4781, 87 passed). The backend scoped run's only failures also fail on main without this change, in files this PR does not touch.test_relay_client_lease_token_type.py(empty type sendsAPI_KEYfor a secret or a file,NONEsends none, a workload reference is never a crew key) andtest_remote_control_credential_hosting.py(a set credential starts hosting, a sign-in alone never does, off is kept across reload and Settings, the browser cannot clear the marker).test_remote_control_legacy_off.py(a host not hosting before stays off, a key held only inconfig.local.jsontoo,remote-control onclears it, a key set later hosts, a downgrade and re-upgrade never re-run it, a failed marker write or a degraded load stays off without crashing, an unreadable ledger keeps it off and is left as is, two loads at once write once, an overlay off over a stored true lands the marker and the record, a writer turning hosting on during the write wins, an unreadable overlay keeps a key-only host off with nothing written, a stale record never overwrites a written marker's, a briefly unreadable overlay does not keep a working host off, an overlay with no config.json keeps a host that looks off off, the notice) andtest_pod_seed_relay_off.py.Proof: PROVEN test/test_kas_login_service.py::test_poll_idc_asks_the_relay_viewer_control_plane_first[old-setting-off], test/test_pod_env.py::TestSeedSanitization::test_overwrites_non_dict_tunnel, test/test_relay_client_lease.py::test_the_token_type_setting_names_the_lease_calls_header[-API_KEY], test/test_relay_client_lease.py::test_a_refused_credential_stop_names_the_token_type_for_each_kind_of_credential, test/test_relay_client_lease_profile.py::test_the_default_config_sends_todays_bytes (head 57e17332fc6b)
Manual verification
A desktop app check was not run. The screenshots below are from our own static build of the dashboard on 127.0.0.1 in headless Chromium, with the desktop bridge stubbed and mock data only. A real lease call needs a crew API key and is left to the release check.
Screenshots / video
Crew switcher, signed in with a mock Team Crew: the Team Crews group lists it.
Crew switcher, signed out: no Team Crews group and no notice.
After a loaded list, a re-read that answers a server error: the list stays
Related Issues
N/A
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.