Repository navigation
Conversation
Malformed provider calls could survive in live context and make every later Continue fail during local preflight. Reject malformed batches before execution and repair only the model-facing history projection. Keep completed tools and durable transcripts intact, and ensure optional usage estimation cannot suppress terminal tool events. Cover repeated manual continuation through the real loop and offline sidecar transport. fixes vastsa#1941
Refresh the published recovery candidate against current upstream main without rewriting the shared branch before validation.
Keep the localized specification mirror and E2E table shape aligned with the authoritative recovery contract so documentation gates cover the same scenario in both locales.
vastsa
left a comment
There was a problem hiding this comment.
Verified the reported failure against the runtime path: malformed tool-call context can fail local preflight before the provider is reached, and optional token estimation could suppress the terminal tool event. This change rejects the unexecuted malformed batch, strips only malformed calls and associated results from later model projections, and preserves durable transcripts and valid history. The agent-runtime suite (1,534 tests), runtime typecheck, production bundle, diff check, and latest-main ancestry check passed on the candidate. The production sidecar E2E was not completed in this environment after pnpm began populating a second worktree dependency tree; the PR records 10/10 offline scenarios on its integration candidate. Latest main changes since that candidate are limited to transcript scrolling and do not touch this runtime path. Thanks for the thorough regression coverage and recovery handling.
|
Thank you for the careful reproduction and the broad regression coverage. The malformed batch is now rejected before execution, and recovery keeps valid history and the durable transcript intact. I merged this after updating the candidate to the latest main and reviewing the runtime tests and production bundle. |
A malformed tool-call name, ID, or argument object can survive in a reused runtime and make every later Continue fail in local context preflight. Reject the unexecuted malformed batch as one local error before any tool runs, and exclude malformed calls and their associated results from subsequent model-context projections.
The recovery also covers retained compaction tails and resumed delegates. Valid history, system updates and completed tools remain intact; durable transcripts are not rewritten. Optional token estimation can no longer suppress a terminal tool event. Ordinary tool-schema failures keep Pi's existing feedback path, and unrelated malformed hosted-search context still fails strict validation.
Fixes #1941.
Validation
5dfa023d8881f00da1d608cd40994e72e756d9ee: all 9 initial regression cases failed, including three consecutive manual Continue failures before the provider was reached.test:e2e:hosted-search: 10/10 scenarios passed, including one or three consecutive malformed Responses outputs followed by three successful Continue prompts. The corrected Read executes exactly once and the same runtime is reused.check:pr-base, focused Biome lint, JavaScript syntax checks andgit diff --checkpassed. Documentation checks verified 86 English/Chinese pairs and 593 pages, including the synchronized scenario mirrors.Task candidate:
c8b030581d27008afa29221a89220b06174687cbBase main:
49f23668d7c770446f1783422d3e9a15cf22079bPR integration candidate:
81227dd769f87f499a993076bb0d2ffb98a242c7; its complete tree equals the tested task candidate (04681028ce190204c9b0a56f2b4325d09dcddf25), verified locally after fetching the GitHub merge ref.Environment: macOS arm64, Node 26.12.1, existing host dependencies reused, cached pnpm 10.33.0 with version switching disabled, all three Pi packages pinned/installed at 1.3.0. No second dependency environment was installed.
The runtime spec and semantic E2E scenario/traceability entry are updated. No dependency, persistence format, public IPC contract or permission boundary changes.
Native UI clicking and live providers: NOT RUN; this runtime-only fix is covered through the public prompt entry and production sidecar transport with loopback SSE and a synthetic Host, without user sessions or live credentials.