Skip to content

[Feature request] Support isolated development instances on Windows #387

Open

Description

@nillikechatchat

What happened?

The Windows standalone layout uses Known Folders only. HOME / USERPROFILE / LOCALAPPDATA are ignored. Non-Windows honours HOME / XDG_*. HIROUTE_RUNTIME_DIR is honoured by the CLI and by nothing on the daemon side, so a second instance needs two hand-matched overrides with no check that they agree.

StandaloneLayout::from_environment() on Windows calls SHGetKnownFolderPath and returns. Pointing HOME/USERPROFILE at a temp directory silently does nothing, while the same struct honours four variables on macOS and Linux.

A development daemon started with --role all --standalone --dev-standalone --console-assets <dist> therefore resolves the same %LOCALAPPDATA%\HiRoute\cli state root, the same control endpoint (<runtime_root>\hiroute\control.sock) and the same Gateway listener as the installed service. The second process aborts with hiroute.daemon-startup-failure/v1 / invalid_configuration / GATEWAY_LISTENER_ADDRESS_UNAVAILABLE. If the official service is stopped instead, the dev daemon writes diagnostics and journal into the real user tree.

hirouted has --storage-root / --runtime-root. The CLI has HIROUTE_RUNTIME_DIR first in resolve_runtime_root. No code under crates/daemon reads HIROUTE_RUNTIME_DIR, and the CLI does not read the daemon flags. A mismatch shows up as generic "daemon unavailable", not as "CLI runtime dir X vs running daemon Y".

Reproduction

  1. On Windows, leave the installed Task-managed daemon running.
  2. Export HOME/USERPROFILE to a temp directory and start a second hirouted --role all --standalone.
  3. Confirm it still binds the installed state root / listener and aborts with GATEWAY_LISTENER_ADDRESS_UNAVAILABLE.
  4. Set HIROUTE_RUNTIME_DIR for the CLI only, or --runtime-root for the daemon only, and confirm the pair is not checked.

Do not attach the user LocalAppData tree.

Code evidence

Citations match comparison d9fe4c04ae2cd54fdb2850687a9567c9104f6660.

This matches the shared-client-access Windows headless rule: Known Folders own installed-instance paths; HOME/XDG cannot redirect them. The gap is a supported scratch-instance override for development, which Unix already has via HOME/XDG_*.

HiRoute version or commit

Windows x64. Code citations match comparison d9fe4c04ae2cd54fdb2850687a9567c9104f6660.

Operating system and architecture

Windows x64.

Expected result

Honour an explicit override on Windows that both CLI and daemon accept and verify (HIROUTE_HOME, LOCALAPPDATA, or a shared --root). Document a supported scratch-instance recipe. Name the collided resource (listener port vs control socket vs store lock) instead of one generic invalid_configuration.

Data check

No credentials, account names or LocalAppData dumps are included. Error codes and well-known install locations are sanitized observable results.

Activity

  1. added
    help wanted
    on Nov 5, 2026
  2. changed the title [-][Bug] Windows install layout ignores HOME/USERPROFILE; HIROUTE_RUNTIME_DIR is CLI-only[/-] [+][Feature request] Support isolated development instances on Windows[/+] on Nov 5, 2026
  3. johnlanni commented on Nov 5, 2026

    @johnlanni
    Contributor

    Thanks for the report. Installed Windows instances intentionally use the account's Known Folders, so changing HOME or USERPROFILE is not a supported way to isolate another instance. We are classifying a supported Windows scratch-instance workflow as a feature request.

    For isolated development and testing of shared functionality, we recommend building and running the Linux version inside WSL2. Keep the checkout and test data in the WSL Linux filesystem, use separate Linux home/data/runtime directories, and choose listener ports that do not conflict with the installed Windows service. Running the Windows .exe from WSL still uses Windows account paths and does not provide this isolation.

    This approach is suitable for shared Gateway, routing, protocol and Web Console development. Windows-native functionality—including NSIS installation/uninstallation, scheduled Tasks, ACLs, named pipes and native Agent integration—should be verified separately on Windows, preferably with a dedicated test account or VM.

    We will keep this issue open with help wanted for contributions toward a supported Windows-native isolated development workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions