Repository navigation
fix(pi): stop marking recovered turns as failed - #24805
KyrosHendrix wants to merge 3 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused Pi adapter bug fix that separates transient message errors from terminal failures so recovered continuations persist as completed. It changes one production adapter and adds targeted unit and orchestration regression coverage without altering schemas, defaults, infrastructure, or static-analysis settings. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by Verified in a real dev environmentverified as-is at used repository playwright with reproduction: disable pi's automatic retries, start a long response, click "steer message" with read-only sqlite inspection after the ui completed: neighboring checks on the pr: disconnecting pi without a steer still failed; "stop generation" persisted interrupted; another message after stop completed with blacksmith screenshots use matching prompts and response data. the recording shows the steer and successful continuation; loading screens were removed. uploaded images, video playback, and seeking were checked in chrome. Not verified
|
|
Following up on this fix. I am still encountering the reported bug. Could a maintainer take another look? A fresh source review against Re-reviewed PR head Fresh verification on the unchanged PR head:
This follow-up includes source review and focused tests, not a new live-provider or UI reproduction. The earlier live verification in #24805 (comment) remains relevant. @juliusmarminge, since you've worked on Pi's compaction and steering behavior, could you take a look when you have time? |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drop the replay-fixture case that repeated the adapter test one layer up, and the table rows that a sibling row or unchanged code already covers. Co-Authored-By: Claude Opus 5.5 <[email protected]>


Pi can finish a native continuation successfully while T3 persists a failed run and reports an earlier "This operation was aborted" message. The adapter retained an intermediate assistant error unless Pi emitted a specific retry-recovery event.
Track the latest assistant message failure separately from terminal failures. A successful assistant response clears the stale message error without clearing rejected prompts or exhausted retries. Explicit cancellation remains interrupted.
This is submitted under the small, focused obvious-bug exception. It corrects existing turn-completion bookkeeping, with no new feature, setting, contract, or database migration. The diff contains only the Pi adapter and regression tests for this defect.
Reproduction and evidence
The new orchestration regression replays this sanitized sequence through provider stdio, the real adapter, orchestration, persistence, and projections:
With only the production adapter restored to the original base, the regression failed with
expected [ 'failed' ] to deeply equal [ 'completed' ]. The same test passes with the fix. Adapter regressions also failed before implementation for recovery with and without compaction and for replacing an old error with the latest error.Verification
Refreshed against upstream
a96cf0818eff. Environment: Windows, Node 24.20.0, Vite+ 1.3.0.layerandDurationwarnings remain.vp run check:changedwas attempted but did not finish within 120 seconds; it printed the three-file change header without a step summary. It is not claimed as passing. A wider Pi-package run also hit Windows subprocess-fixture failures, including two status/discovery failures independently reproduced with the original adapter. These unrelated failures are not changed here. No live model-provider or browser verification ran. The original native abort trigger is not established, and historical failed turns are not rewritten.Implemented and verified with
openai-codex/gpt-6.1-solin pi.