Skip to content

fix(pi): release settled turns before notifying observers - #617

Open
stamp-build[bot] wants to merge 1 commit into
mainfrom
agent/otter/pi-turn-release
Open

stamp-build[bot] wants to merge 1 commit into
mainfrom
agent/otter/pi-turn-release

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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


When a host submits its next prompt synchronously from Pi's turn_ended observer, status already says idle but SDK/RPC still reserve the previous run and reject the prompt as busy. Release that run before publishing the terminal frame, then drain held inputs. An observer's new prompt or compaction cannot overtake held inputs, and an observer's queue call joins the tail. RPC replies are scoped to their original launch so a late handled/refused response cannot clear the next run.

Pi Durable uses a separate native submission queue and record fold. Its existing path passes the same native observer control; its product code is unchanged. Document Pi SDK/RPC alongside the existing held-queue exception: while OAR holds input, status can briefly show idle even though prompt is busy. Recording that queue's ownership is separate work.

Validation:

  • Full check: 3,152 tests and 18 mock behavior cases passed; build passed.
  • Eleven unit regressions cover synchronous continuation, prompt/queue/compact FIFO, old SDK rejection and delayed RPC responses. Nine targeted rollback mutations fail these assertions.
  • Native Pi SDK/RPC 1.5.0 reproduce the rejected continuation before the fix and pass all three observer/FIFO controls afterwards. Durable 1.4.0 passes its independent continuation control.
  • Full vendor suites passed: SDK 100, RPC 98, Durable 26. All three Pi behavior backends passed. Native tests use the local scripted provider with explicit response gates.

Task #162. This is a separate follow-up to #614; merge after the 0.87.0 release hold lifts and this head passes review and CI.

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