Repository navigation
Replies: 1 comment
|
Two readings from the source, in case anyone acts on the second half of this report: 1. The 2. The Dock duplicates are a separate defect, and a real one: with no single-instance guard, every launch is a new process as far as the system is concerned. That is a core decision, not something a plugin can supply — the second launch has already happened by the time any extension is loaded. |
Uh oh!
There was an error while loading. Please reload this page.
Environment
0.2.0-rc.2(CFBundleVersion=0.2.0-rc.2)com.deepseek.dsh/Applications/DeepSeek Harness.appSummary
Two related defects on macOS:
session.lockfiles have accumulated under~/.dsh/sessions/and are never reclaimed.The two are likely the same root cause: the app has no single-instance guard, so repeated launches create independent processes, each holding its own session lock. The lock files then outlive the processes.
Evidence
1. Only one bundle, only one Dock pin
There is no second copy under
~/Applications,/Users/Shared, or the Desktop. The Desktop contains no launcher for DSH. So the multiplicity in the Dock is not pins and not duplicate bundles — it is runtime state.2. No single-instance protection in the bundle
Contents/Info.plistdoes not declare:Because
LSMultipleInstancesProhibitedis absent, LaunchServices happily starts a fresh process for everyopen/double-click instead of activating the existing window. This also matches the previously reported symptom in discussion #9078 ("退出后需点击两次图标才能重新打开").3. Session locks are never cleaned up
Distribution by date of the oldest surviving lock:
session.lockcountLocks from 2026-09-23 — a month old — are still present. Note the step change on 09-26 → 09-28 (89 → 115 → 146), which is consistent with a launch loop rather than organic session churn.
A sample of the current lock for a live session:
Zero-byte locks are indistinguishable from abandoned ones by inspection, which is what makes them unrecoverable in practice (cf. discussion #7158 "Writer-lock timeout error names only the path, leaving an orphan lock unrecoverable in practice").
4. Actual activity does not justify the icon count
Only 3 workspace session directories were touched on 2026-10-23 (today):
Everything else is dated 10-22 or earlier — historical session files, not live sessions. A single active session is producing a Dock with many icons.
Expected
session.lock.Actual
session.lockfiles persist indefinitely across app quits and restarts.Suggested fixes
app.requestSingleInstanceLock()and quit/bail when not acquired, orsecond-instance→focus()). This is the primary fix for the Dock symptom.LSMultipleInstancesProhibitedinInfo.plistso macOS enforces it at the LaunchServices layer as well.session.lockon startup: sweep locks whose owning PID is dead (and whose session has no live writer), and delete them. 939 accumulated files indicate this never runs.LSUIElementor an explicit Dock policy if N windows are intentional — a single Dock tile with multiple windows would match user expectations better than N tiles.Related discussions (checked, not duplicates)
.lockblocking later boot (Windows analogue of the stale-lock issue)Reproduction sketch
0.2.0-rc.2(single copy).defaults read com.apple.dock persistent-apps | grep -c com.deepseek.dsh→1.find ~/.dsh/sessions -name session.lock | wc -lgrows monotonically and never shrinks.Note on collection limits
ps,osascript(System Events), andlaunchctl listwere all unavailable in the sandboxed collection environment, so a direct process count could not be captured. The Dock-tile multiplicity is therefore established from the screenshot plus the absence of any pin/bundle duplication and the absence ofLSMultipleInstancesProhibited; the lock-file count is a direct filesystem measurement.All reactions