Repository navigation
feat(acp): let deepseek dashboard chats share one ACP process, switch off by default - #37646
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the new row copies its sibling rows exactly. Both screenshots show it, and the blind reader correctly identified both states as the same switch. [UX-REVIEWED] d637418 Description read[DESCRIPTION-READ] b737105a396d958e02e55e1ac3b8aa4a2b208c5dc4b8d0b9e374c4a61abc153c 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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: deepseek is added as one more row in the existing chat-sharing membership, the switch is off by default, and turning it off restores the previous behaviour. Notes
[DESIGN-REVIEWED] d637418 Description read[DESCRIPTION-READ] 050a171d5bca2556c6fc0b0ea0922fdeb5577df93c48a9daca4fbbb353050ff1 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 Nothing to check. Every item is an opt-in that defaults off, sits beside the existing per-chat process and reuses the routing and placement the claude and goose chats already use. What this change shipsInventory (6 items) — 6 justifiedIntent: let operators who opt in run a busy deepseek session tree on one
[FIRST-PRINCIPLES-REVIEWED] d637418 Description read[DESCRIPTION-READ] 5546ec3d0ffc1612264a1133c745deee43f9c904f436839f1205bc96af8b1deb That sha256 names the PR description this verdict read. 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: |
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 25% chance that this change introduces a defect, above the 12% limit for approving on its own. The deepseek-specific change is sound: membership rows put deepseek on the shared runtime only for chats that share, behind a switch that defaults off and a dashboard-only origin rule; prepare_session refuses Side Chats; and the account era is built from the dsh home, the mapping and the vault revisions without decrypting, failing closed on environment-sourced keys, unreadable config or vault, and refused mappings. Tests cover the era cases, the placement gating and the setting. The earlier GPT finding about MCP pruning is fixed at this head. What remains (stacked commits, merge conflict, missing screenshots and manual proof) is process, not a code defect in this change. 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 |
a1211d4 to
918fae6
Compare
f089e52 to
e4cd529
Compare
3603c5b to
0a64eb9
Compare
0a64eb9 to
6240bf1
Compare
61f4d1f to
d639cdb
Compare
4ceceed to
09495a7
Compare
|
Backend Tests (3.12, 1) fails on |
d25bf55 to
7526a18
Compare
7526a18 to
b2af8be
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed head b2af8be as two parts. The goose commit (7c08c0c) is identical to #37567, reviewed and approved there. This review covers the deepseek commit on top of it. I checked it against #37567 and the claude route from #37540 on main.
Consistent with goose and claude. It adds the same three membership rows (backends_sessions.py), default off, and the same prepare_session refusal of side_read_only (harness/deepseek.py). The switch, config help, baseline, configuration doc and locale rows follow the same pattern. The era has the same random token per distinct value shape.
Switch off (the default): same as main. A deepseek chat now asks resolve_chat_share first. With the preview or the deepseek switch off, it is refused (sharing_disabled / harness_switched_off) before deepseek_spawn_identity runs. The start then takes the per-chat DeepseekAcpClient arm as before.
Switch on: isolation. cwd, extra_env, model, effort, sandbox tier and agent are in ChatRuntimeKey. The era adds the dsh home, the agent.deepseek_env mapping and the vault revision of each referenced secret. SecretVault.list_items reads those without decrypting. A key the child would inherit from its environment (DEEPSEEK_API_KEY or a config-named apiKeyEnv the mapping does not set) gives "", so that chat never shares. The same is true for a relative DSH_HOME, an unreadable layer, a refused mapping or a missing vault entry. That is stricter than goose, and right for a key Crew cannot see rotate. Approvals stay per session: the gate plugin asks through session/request_permission, which names the session. The tripwire ledger is per session (_DeepseekSession). A gate bypass fails the whole runtime (permission_state_issue_ends_process). The era runs inside _read_placement_inputs under asyncio.to_thread, so the config and vault reads stay off the loop. No new regex in product code.
Tests. Ran locally on this head: the goose set from #37567 plus test_chat_runtime_sharing_deepseek_era.py and test_deepseek_shared_runtime.py. Result: 1872 passed. CI still has Backend Tests shards pending on this head, so auto merge waits for them.
Non-blocking:
- Rebase onto main once #37567 lands, so the squash carries only the deepseek rows. The body already says you will do this.
- "Manual verification" still says "to follow". The pod run with process counts on and off is the only proof that real dsh sessions share one process. Please attach it.
_DSH_CONFIG_FILES(chat_share.py) mirrors dsh's config layout. If a dsh release adds a layer that namesapiKeyEnv, that key is not seen. Pinning the list with a dsh-version note or a contract test would catch that.- #37567 states the process-wide
KIROCREW_SESSION_KEYlimit. If a shared dsh child also carries no per-chat key, stating it here too would keep the two PRs consistent.
Approving.
AI-assisted, sent by Bolin Review bot
… off by default
dsh 0.2.0-rc.2 keeps a record per session in one process, runs their
turns in parallel, mounts each session's MCP servers on that session
alone, and restores a closed session with session/resume. DeepseekHarness
(the previous step) composes Crew's gate once per process and keeps each
session's tripwire ledger, but no chat reached it.
deepseek joins ACP_BACKENDS_CHAT_RUNTIME_SHARING and
ACP_BACKENDS_SHARED_RUNTIME_ONLY_FOR_CHATS, so a deepseek dashboard chat
takes the shared runtime only when its placement exists, and every other
deepseek session keeps its own process on DeepseekAcpClient. Its switch
under ACP runtime sharing defaults off ("Chats using DeepSeek Harness",
13 languages).
A deepseek placement keys on deepseek_spawn_identity: the dsh home, the
agent.deepseek_env mapping and the vault revision of each referenced
secret, read without decrypting, so a rotated key, a remapped name or
another home founds a new process. A provider key the child would take
from its inherited environment cannot be told rotated without reading
it, so such a chat never shares. A Side Chat never shares: its origin is
not the dashboard, and DeepseekHarness.prepare_session refuses one too.
b2af8be to
d637418
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Re-approving d637418875. It is the same deepseek commit I approved on b2af8bec7e, rebased onto main after #37567 merged (git range-diff shows it unchanged), so my earlier review holds.
Backend Tests (macOS) (3) is red on this head; its log is not readable until the run finishes, so I can't yet say whether it is this PR or a flaky shard. Auto merge waits for it either way.
AI-assisted, sent by Bolin Review bot
Problem / Motivation
Goal: with the ACP runtime sharing preview on and the new "Chats using DeepSeek Harness" switch on, deepseek dashboard chats in the same tree and folder share one
dshprocess; with the switch off (the default) nothing changes.Every deepseek dashboard chat starts its own
dsh --profile acpNode process today.DeepseekHarness(#37643) can drive one process for several sessions, but no chat is routed to it.Why it matters
A busy session tree on deepseek (a lead and its workers) pays one dsh process per chat. Sharing one process per tree and folder saves that memory, as KAS, codex, claude and goose already can. The switch keeps it opt-in.
Stack and merge order: one commit on main. #37641, #37562, #37643 (
DeepseekHarness), #37540 (claude chat sharing) and #37567 (goose switch) are merged.Not a goal
DeepseekAcpClient.origin_not_dashboard, andDeepseekHarness.prepare_sessionrefuses a Side Chat).work_dir(feat(acp): share one KAS process per session tree (Ultra Mode and Bot) under runtime sharing preview #37466).What changed (motivation -> approach -> change)
No deepseek chat reached the shared harness -> make deepseek a chat-sharing member served by the shared runtime only for a chat that shares, and key its placement on the provider key the process holds -> membership rows, an account era, a switch.
agent_sdk/backends_sessions.py): deepseek joinsACP_BACKENDS_CHAT_RUNTIME_SHARING,ACP_BACKENDS_SHARED_RUNTIME_ONLY_FOR_CHATSandCHAT_RUNTIME_SHARING_HARNESSES(default off), so a deepseek chat takes the shared runtime only when its placement exists, through the routing feat(acp): let claude dashboard chats share one ACP process, switch off by default #37540 added.providers/chat_share.py:deepseek_spawn_identity): the dsh home, theagent.deepseek_envmapping, and the vault revision of each referenced secret (SecretVault.list_items, read from the store without decrypting; every write changes it). A rotated key, a remapped name or another dsh home founds a new process instead of joining one that holds the old key; the key itself is never read for this.DEEPSEEK_API_KEY, or anyapiKeyEnvthe dsh home's config layers name, that the mapping does not set) cannot be told rotated without reading it, so the era is""and such a chat gets a key nothing matches. So does a mapping Crew refuses, an unnamed home, or an unreadable config or vault.config-baseline.jsonand the configuration doc.DeepseekHarness.prepare_sessiontakes the per-session options the claude routing passes and refuses a Side Chat.Backwards compatibility
Compatible: the switch defaults off, and with it off, or the preview off, a deepseek chat starts exactly as before.
Tests
test_chat_runtime_sharing.py: a deepseek chat shares only from the dashboard with its switch on (switched off andside:origins are refused); the loader's defaults carrydeepseek: false.test_chat_runtime_sharing_deepseek_era.py(new; kept out oftest_chat_runtime_sharing_cleanup.py, which is near the 2,000-line cap): the era follows the vault entry, not the key (same entry joins, a vault write, another home or a remapped secret founds a new process, a literal key fails closed); the era never decrypts the vault (every decrypting reader patched to fail); a key from the environment, including one the dsh config names viaapiKeyEnv, never shares, while the same name fed from the vault does; an unparsable config layer fails closed.test_deepseek_shared_runtime.py: a Side Chat session is refused a shared process.test_config_all_settings.py: the new key is a reviewed editable setting.chatRuntimeSharingHarnessRows.test.tsx: the DeepSeek row shows off with nothing stored and writes its own key.test_goose_shared_runtime.py,test_claude_shared_runtime.py,test_acp_harness_contract.py,test_client_bindings.py,test_harness_parity.py,test_session_handle_bindings.py,test_acp_runtime_load_session.py,test_acp_deepseek_backend_session.py: all pass. Source gates,check-i18n-keysand black, isort, flake8, mypy on the changed files are clean.Proof: not provable -- other: placement and era are unit-tested here; the pod run with real chats comes with this PR's manual verification
Manual verification
Pod run with a real session tree on deepseek, switch on and off, process counts and memory: to follow on this PR.
Screenshots / video
To follow on this PR.
Related Issues
Part of #5033
Checklist