Repository navigation
perf(sessions): omit provider signatures from browser payloads - #1193
Open
nannant666 wants to merge 1 commit into
Open
nannant666 wants to merge 1 commit into
nannant666 wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Opening a session currently sends provider continuation state with the browser transcript, including when thinking text and media are deferred. For OpenAI Responses,
thinkingSignaturecan be a serialized reasoning item containingencrypted_content; that opaque payload can dominate the response although the browser only renders the thinking summary, answer, and tool input.This change removes
thinkingSignature,textSignature, andthoughtSignaturefrom browser display copies. Persisted messages and SDK/model context keep their signatures so provider continuation and session restoration remain intact.Implementation
message_update.Reproduction
/api/sessions/<id>?deferThinking=1&deferMedia=1&tree=summary&force=1.context.messages[*].content[*]: thinking text may be deferred whilethinkingSignaturestill carries the complete provider reasoning item. Assistant SSE completions and reconnect snapshots can send the same state again.After this change the browser payloads omit those block-level signatures. The original session entries remain suitable for provider replay.
Measured effect
The same two fixed private session snapshots were served before/after using isolated 0.11.1 builds with Pi 1.1.0 and the same request parameters above:
History, full-tree, and older-context responses all had zero provider signatures after projection. After removing only those fields from the original responses, all six response hashes matched the new responses; the snapshot file hashes also remained unchanged. These are payload reductions, not measurements of total browser opening time. No private transcripts or signature values are included in this PR.
Validation
tsc --noEmitandnpm run lint: pass on the PR branch.894e1a2: one read-only directory expectation under uid 0 and three worktree cases requiring Git--path-format, unavailable in this environment’s Git 2.30.2. No unrelated worktree or permission changes are included.All committed automated fixtures are synthetic.