Repository navigation
fix: refuse device-host requests and grants on a stim-server that is not on macOS - #3657
Merged
Merged
Conversation
janicduplessis
force-pushed
the
feat/3624-linux-server-service
branch
from
October 13, 2026 17:51
7dfa204 to
61e0c6e
Compare
janicduplessis
force-pushed
the
fix/3656-refuse-device-host-off-mac
branch
from
October 13, 2026 18:04
176d5a6 to
f041be4
Compare
An error occurred while trying to automatically change base from
feat/3624-linux-server-service
to
feat/3620-rate-by-platform
October 13, 2026 19:11
…not on macOS Hosting simulators needs a Mac, but a Linux or Windows stim-server accepted a device-host request at hello and devices grant --device-host approved it. Both now refuse with a message that the machine takes build requests only. Refs #3656
The test asks for device-host access, which a server not on macOS now refuses, so it failed on the Linux CI runners. Refs #3656
janicduplessis
force-pushed
the
fix/3656-refuse-device-host-off-mac
branch
from
October 13, 2026 20:29
f041be4 to
ce69d4c
Compare
janicduplessis
changed the base branch from
feat/3624-linux-server-service
to
main
October 13, 2026 20:29
janicduplessis
marked this pull request as ready for review
October 13, 2026 20:29
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.
Description
Depends on #3631, which lets stim-server run as a service and take
setup --buildon Linux. It branches from #3631 beside #3638, #3640 and #3645, so it is not linked into the #3619 stack.Hosting simulators needs a Mac. Since #3631,
stim-server setupon Linux refuses--device-host, but two other paths still accepted it on any OS:request: 'device-host', which recorded a pending device-host request;stim-server devices grant <id> --device-host, which approved one.#3653 makes clients ignore non-macOS machines for hosting, so such an approval is harmless today. The server should still not record a capability it can never serve.
Solution
Off macOS, the hello refuses a device-host request with
forbidden, "Hosting simulators needs a Mac. This machine takes build requests only." The request is not recorded.devices grant --device-hostfails with the same reason and points to--build. Build requests and grants are unchanged.startServertakes ahostsDevicesoption, defaulting to running on macOS, so tests can set it on any OS. Existing device-host records are left alone; the client-side checks from #3653 cover them.Test plan
server.test.ts: withhostsDevices: false, a device-host hello is refused withforbiddenand records no client. A build request from the same server is still approved and answersbuild.offer.cli.test.ts:devices grant --device-hostis approved on macOS. On CI's Linux and Windows runners it is refused with the new message. The server test helper declareshostsDevices: true, so the existing device-host tests keep their behavior on every runner.Fixes #3656