feat(dsh): isolate multi-tab sessions and device leases - #93
Merged
Conversation
Schedule task polls after completion so slow responses are not continually invalidated. Recheck the full browser owner identity after asynchronous status reads to prevent cross-session attribution. Add regression coverage for slow polls, retry/disconnect, and owner handoffs.
Track durable command outcomes so immediate device conflicts do not become launch timeouts. Keep consumed command sessions visible and ignore stale admission or completion callbacks.
HarveySang
marked this pull request as ready for review
September 4, 2026 15:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
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.
Accepted verification gate
The maintainer explicitly approved multi-phone automated logic verification plus single-phone real-device acceptance for this merge. Two simultaneous physical phones are not required for this PR's revised gate.
双设备并行已验证逻辑,未做双真机实测。 Automated concurrency checks do not establish real dual-device concurrency or prove that every supported Host permits simultaneous real-device tasks.
Automated verification
Verified candidate source at
2c1dcf2d8af8d2693bcf664a468ad54bc370720ein an isolated worktree:pnpm run check: 45 test files / 301 tests passed, including type checks, builds, and plugin structure validation.npm pack --dry-runand actual tarball creation: passed.git diff --checkand staged diff check: passed.Single-phone real-device acceptance
Used one authorized Android phone with DSH 0.1.1-rc.2, in a separate test profile loaded from the candidate tarball. Installed client-bundle hashes matched the tested build. No model/phone execution was mocked.
409; the replacement task and attempt remain active and unchanged.Real dual-phone concurrency, real multi-phone batch execution, and real browser-versus-phone competition remain unverified physically; their ownership and concurrency logic is covered by automated tests. They are not claimed as real-device acceptance here.
Delivery boundaries