Skip to content

fix(ci): bound Windows monitor termination - #553

Merged
stamp-build[bot] merged 1 commit into
mainfrom
agent/otter/windows-bounded-termination
Oct 30, 2026
Merged

stamp-build[bot] merged 1 commit into
mainfrom
agent/otter/windows-bounded-termination

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Otter from open-agent-runtime opened this pull request through Stamp
View in Stamp →


The Windows CI monitor called Process.Kill(true) synchronously after a case or command deadline. If that call did not return, the monitor could not exit and reach the artifact upload step.

Run termination on a background worker and bound the total termination wait to ten seconds. A returned call retains a root-exit observation of up to five seconds within the remaining budget; a nonreturning or thrown call records its own checkpoint. All timeout paths flush the final stage_exit record and exit 124 without joining the worker, disposing the shared process, or taking another CIM sample. Normal commands retain their native exit codes and inherited output. Exit 124 does not claim that every descendant stopped; residual cleanup belongs to the runner.

The actual termination helper has real-child regressions for native termination, a never-returning call, an exception, and a slow returned call whose target remains alive. They observe root exit separately from pipe close, enforce the total budget, retain evidence in both sinks and clean up the synthetic targets. The existing command and blocked-worker assertions remain, with the final stage checkpoint now also checked in stdout.

Validation and evidence:

  • CI=1 pnpm run check with PowerShell 7.6.9 enabled: 2,523 tests, including the four actual-helper cases, and 18 mock behavior cases passed.
  • Two Windows investigation runs are preserved in experiments/windows-handles/README.md, with repeatable scripts. The second run passed: inherited handles delayed the next step 5533 ms versus 488 ms with files; injected nonreturning termination waited 10005 ms and the root exited 124 another 99 ms after its checkpoint while the target and pipes were still alive.
  • The first collector's failure is retained: it awaited close, so it could not determine whether the root was still alive. The second collector records exit and close independently.
  • The investigation workflow replacement is excluded from this PR. Normal CI configuration, command concurrency, test assertions and native deadlines are unchanged. Windows integration confirmation will come from this PR's checks.

This is task #97. The old 25-minute cancellations remain unexplained; this change bounds one monitor operation and improves evidence retention without claiming a causal fix or guaranteed upload if the runner itself fails. Product probe diagnostics are separate in PR #552.

@stamp-build
stamp-build Bot merged commit d8689cf into main Oct 30, 2026
36 of 71 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/windows-bounded-termination branch October 30, 2026 15:17
@stamp-build stamp-build Bot mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants