Repository navigation
feat: scope desktop instance locks by key - #339
Merged
Merged
Conversation
houko
force-pushed
the
feat/instance-key
branch
from
November 16, 2026 00:48
f494bf1 to
b50893b
Compare
This was referenced Nov 16, 2026
houko
force-pushed
the
feat/instance-key
branch
from
November 17, 2026 04:02
b50893b to
46c439c
Compare
houko
force-pushed
the
feat/instance-key
branch
from
November 17, 2026 04:08
46c439c to
11255a2
Compare
houko
force-pushed
the
feat/instance-key
branch
from
November 17, 2026 04:12
11255a2 to
7bc7672
Compare
Collaborator
Author
|
Reviewed. The diff against main scopes the Windows mutex/pipe and the Linux socket/lock by hashing Checks on this head (rebased onto current main; the only conflict was the Windows CI job, resolved by keeping main's new focus steps and appending the instance step):
|
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.
Windows and Linux previously forced all launches with the same app ID into one process, preventing isolated profiles or test runs.
nsgo.InstanceKey(key)now scopes both the lock and its handoff socket/pipe: different keys run independently, and launches with the same key still deliver their files (and, on Windows, a Jump List task) to the matching owner. An empty key preserves the existing lock names and behavior; other targets ignore the option.docs/architecture/application.md§Lifecycle and the roadmap's one-instance row describe the option.Regression tests keep the default instance and two keyed instances alive together, then verify file delivery to each owner; a Linux test pins the default socket path to the pre-existing name. The Test workflow's Windows job now also runs the Windows instance tests (Linux's already run in its full suite).
Validation:
go build ./...; GOOS=windows (amd64, 386, arm64), linux, android/arm64 and js/wasm builds or vets of the touched packages;go tool nsgo check -target all;go tool nsgo testof./internal/platform/linuxinstance tests,./internal/backendand-run 'Layer|Skills|Doc' ..TestInstanceHandsOffByKeypassed three times in a row.nsgo.Runwithnsgo.InstanceKey(os.Getenv(...))): owners with keys "", "a" and "b" ran side by side; a second launch per key exited and its owner, and only its owner, heardOnReopenandOnOpenFileswith that launch's file.Closes #332.