Skip to content

ci(pi): retain named Windows RPC timeout diagnostics - #535

Merged
stamp-build[bot] merged 2 commits into
mainfrom
agent/otter/windows-pi-diagnostics
Oct 29, 2026
Merged

stamp-build[bot] merged 2 commits into
mainfrom
agent/otter/windows-pi-diagnostics

Conversation

@stamp-build

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

Copy link
Copy Markdown
Contributor

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


<!-- stamp:review:v1 -->
Otter from open-agent-runtime opened this pull request through Stamp
View in Stamp →


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

Windows Pi RPC vendor runs can outlive their existing case deadlines and reach the job ceiling without usable failure logs. Keep those Vitest deadlines and assertions, and add an external monitor that stops the launched test tree after a case stays active for 3 minutes or the command runs for 10 minutes. Exit 124 distinguishes this stop from a native test result.

The existing always-upload artifact now retains incremental case names/results, the last active cases, combined runner output, resource samples and bounded Pi RPC stderr tails. Test-only observers reuse the session credential redactor and also redact inherited environment credentials; production stderr behavior is unchanged. No assertion or concurrency changes.

Validation: CI=1 pnpm run check passed; the nested-runner timeout regression passed; 11 native Pi RPC cases and the native stderr/redaction regression passed. All 35 CI checks passed at 7928754, including the real Windows blocked-worker watchdog regression and the Windows Pi RPC behavior/vendor suites. The broader vendor run found local Pi project fixtures reporting version 1.0.56 rather than 1.4.0; the same failures reproduce with diagnostics disabled, so they are not evidence for this change. The cause of the intermittent CI hangs remains unknown.

@stamp-build
stamp-build Bot force-pushed the agent/otter/windows-pi-diagnostics branch from e7c015e to 7928754 Compare October 29, 2026 18:27
@stamp-build
stamp-build Bot merged commit ea2ae3e into main Oct 29, 2026
36 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/windows-pi-diagnostics branch October 29, 2026 18:53
@stamp-build stamp-build Bot mentioned this pull request Oct 29, 2026
stamp-build Bot added a commit that referenced this pull request Oct 29, 2026
<!-- stamp:review:v1 -->
<sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg"
width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_83606fe51f359eef92339f9fe662aa5c"><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 -->

Minor release: session placement and the shared runtime process core. No
built-in runtime uses shared placement yet; every built-in runtime keeps
one process per session or runs in process, as before. This release
changes the start of the record stream and several public types.

## Breaking changes

### Record streams start with `open` / `opened` (#533)
For built-in runtimes (except the community Morph adapter) and
`scriptedRuntime`, every successful open, including `resume`, begins the
stream at seq 0 with an OAR request `{ kind: "open", placement }` (the
requested placement) and at seq 1 with its response `{ kind: "opened",
placement }` (the actual placement). These are OAR lifecycle records,
not native frames; native initialization frames follow in their original
order, so native frames' seq numbers shift by 2. Hosts must not assume
the first record is a native frame or a prompt. `events()` omits `open`,
`opened` and `cleanup`. Logs written by earlier versions have no opening
records; folds do not invent placement or extra records for them.

Custom runtimes built with `defineRuntime` without placement options
record no opening pair, report `Session.placement` as `null`, and refuse
explicit `shared` and `isolated`. To declare placement, pass
`RuntimePlacementOptions` as `defineRuntime(definition, options)` and
record the pair with `kernel.opened(context)` from
`@botiverse/oar/kernel`. Morph declares no placement (`null`, no opening
pair) because it can reuse one Console across sessions.

### TypeScript (#533)
Exhaustive switches and custom kernels need updates:
- Request body `open`; response bodies `opened`, `cleanup` and
`released`; a `released` event; `ViewNotice` gains `{ cause: "released",
reason }`.
- `RejectionCode` gains `session_released`.
- `UnsupportedOptionError.option` widens to `keyof SessionOptions |
"placement"`.
- `Runtime` gains `placement` and `withPlacement()`; `Session` gains
`placement`; `defineRuntime` takes an optional second argument and its
return type changed.
- `SessionKernel` (`/kernel`) gains a required `opened()`, and
`unreachable()` can return `session_released`.
- Additive: `StartSession` gains an optional third `context` parameter;
idle `AgentStatus` gains `released?: true`; `SessionResources` gains
`scope?`.

## New

### Session placement (#533)
`Runtime.placement` is the host's request: `auto` (the default
instances), `shared` or `isolated`. `runtime.withPlacement(request)`
returns a new runtime instance; shared sessions from that instance use
its own process pool. Each opened session reports its actual placement:
`shared`, `isolated` or `in_process`.

- Under `auto`, Antigravity, Claude, CodeBuddy, Codex, Grok, Kimi,
OpenCode, Qoder, Qwen and Pi RPC are `isolated`; Cursor, Pi in process
and Pi Durable are `in_process`. `auto` shares only where a runtime
version has passed OAR's evidence gate on that platform
([design](https://github.com/botiverse/oar/blob/main/docs/design/system.md#shared-runtime-processes));
none has yet.
- Explicit `shared` is refused when a session opens (not when
`withPlacement` is called) with `UnsupportedOptionError` on `placement`
where sharing is not supported; in-process runtimes also refuse explicit
`isolated`.
- A pool joins sessions only when the executable, arguments, process
cwd, environment (including inherited values) and home/configuration
directories match. Session-level model, effort and MCP split a pool
unless the runtime's protocol has been shown to isolate them.
- New exported types from the root entry: `PlacementRequest`,
`SessionPlacement`, `SessionOpenContext`, `SessionCleanup`,
`SessionRelease`, `RuntimePlacementOptions`. The pool helpers are
internal.

### Release and cleanup records (#533)
In a shared process, OAR cannot kill a stuck turn without killing other
sessions. When an accepted abort reaches its fallback, OAR records
`released`: OAR stopped controlling the session, and the record states
that the native turn and any work started after cleanup may continue. A
release ends the waiting turn as `aborted` after that turn's accepted
abort or dispose request (as an exit does), otherwise as `failed`. Later
controls are rejected with `session_released`, or `disposed` once the
host has requested dispose; an actual process exit still answers
`runtime_exited`. Late native frames are still recorded and cannot
reopen the turn. A `cleanup` response records whether per-session native
cleanup completed or failed; neither result proves the work stopped.
Shared dispose records `released` (or the process exit when the last
session closes). A shared process exit ends every session in it, each
with its own exit record; OAR never restarts a shared process silently.
`resources()` on a shared session reports the whole process with `scope:
"shared_process"`. A failed pool-backed close records `rejected`,
`dispose()` throws, and it can be retried; built-in runtimes' `dispose`
is unchanged.

These behaviors apply only to shared placement, which no built-in
runtime uses yet; OAR's internal pooled mock runtimes exercise them in
both placements.

### CLI (#533)
`oar run --json` and `--record` voyage files now include the `open` and
`opened` records first. The progress renderer can print `[session
released; native work may continue]`, which the CLI's default runtime
instances cannot produce today.

## CI
- The Windows Pi RPC vendor job records per-case start/end events,
redacted Pi stderr tails and the combined Vitest output; an external
monitor stops the test command after 3 minutes on one case or 10 minutes
overall (exit 124). All of it is in an always-uploaded artifact (#535).

Co-authored-by: Cindy <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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