Skip to content

stim-server refuses device-host requests and grants off macOS #3656

Closed

Description

@janicduplessis

Problem

A stim-server on Linux or Windows accepts device-host requests and lets stim-server devices grant <id> --device-host approve them, although hosting simulators needs a Mac. Only stim-server setup refuses --device-host there (#3631).

Evidence

Found while fixing #3649 (PR #3653): server.ts passes a hello with request: 'device-host' to requestDeviceHostAccess on every platform, and the devices grant --device-host path in bin/stim-server.ts has no platform check. #3653 makes clients ignore non-macOS machines for hosting, so such an approval is harmless today, but the server still records a capability it can never serve.

Cause

The device-host request and grant paths predate non-macOS servers.

Fix idea

Refuse a device-host request at hello, and devices grant --device-host, when stim-server does not run on macOS, with a message that hosting needs a Mac and this machine takes build requests. Leave existing records alone; the client-side checks in #3653 cover them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions