Skip to content

fix(process): bound Windows cleanup observation waits - #577

Merged
stamp-build[bot] merged 2 commits into
mainfrom
agent/otter/windows-stop-budget
Oct 31, 2026
Merged

stamp-build[bot] merged 2 commits into
mainfrom
agent/otter/windows-stop-budget

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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


Windows disposal could spend more than ten seconds capturing descendants before native shutdown: each failed CIM read had its own five-second limit, while waiting for a fresh serial batch was unbounded. The observed Claude 2.1.316 failure took 16.439 seconds and exceeded the unchanged 15-second behavior check.

Give Windows before-EOF capture, force revalidation and post-exit revalidation separate five-second caller budgets, including queueing. Capture does not retry a timeout; another failure may retry once with only the remaining time. Expired callers report unverified cleanup and discard late identity evidence; force still stops the owned root. The one-second pre-cancellation observation uses the same deadline mechanism. Other platforms retain their existing cleanup policy.

The first actually spawned Windows tree-owning line process starts one bounded background preparation through the serial reader. This includes short model, inventory and account probes that use that process abstraction; runExecutable help/version queries do not trigger it. Preparation never supplies cleanup identity evidence. Only completed cleanup retains a snapshot of its diagnostic metadata. Preparation alone does not keep the host alive: its timers, query process and pipe are unreferenced, while any foreground caller promotes the batch and retains its handles. Synchronous host-exit cleanup remains independent.

The standalone behavior entry does not prewarm CIM, so Windows CI exercises the product's cold path with the existing 15-second disposal assertion. Native shutdown-hook grace is unchanged. Observation budgets do not bound total disposal: taskkill and native exit still have no hard deadline. The accepted tradeoff is that the slowest measured capture would report unverified cleanup near five seconds instead of recovering through retries after 11.4 seconds.

The committed report, probe, manifest and selection script preserve both Windows baseline groups from run 41193731535, including all 102 stops and physical query intervals. Batching remains effective; the slowest capture includes about five seconds of queueing. The original trace's remaining 6.418 seconds cannot be reconstructed by phase, and is not attributed to post-exit revalidation. The temporary workflow is not included.

Validation:

  • Full CI=1 pnpm run check: 2,856 unit tests and 18 mock behavior cases passed; package builds passed.
  • All 14 behavior backends passed with bounded concurrency, including the native aimock/replay backends; Pi RPC normal and hanging native shutdown-hook regressions passed.
  • Regressions cover queued budgets, remaining retry time, no timeout retry, expired cancellation results, fresh capture after completed preparation, stable cleanup-only metadata, actual spawn semantics, and real host exit with background or foreground queries. Targeted mutations verify the budget, identity and handle-reference boundaries.
  • Downloaded baseline evidence is reproducibly selected byte-for-byte. Changed Windows product behavior and macOS checks remain subject to this PR's CI.

Raft task #137. Release remains with Cindy after review and successful CI.

@stamp-build
stamp-build Bot force-pushed the agent/otter/windows-stop-budget branch from 8fc34a3 to 65b29c4 Compare October 31, 2026 11:20
@stamp-build
stamp-build Bot merged commit bc49cb3 into main Oct 31, 2026
36 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/windows-stop-budget branch October 31, 2026 12:58
stamp-build Bot added a commit that referenced this pull request Oct 31, 2026
<!-- stamp:review:v1 -->
<sup><img
src="https://cdn.slock.ai/avatars/6aabf32c-20bc-4cba-b55a-2aa72b60999b/8ba4452ceb890f1930886ef4286fdb99.webp"
width="16" height="16" align="absmiddle" alt=""> <b>Otter</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_91eda4d6cac35926fe877c3770e34c87"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img
src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg"
width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp
→</a></sup>

---
<!-- /stamp:review:v1 -->

Update the ordinary CodeBuddy ACP CI pin to 2.179.0 and the manual
OpenCode evidence pin to 2.2.5 after verifying the October 31 stable
releases. OpenCode's product admission table and shared-placement CI
remain exactly 2.2.3; the new manual pin prepares the full
three-platform observation, configuration-freshness and resource run.

The dated report and selected JSON retain successful controls and native
failures. Claude 2.1.316 passed 68 vendor and 17 behavior cases, plus
login-browser and reserved MCP-name controls. CodeBuddy passed five
vendor and 16 behavior cases; its standalone stream-json reproduction
still duplicates the second immediate input in 3/3 runs, while delayed
inputs and ACP remain correct. OpenCode passed 15 behavior cases and
9/10 boundary checks, but native concurrent cold startup and cold MCP
resume still fail. Warm catalog replacement passes.

Validation: after rebasing onto `bc49cb3` (the Windows cleanup budget
fix in #577), `CI=1 pnpm run check` passed with 2,856 tests and 18 mock
behavior cases. The patch is identical to the reviewed `8ab46be` patch
(`git range-diff` reports `=`). `actionlint` passed for both changed
workflows; their content is unchanged by the rebase.

All dated native observations were collected on Linux x64 with product
base `1d22fd7`, as recorded in the report. Initial Windows Claude CI on
that base reproduced the existing 15-second mid-turn disposal failure
(16 passed, two skipped, one failed; run 41200315246/job 124534654439).
The full CI on the rebased head now provides a second cold-path
confirmation of #577. The separate full three-platform OpenCode
sharing-evidence run remains pending. This PR changes no product code,
assertion or deadline.

Co-authored-by: Otter <[email protected]>
@stamp-build stamp-build Bot mentioned this pull request Oct 31, 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