Skip to content

fix(windows): harden runner process-tree shutdown - #480

Merged
jmagar merged 2 commits into
mainfrom
codex/pr474-review-followups
Aug 27, 2026
Merged

fix(windows): harden runner process-tree shutdown#480
jmagar merged 2 commits into
mainfrom
codex/pr474-review-followups

Conversation

@jmagar

@jmagar jmagar commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace raw Windows Job Object handles with exclusive RAII ownership and explicit close errors
  • fail Code Mode runner startup closed when containment cannot be armed, with deterministic direct-child cleanup
  • aggregate and report runner/process-tree shutdown failures across Code Mode and gateway lifecycle paths
  • add Windows containment success and assignment-failure coverage

Review provenance

Follow-up to #474 after the requested comprehensive review surfaced Windows process-lifecycle gaps. Tracks lab-ryvkj.

Verification

  • cargo test -p labby-codemode --lib
  • cargo test -p labby-gateway upstream::process_guard
  • cargo clippy -p labby-codemode -p labby-gateway -p labby-winjob --all-targets --all-features -- -D warnings
  • RUSTFLAGS="-D warnings" cargo check --target x86_64-pc-windows-gnu -p labby-codemode --all-targets
  • RUSTFLAGS="-D warnings" cargo check --target x86_64-pc-windows-gnu -p labby-winjob -p labby-gateway
  • cargo fmt --all -- --check
  • git diff --check

Residual boundary

The Windows lifecycle tests compile locally through the GNU cross-target; actual Windows runtime execution is delegated to CI.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 22, 2026
@jmagar
jmagar merged commit 1b42240 into main Aug 27, 2026
38 checks passed
@jmagar
jmagar deleted the codex/pr474-review-followups branch August 27, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant