Skip to content

Studio: Windows — the process runner on Job Objects (#936) #940

Done

Description

@danielrispler

Parent

#936

What to build

On Windows a command's deadline kills its whole process tree, as a process group does on Unix. The Windows arm of run (behind run_until, run_until_with_input, run_until_unless) replaces 01's plain arm: it starts the command through process-wrap (std, job-object), waits on the direct child (never the wrapper's wait(), which waits for the whole job: spike round 2's job-leftover took 8 s), and terminates the job on a try_wait error, the deadline, given_up, and pipes held past the deadline. After a clean exit, leftovers are left alone, as on Unix. The public surface, RunError, the stdio choices, the pipe-drain grace and git/gh/gh_at/quiet are unchanged (law git-and-gh-go-through-the-runner).

Acceptance criteria

  • workbench/tests/run.rs's contract runs on Windows with the Rust fake: the deadline kills the tree, a helper cannot hold the run past its deadline, given up, not found, failed with stderr, both streams whole, leftovers left alone after a clean exit.
  • The gates 01 put on those tests are lifted.
  • Each Windows-only test row is shown red (an assertion failure), then green, on Windows runs of this ticket's own pushed issue-* branch, x64 and arm64; Daniel approves the push when auto mode stops it (Spec: Windows Phase 1 — Claude Code recorded on native Windows, x64 and arm64 #936 breakdown, Q41; the rule is in docs/agents/issue-tracker.md once 01 lands). Both run links are in the PR.
  • npm run check and npm run check:windows pass.

Reading

Touches

  • Files: workbench/src/run.rs, workbench/Cargo.toml, workbench/tests/run.rs
  • Session: auto mode
  • Route: strong · effort high — concurrency: process trees, pipes and deadlines

Activity

  1. added
    ready-for-agent
    on Nov 30, 2026
  2. self-assigned this
    on Dec 1, 2026
  3. danielrispler commented on Dec 1, 2026

    @danielrispler
    OwnerAuthor

    Resolved by #1017 (squash 99dfe5a).

    On Windows, run's deadline, given_up, a try_wait error and pipes held past the deadline now terminate the command's Job Object (process-wrap 11, std + job-object, no KillOnDrop). It waits on the direct child only, and leaves leftovers alone after a clean exit. The runner rows use the Rust fake on every platform, and their cfg(unix) gates are lifted. Red, then green, on windows.yml x64 and arm64: run 46611027828 (tests only), then run 46611999918 (the Job Object runner).

    Beyond the Touches line: test-support's fake gained a helper and a cross-platform running(pid). The left-alone row's helper first waited 5 s, which flaked on CI's macOS; it now waits 20 s.

    Route outcome: strong·high claude/opus → pass | 59m

  4. added
    windows
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions