Skip to content

feat(dsh): isolate multi-tab sessions and device leases - #93

Draft
HarveySang wants to merge 1 commit into
mainfrom
codex/multi-tab-session-device-isolation
Draft

feat(dsh): isolate multi-tab sessions and device leases#93
HarveySang wants to merge 1 commit into
mainfrom
codex/multi-tab-session-device-isolation

Conversation

@HarveySang

Copy link
Copy Markdown
Collaborator

What changed?

  • Scope root tasks and client snapshots by DSH session, with exact task/attempt identities and stale-callback guards.
  • Separate per-session device preferences from all-or-nothing multi-device leases. Reject conflicting ownership and make stale stop/release requests harmless.
  • Bind nested agents to their original task, cancel on owning-session/plugin disposal, and keep tab switching independent of task lifetime.
  • Keep the managed browser globally serial with an exact owner and session-scoped install approval/status.
  • Update local HTTP contracts, regression tests, reload compatibility, and English/Chinese/Japanese behavior documentation.

Why?

Allow independent DSH sessions to use non-conflicting phones without sharing messages, task state, errors, stop actions, or device ownership. Preserve single-session multi-phone execution.

Testing

Re-run before this commit:

  • cd deepseek-harness-plugin && rtk pnpm run check: 45 test files / 290 tests passed; type checks, builds, and plugin structure validation passed.
  • rtk npm pack --dry-run: passed.
  • rtk git diff --check and staged diff check: passed.

Automated checks do not establish real dual-device concurrency.

Device verification

Pending — keep this PR in draft and do not merge or release until the real-device gate passes.

  • Two authorized Android phones on supported DSH: A/B run concurrently; rapid switching and new C do not cross messages, state, or errors.
  • Stop A without affecting B; delayed old stop and old-attempt release cannot affect A's replacement task.
  • Background errors remain in the owning session; same-phone contention reports busy; one session can still execute across all selected phones.
  • A owns the browser: B's browser task reports busy while an independent phone task can run.
  • Confirm the DSH Host actually permits concurrent sessions; a globally serial Host fails this acceptance gate.

Notes

One atomic implementation commit based on 674e3589. Target main advanced to 6ff5b04 during preparation; this branch was not rebased or merged with it. CI and mergeability are tracked separately.

No dependency, configuration, credential, migration, version, tag, or release changes. Preferences and leases are process-local. The existing running DSH instance was not replaced. Rollback is a revert of this PR.

@gofenix
gofenix requested a review from VicarDa September 3, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant