Repository navigation
fix(backends): preserve provider transcripts across turns - #2103
Merged
Merged
Conversation
This was referenced Oct 16, 2026
schlessera
force-pushed
the
fix/2049-preserve-provider-transcript-p0204916
branch
from
October 16, 2026 12:33
3b140e5 to
395ff3a
Compare
schlessera
changed the base branch from
main
to
fix/2047-stable-session-context
October 16, 2026 12:36
schlessera
added this pull request to stack #2136
October 16, 2026 12:36
6 of 7 tasks
schlessera
marked this pull request as ready for review
October 16, 2026 12:40
This was referenced Oct 16, 2026
schlessera
removed this pull request from stack #2136
October 16, 2026 12:46
schlessera
marked this pull request as draft
October 16, 2026 12:46
schlessera
changed the base branch from
fix/2047-stable-session-context
to
main
October 16, 2026 12:46
schlessera
force-pushed
the
fix/2049-preserve-provider-transcript-p0204916
branch
from
October 16, 2026 14:16
395ff3a to
d58edc0
Compare
schlessera
marked this pull request as ready for review
October 16, 2026 14:16
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.
Closes #2049
What changed
Claude and Pi keep runtime-written transcript bytes intact across turns. Host-owned replay metadata restores promoted file links and authoritative application receipts in UI history, including early direct effects with no native transcript. Pi may append a missing result only for an actual runtime-written application call after worker shutdown.
Why this shape
The provider transcript remains the runtime record; display mappings and host receipts belong to the UI replay layer. Both history readers retain the delivered UUID/digest-based user-text provenance from #2072. This ordinary PR contains only #2049 changes on delivered main, with the incoming context fixtures and CI updates preserved.
Proof
Current head
d58edc04f7f34a3b5250cd58d8037137ae28d3f4, base3031e31a11249a3ebcd53987e764a199b3af9925, treec12e0bc08af92a65a2ee63740f08f2f6156093ac.bun run check:pr --base origin/mainpasses: lint/leakage and 638 fast invariant tests / 3806 assertions.bun run typecheckpasses. The preserved own-layer patch applied cleanly; runtime history/worker sources equal their previously tested implementation. Upstream fixtures and CI changes remain intact.395ff3a0f3981f2da9cebb17aa6a4dc887a7a94aon parentb11c43ff08c9490f5acce54873682333b2a2601a: 123 tests / 493 assertions, types and parent-relative preflight passed. Deliberately restoring Claude transcript rewriting or Pi parent persistence failed the named request-prefix assertions; restored probes passed.371c5b51900cad8ff8ef1c335c553d38dcaebb47reproduced the stale saved-answer rewrite oracle, then independently proved the real-worker test rejects native JSONL byte changes and missing fresh UI display mappings. Restored focused worker/prefix/promotion controls passed 61 tests / 300 assertions. Related Claude/Pi fixtures were audited for the same stale expectation.cache_controlmetadata; the caching-disabled control checks raw serialized messages. These prove request assembly and replay, without claiming provider cache hits or savings.Prior receipts retain their original SHA attribution. Current hosted CI is pending; no cancelled native-stack run is claimed as passing. Following the current authorized merge workflow, prior passing runtime/mutation evidence plus focused current integration checks support review without repeating complete CI solely for base advancement.
Checklist
Anything left open
Current hosted checks are pending. Merge must respect actual branch protections and review requirements. Reconcile the delivered squash and run focused post-merge conflict checks if main advances; prior evidence is not relabeled as proof of another tree.