Repository navigation
fix(pi): accept explicit RPC commands above the tested version floor - #626
Merged
Merged
Conversation
stamp-build
Bot
force-pushed
the
agent/otter/pi-rpc-version-floor
branch
from
November 5, 2026 06:10
22bcdac to
917670d
Compare
stamp-build
Bot
force-pushed
the
agent/otter/pi-rpc-version-floor
branch
from
November 5, 2026 07:28
917670d to
2d8c2e0
Compare
This was referenced Nov 5, 2026
stamp-build Bot
added a commit
that referenced
this pull request
Nov 5, 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_79892a3340b0f81c316fddd6141f962a"><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 --> A Pi prompt refused before native start can leave held inputs stranded and retain cancellation intent for the next run. Recover that path by recording the refusal, clearing stale abort state and draining held work. SDK disposal during pending admission now reports disposed, late failures cannot settle a later extension run, and RPC clears a cancellation fallback rearmed while terminal statistics or observers finish, preventing a healthy child from being killed later. Ordinary terminal publication keeps its existing order: publish `turn_ended`, then release the native run gate and drain. A synchronous SDK/RPC observer can therefore see idle while prompt is still busy; submit after the observer returns. The earlier synchronous-submission implementation is withdrawn, including its preflight admission helper, deferred dispatch, isStreaming checks and front requeue. The design decision documents why settlement-time extension scheduling makes that approach unsafe and what evidence would reopen it. Pi Durable product behavior is unchanged. Extension-handled inputs, competing extension runs, missing queue ownership and a reentrant prompt from a pre-start refusal observer remain explicit limitations. Task #173 owns their separate record/ownership design. No completion is fabricated here, and this change does not claim to fix those existing gaps. Validation on main `91c626a5`: - Full check: 3,202 tests and 18 mock behavior cases passed. Build and clean packed consumption passed. - 21 focused regressions cover refusal draining, stale cancellation, disposal, late failures, terminal callback ordering and ordinary FIFO. Eight focused mutations are caught; the main product code fails eight of the retained independent regression cases. - Native Pi SDK/RPC 1.5.0 vendor suites passed (101/99 cases), Durable passed 26 cases, and all three Pi behavior backends passed. Missing-key refusal uses a local scripted provider and verifies recovery. Ordinary terminal observer prompt/queue controls preserve FIFO; Durable remains a separate control. - The supplied review probes for extension preparation failure, delayed extension input and competing observer prompts were compared with main in SDK and RPC. Their recorded facts match byte for byte after narrowing. Those diagnostics are retained locally, not installed as public tests; their existing limitations remain documented. Task #162, intended for 0.87.2 with #626. No package version or release tag change. Windows/macOS results require this head's CI. Rebased after #626; all four commit patches are unchanged. --------- Co-authored-by: Otter <[email protected]>
Merged
stamp-build Bot
added a commit
that referenced
this pull request
Nov 5, 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_b6cea2eb70db20fefc1fe4212bbebdaf"><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 --> Patch release: a host can use its own, newer Pi executable, Pi sessions recover from a refused prompt, and two Codex startup problems are fixed. ## Explicit Pi RPC commands (#626, fixes #621) - `createPiRuntime({ execution: "subprocess", command })` now accepts stable Pi **1.4.0 or newer**, not only the exact version OAR bundles, so a user's upgrade of `pi` no longer stops a host from opening sessions. - This is a compatibility floor, not a claim that every future release is tested. Native controls passed on explicit 1.4.0 and 1.5.0 on Linux x64; older explicit versions are unverified on macOS and Windows. - A missing, unparsable or older version throws `RuntimeFailureError` with `failure: "invalid_request"`, naming the actual and required versions. It was a plain `Error` before. - The default path without `command` still requires OAR's exact bundled Pi. ## Pi SDK and RPC recovery (#617) - A prompt Pi refuses before starting no longer strands queued input: the refusal is recorded and the queue drains. - A cancellation requested for a refused prompt no longer ends the next run. - On RPC, an abort during the terminal statistics window no longer kills a healthy child about 10 seconds later. - On SDK, disposing during pending admission now answers `disposed`, and a late failure cannot settle a later run started by an extension. ## Codex startup (#627) - A refused thread name no longer fails the open. Older app-servers lack `thread/name/set`, so every start with a `name` failed on them. Codex's error is now recorded as a `thread/name/set/error` frame with no events; a lost connection still fails. - The app-server now starts in `SessionOptions.cwd` rather than the host's directory, so stdio MCP servers and a relative `CODEX_HOME` resolve there. - **Behaviour change:** a session directory that does not exist now fails the open with `Codex session directory does not exist`. Codex 0.163.0 accepted that open before. ## Documented limits - Synchronous next prompt from a `turn_ended` observer stays unsupported on Pi SDK and RPC: status can read `idle` while `prompt` returns `busy`. Submit after the observer returns. The reasoning and what would reopen it are in `docs/design/decisions.md`. - Extension-handled input can leave status provisionally `running` with no native run; the gate itself still accepts the next input. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 5, 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_81ed11c88576b817a0148b45d8dc30d7"><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 --> Refresh the November 2-4 native runtime evidence and move the CodeBuddy ACP CI pin from 2.179.1 to 2.179.3. CodeBuddy's ACP controls and OAR suites pass; its duplicate immediate stream-json prompts remain documented. Existing assertions and deadlines stay unchanged. The dated Qoder failures remain as historical evidence. This branch now includes main's Qoder 1.1.81 CI pin (#623) and version-aware model confirmation (#624). Qoder 1.1.83's replay failure is still unresolved, so the newer version has no successful execution claim. The report distinguishes its HTTP 500 from the earlier 1.1.82 error 10500. Kimi's follow-up native investigation separates the original symptom from actual execution: 2.5.0 preserves initial MCP declarations while current resume configuration determines the executable tools. Omission or an empty list leaves advertised old calls failing; renamed tools execute without being advertised. The runtime page and dated report now state this precisely. CI remains at 2.4.1 until the same controls pass after an upstream fix. OAR neither filters declarations nor refuses all resumed MCP configuration. The Kimi and Qoder investigation reports, reproduction scripts and selected redacted evidence now live under `experiments/`. Public documentation links directly to these repository files, including the existing ModelProvider report. `docs/development.md` requires publicly readable evidence. The Qoder runtime page describes the model-confirmation fix already merged in #624; the dated November 4 report preserves its historical failure. The separate agy CLI 1.5.0 probe records only its network-isolated initialize handshake. The Antigravity transport migration stays in #622. Cursor SDK 1.3.1 has local login/configuration and offline summarize evidence only; the peer stays 1.2.0. The reports also retain Qwen boundaries, DSH watched-path comparisons and Windows observations. Validation: - New main baseline: full check passes (3,181 tests and 18 mock behavior cases). The original three commits have identical patches after rebase. Follow-up revisions clarify current Kimi and Qoder behavior and publish the supporting probes and selected evidence. - Dated native results remain unchanged: Claude 2.1.318, Qwen 0.26.7 and CodeBuddy 2.179.3 behavior/vendor controls passed. Both package builds passed in those runs. - Kimi 2.5.0's MCP declaration assertion and Qoder 1.1.83's execution failures remain in the evidence; no successful run is inferred from them. The Kimi follow-up compares 2.4.1, 2.5.0 and a diagnostic native copy using local scripted providers. - The copied native probes were rerun from their repository paths: Kimi 2.4.1 and 2.5.0 reproduce all four declaration/execution outcomes; guarded Qoder 1.1.81 reads the replay and succeeds, while 1.1.82 is refused during initialize without reading it. No account or paid inference was used. - Fresh cross-platform CI runs against the new baseline. Rebased onto main `91c626a5` after #626. Only the experiment index needed conflict resolution; both entries are preserved. Product, test and evidence patches are unchanged. The v0.87.1 release freeze has been lifted. --------- Co-authored-by: Otter <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 5, 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_c1339b6a99ab11eb9c07b3f21399bd15"><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 --> Adds the DSH (DeepSeek Harness) runtime, driving its native core with no ACP (task #159, requested by xxchan; probe in #607). **Shape:** one owned `dsh` process per session. OAR writes a small bridge plugin to a private temp directory and inserts it with `--patch`, so bundled and single-file hosts work and the user's DSH configuration is untouched. The bridge imports nothing from DSH; a test checks that. It forwards native events unchanged and calls native controls. It is an internal protocol, not a public one. **Versions:** a floor of `0.2.1-rc.5` with semver prerelease ordering, not an exact pin, for the same reason as #626: exact pins break every user upgrade. A method inventory runs at startup and at each agent open. A missing method makes that control absent or refused with its reason. **Supported:** open, resume, prompt, steer, queue and withdraw, abort, dispose, model and effort with read-back, usage, child attribution, `listModels`. Resume in a different directory is refused. **Refused with reasons until probed:** `systemPrompt`, `appendSystemPrompt`, `mcpServers`, `disallowedTools`, `launchArgs`, `serviceTier`, `additionalDirectories`, `outputSchema`, `name`, `userConfiguration: "exclude"`, `goals`, images. Login, auth status and account usage are absent. **Verified, Linux x64 only, loopback providers and synthetic keys:** | Version | Vendor | Shared behavior | | --- | --- | --- | | 0.2.1-rc.5 | 18/18 | 18 passed, 1 capability skip | | 0.2.2-alpha.2 | 18/18 | 18 passed, 1 capability skip | | 0.2.2-rc.1 | 18/18 | 18 passed, 1 capability skip | `CI=1 pnpm run check` passed at this head. Guards were reverted one at a time, across both rounds, and tests went red. **Real provider:** Bugen ran this branch at `d6e41da` on Linux with a real DeepSeek API key (pay-per-use, not a first-party plan), model `deepseek-official/deepseek-flash`, effort low, on dsh 0.2.2-rc.1 and 0.2.1-rc.5: inference, tool call, resume, mid-turn cancel and usage all passed. 0.2.2-alpha.2 was not run on a real key. **Windows:** the first CI run passed the real CLI's shared behavior suite. Its vendor failures trace to this PR's fixture, which read a Windows-only `skill-catalog` reminder as the prompt; the unit job's `EPERM` cleanup cause is not proven. All are fixed in this head and await this CI run. **Not verified:** macOS has not run the real CLI yet. Compaction events are covered only by unit tests against source shapes. Pipe backpressure with a slow host and crash flush timing remain open. The daily check is not wired yet. Native findings are recorded in `docs/runtimes/dsh.md`: dispose clears the queue, DSH silently retries 429 and 5xx, and a settled background child starts a parent turn of its own. `sameDirectory` moved to `shared/same-directory.ts`, unchanged. Outside new files, tests only gain a `dsh` row. The DeepSeek logo comes from the pinned LobeHub commit, with the `NOTICE.md` line. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hosts that pass their own Pi CLI currently fail whenever it differs from OAR's embedded dependency. Explicit subprocess commands now accept stable Pi 1.4.0 or newer; the default bundled path still requires its exact dependency version. One guard checks both
--versionbefore launch and the extension's in-session version report, with a typedRuntimeFailureErrornaming the actual and required versions on refusal.The floor follows native evidence with OAR embedding 1.5.0: explicit CLI 1.4.0 and 1.5.0 each pass the 95-case RPC vendor suite and 17 behavior cases (two capability skips). The bundled 1.5.0 vendor baseline also passes. The suite's deliberate command-failure and bundled-host controls retain their own selection; these totals are not 95 launches of the selected explicit CLI. A shared test selector lets daily inspection run the newest explicit CLI without changing OAR's dependency. A new Ubuntu
pi-rpc-minimumjob installs exact 1.4.0 outside the workspace and runs both suites throughOAR_PI_RPC_COMMAND. Future floor changes must update that pin andPI_RPC_MINIMUM_VERSIONtogether; the required CI count is now 36.Validation: 22 version regressions cover both admission boundaries, including an extension version different from the successful executable probe. Five mutations are detected, including restoring exact-match admission and skipping the extension check. Full check on the new main passes (3,181 tests and 18 mock cases); build and clean packed installation pass. The new job's installation and both test commands also pass locally. Future-version admission uses protocol fixtures. Explicit old-version native evidence is Linux-only; macOS and Windows remain unverified. Evidence and reproduction:
experiments/pi-rpc-version-floor-2026-11-05.md.Fixes #621.