fix: a Windows service pins one engine build

Open
#5,602 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript
Domain
cli, devtools

Research direction

Start with packages/server/src/service-task.ts and trace how the Task Scheduler action builds the supervisor command; compare it with packages/stim-cli/src/engine-store/promote.ts, which writes the engine entry points. Check the existing systemd convergence restart in issue #5428 for the idle-child behavior. Done means installed Windows services follow engine updates and rollbacks, including existing tasks, while preserving the documented arguments; the report notes this has not been tested on Windows.

Written by the indexing model from the issue text.

Description

area: server priority: P1 type: bug

Problem

A Windows worker installed with stim service install runs the build it was installed with and does not follow stim engine update or stim engine rollback. With the worker protocol and build-compatibility versions of 2.0, a pinned Windows worker breaks build offload after an engine update. The macOS LaunchAgent and (since #5428) the Linux systemd unit name the engine's bin/stimd shim and follow the engine.

website/docs/remote-machines.md and the stim guide settings text say engine update and rollback work on Windows as on macOS and Linux; they do not.

Evidence

Read from main: packages/server/src/service-task.ts renders the task with [spec.node, spec.script, ...serverArguments(spec)]; the Task Scheduler action starts Stim's supervisor with node, which starts that command. packages/stim-cli/src/engine-store/promote.ts writes bin/stim, bin/stim.cmd and bin/stimd, and bin/stimd only as a #!/bin/sh script. Not run on a Windows machine.

Cause

Task Scheduler names node plus the versioned script, and the engine has no Windows stimd entry for a task to name.

Fix idea

A bin/stimd.cmd, or a node entry the supervisor re-reads from current.json at each start, started with the same arguments; a rewrite path for tasks already installed; and the convergence restart when the supervisor's child is idle, as #5428 does for systemd.

Dominant language
TypeScript
Stars
100
Forks
8
Avg merge
4h 24m
Merged PRs (30d)
971

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from appandflow/stim

All issues in appandflow/stim

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.