Conversation
tt-a1i
approved these changes
Sep 13, 2026
tt-a1i
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed at ad0fc65.
This preserves bounded, sanitized provider failure diagnostics across live events and reload while keeping canonical runtime state, model-visible context, and operator-facing UI projections distinct. Failed and aborted outcomes remain separate, and retry completion clears stale diagnostic state.
Local validation: bun run check passed; 94 focused protocol/pi-runtime/web-host Node tests and 146 focused UI tests passed. Hosted CI is green.
Non-blocking follow-up: add a real fixture that streams partial assistant text and then fails, asserting the live SSE state before snapshot polling and the retained incomplete/failure state after reload.
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.
Problem
Closes #469.
The Web message projection drops an assistant response's
stopReasonanderrorMessage. A provider failure with empty content can therefore look like no response, and the reason disappears from SSE and snapshot views. Retry completion also leaves stale retry state visible.Value
Users can see why a response failed, distinguish failure from cancellation or uncertain settlement, and recover the diagnostic when reopening the Session.
Approach
Preserve bounded, plain-text assistant diagnostics through projection, SSE, and snapshots. Render the outcome and reason for failed or aborted responses, including partial content. Include the outcome in transcript deduplication so empty failures do not collapse together. Project retry completion and clear its live state, display failed/uncertain turn settlement in Composer, and rebuild committed Web assets.
Validation
bun run check,bun run typecheck, andgit diff --check: passed.bun run teston Windows / Node 24.14.0: 1,516 passed, 2 failed, 10 skipped. The failures were the existinggit-info/process.test.ts1-second process timeout andworkflows/execute.e2e.test.tsdetached-workflow settlement timeout, also seen on the audit baseline. The runner stopped before its later Windows serial and Vitest partitions. Full local suite success is not claimed.Impact