Skip to content

fix(background-terminals): extend Windows taskkill force window - #616

Open
outlier27-cell wants to merge 1 commit into
openpi-dev:mainfrom
outlier27-cell:fix/background-taskkill-windows-budget
Open

outlier27-cell wants to merge 1 commit into
openpi-dev:mainfrom
outlier27-cell:fix/background-taskkill-windows-budget

Conversation

@outlier27-cell

Copy link
Copy Markdown

Problem

Fixes #615. On Windows, the background-terminal shutdown preserves a 2.5s total budget but allocates only 500ms to the force taskkill /T /F phase (400ms before its helper-close reserve). On this host, the force helper regularly needs longer, so a real descendant-tree shutdown can become fail-closed unresolved even though the helper would complete within the existing overall bound.

This does not reopen #408/#412: a helper timeout still remains unresolved and never falls back to shell-only termination.

Value

Gives Windows process-tree termination enough bounded time to complete on slower taskkill hosts while retaining the existing lifecycle deadline and fail-closed behavior.

Approach

  • Allocate the existing 2.5s Windows termination budget as 1500ms graceful plus 1000ms force.
  • Keep the 2000ms plus 500ms allocation unchanged on non-Windows platforms.
  • Do not change taskkill timeout semantics, direct fallback policy, ownership, or process-tree confirmation rules.

Validation

  • Fresh worktree from origin/main 43cd2e94cc584f81cc1f27512ae99c9a4099b231.
  • RED: isolated real Windows descendant-tree regression failed on unchanged main in about 4.95s.
  • GREEN: same isolated regression passed after the change in about 3.57s.
  • GREEN: isolated kill settles a never-exiting process passed in about 3.28s.
  • GREEN: 12 Windows taskkill contract tests passed.
  • GREEN: bun run check passed.
  • bun run test was started; it remained running after the command observer returned. This repository has an existing post-edit real-Pi timeout/hang cluster, so this PR does not claim a full-suite pass. A combined real-process pressure filter also still made the descendant assertion timing-sensitive; this is recorded in fix(background-terminals): give Windows taskkill /T /F enough bounded time #615 rather than hidden.

Impact

  • User-visible behavior: fewer avoidable Windows background-terminal termination failures on slower taskkill hosts.
  • Model-visible context/tools: none.
  • Runtime/lifecycle: Windows phase allocation changes only; total bounded termination window and fail-closed timeout outcome are unchanged.
  • Persisted config/data: none.
  • Compatibility/risk: Windows timing is host dependent; this is not Job Object containment and does not make an uncertain tree kill appear successful.

@github-actions github-actions Bot added the area:background-terminals Background terminal runtime, skill, or tests label Sep 23, 2026

This branch has not been deployed

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

Labels

area:background-terminals Background terminal runtime, skill, or tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(background-terminals): give Windows taskkill /T /F enough bounded time

1 participant