Repository navigation
feat(session-control): hide session_create backend behind a Feature Preview - #33659
Conversation
854b00f to
c8bcf42
Compare
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a reversible preview gate, off by default, at the creation boundary only. Stored picks and [DESIGN-REVIEWED] 402d9d8 Description read[DESCRIPTION-READ] 4a4caccc6d27c9958e28aeabaabc3a646c1b4e69df4915b94b1051a50bbfec7f 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS No item blocks. Off by default, the preview takes Notes
What this change shipsInventory (7 items) — 5 justifiedIntent: stop conductors from picking a harness per worker until per-Bot harness selection is built. This is an ADDITION (a gate).
[FIRST-PRINCIPLES-REVIEWED] 402d9d8 Description read[DESCRIPTION-READ] 06fbdec023d10960736a960128b6f709ec26745bd13ddf6d8fedc9a49124627d That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The one new switch appears off and on in the two screenshots, and the blind reader read it correctly ("the side chats would run on another AI"). Notes
[UX-REVIEWED] 402d9d8 Description read[DESCRIPTION-READ] f374a098c6cd0bf7da017dce382e56b5d61b43dc14c7ca159b04bec45a4630b4 That sha256 names everything this verdict read: the PR description, plus the 5 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 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 — ✅ 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: |
c8bcf42 to
fe4e2d8
Compare
|
fe4e2d8 to
8c17ebf
Compare
8c17ebf to
7895aae
Compare
7895aae to
012f413
Compare
012f413 to
ef4344d
Compare
…review Adds the session_harness Feature Preview (default off). Off, session_create and work_dispatch do not advertise backend, and an explicit backend is refused with session_harness_preview_off before anything is created. spawn_run(backend=...) and a Bot's own harness pin are unaffected.
ef4344d to
402d9d8
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approved at 402d9d8.
This puts backend on session_create and work_dispatch behind a new session_harness feature preview, default off. It's a product hold on a harness pick that isn't settled yet, not a security boundary, so I read it as a feature gate rather than added strictness.
session_harness_preview.pyreadsdashboard.feature_previews.session_harnessper call, and only a realTruecounts as on. A config that can't be read counts as off.- With the preview off,
_list_toolsdropsbackendfrom the two gated schemas only.spawn_run's ownbackendstays, and a test covers that. _run_session_createand_run_work_dispatchrefuse abackendbefore any write.work_dispatchrefuses before step 1, so no orphan item is created. The HTTP route refuses a non-emptybackendwith 403session_harness_preview_offbefore the crew check, and reads config off the event loop.- Sessions that already carry a pick keep it, and a Bot's own harness pin is untouched. The spec and both user docs say so.
- The Settings toggle, the 12 locale strings, and the generated registry and UI index are all updated, and the switch-count tests moved from 11 to 12.
- The existing schema tests now hold the preview on, so they still compare only what they meant to.
Tests cover schema on and off, the route refusing with nothing created, an empty backend still working, both tools refusing without a gateway call, the default-off read, and an unreadable config. There is no regex.
CI: all 97 checks are green. You already hold auto-merge, so I'm approving without setting it.
Problem / Motivation
Goal: Hide the per-session harness choice (
session_create(backend=...),work_dispatch(backend=...)) behind a new Feature Preview, off by default.#33145 and #33220 let a conductor start a worker on a harness it names. Maintainers want this held back for now: per-Bot harness selection, covering conductor and worker together, is being built, and how the choice is offered in settings is not settled.
Why it matters
Agents read the
session_createtool schema and use what it offers. Whilebackendis advertised, conductors start picking harnesses per worker, and that habit and its stored picks become a contract the per-Bot design then has to keep.Not a goal
spawn_run(backend=...). It predates feat(session-control): start a session on a chosen harness with session_create(backend=...) #33145 and keeps working as before.agents.<crew>.acp_backend).What changed (motivation → approach → change)
session_harnessbackendinsession_create/work_dispatchschemabackendPOST /api/session-control/createwithbackendsession_harness_preview_offspawn_run(backend=...), Bot harness pinThe switch follows the existing gateway-read previews (
dashboard_stale_fields,crew_oauth): a name inFEATURE_PREVIEW_FLAGSandpreviewFlags.ts, read per call fromdashboard.feature_previews, with a card in Settings > Developer > Feature previews named "Agent Harness for worker chats". Its copy uses the product's existing words: "main chat" for the conductor and "Agent Harness" for the harness, matching the Settings > Agent Harness page. The newsession_harness_preview.pyholds the reader, the refusal text and the schema filter.mcp_dashboard._list_toolsdropsbackendthe same way it already addscrewonly while remote dispatch is on.Off, the refusal comes first: the MCP tools refuse before any gateway call (
work_dispatchbefore it creates the item), and the HTTP route refuses before the crew and backend checks, so nothing is created. An emptybackendis no pick and is not refused.The boundary is exactly what #33145 and #33220 added at creation: the
backendargument onsession_create,work_dispatchand the create route. What #33145 added downstream (a slot carrying a pick, spawns inheriting it, restore) is left alone, so a session made while the preview was on keeps working after it is turned off.The card lives in
pages/settings/FeaturePreviewsSection.tsx, and the name joinsconfig/sections_dashboard.py. Its copy is in all twelvewebsite/src/i18ncatalogs (locales/en.manual.jsonand the rest), as the catalog parity and new-string gates require. Generated files are regenerated:config-baseline.json,settingsRegistry.gen.tsundercomponents/commandPalette, the settings registry and the UI index. Docs:docs/system-specs/modules/session-control.md, the tool table insession-control.mdandconfiguration.mdname the preview.Backwards compatibility
Breaking: with the preview off (the default),
session_createandwork_dispatchno longer takebackend, and the create route refuses it. Writer sweep on origin/main @ 63d560b: the only writers are the two MCP tools (mcp_dashboard_session_runs._create_session,_run_work_dispatch); no dashboard page, app or built-in skill postsbackendto/api/session-control/create.Reader: src/kiro_crew/dashboard/handlers/session_control.py:api_session_control_create -- chat|subagent -- refuses
backendwhile off;test_off_the_route_refuses_a_backend_and_creates_nothingReader: src/kiro_crew/mcp_dashboard_session_runs.py:_run_session_create -- chat|subagent -- refuses before any call;
test_off_session_create_refuses_a_backend_without_calling_the_gatewayReader: src/kiro_crew/mcp_dashboard_session_runs.py:_run_work_dispatch -- chat|subagent -- refuses before creating the item;
test_off_work_dispatch_refuses_before_it_creates_the_itemReader: src/kiro_crew/mcp_dashboard.py:_list_tools -- chat|subagent|cron -- drops
backendfrom two schemas only;test_off_the_schema_does_not_offer_backendReader: src/kiro_crew/dashboard/messaging_api/spawn.py:api_spawn -- chat|subagent -- not gated, still takes
backendand inherits a slot's pick;test_spawn_backend.pyTests
test/test_session_harness_preview.py(new): off, the schema has nobackend, the route refuses with 403session_harness_preview_offand creates no slot, both MCP tools refuse without a POST; an emptybackendstill creates; on, the schema offers it and the route takes it; the flag reads off unless exactlytrue, and off on an unreadable config.spawn_run's schema is left alone._list_tools, MCP runs), 5 of its 16 tests fail.test/test_session_create_backend.py: an autouse fixture turns the preview on, so it keeps pinning the on behaviour unchanged.website/src/test/previewSurfaces.test.tsx: Feature previews card and switch counts 11 -> 12.test_feature_previews_config.pyandtest_spawn_backend.py(143 passed); vitestpreviewSurfaces,previewFlagServerSync,catalogParity,settingsSearchGovernance(174 passed);npm run i18n:check,tsc, eslint, flake8, isort, black, mypy clean.Proof: not provable -- other: feat PR; the gate-revert run above is the equivalent check
Manual verification
Built the SPA and opened Settings > Developer > Feature previews against stubbed APIs: the new card renders off by default, and its switch turns on when clicked.
Screenshots / video
The new "Agent Harness for worker chats" card, off (default):
Switched on
Related Issues
Closes #33658
Checklist
Contribution License Agreement