Repository navigation
Conversation
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.
Context
Focused follow-up on e2e-inc#1151 by TheTuso, addressing maintainer okwasniewski's latest review. This draft's base is exact upstream PR head
4c095a6592ed49e956fee54e069f58c0bff9cc9d; please cherry-pick/reapply on the existing upstream PR, not create a duplicate origin PR.The review verified the signed-thinking fix, and specifically requested:
shrinkForOverflow's identity-preservation helpers now that the comparison is by value.Patch
message-shape.ts: compute a fixed 64-character SHA-256 digest by streaming the same serialized field delimiters and binary bytes tocreateHash; model-visible data is hashed synchronously, so a later mutation changes the next digest. IgnoreproviderOptionsandproviderMetadataexactly as before.tool-loop.ts: restore the original concise overflow compaction implementation, removing now-redundantclippedandclippedTexthelpers.Evidence and remaining gate
message-shapetests and current default-branch overflow implementation.message-shape.tsalgorithm: 5/5 assertions (clone equality, 2 MiB binary byte mutation, metadata exclusion, nested tool-result change, 64-character digest). 200 SHA-256 snapshots of a 2 MiB message took 277 ms total (~1.385 ms each) on the sandbox CPU. This is not an e2e benchmark or baseline comparison.pnpm check, Vitest and model-backed testbed not run in this sandbox (repository dependencies unavailable, network disabled); CI/author required before promoting.Credit: TheTuso built the original signed-history fix and regression cases; okwasniewski diagnosed and reproduced both remaining cleanup/memory concerns. This is a small helper patch for that existing work, not a competing implementation.
Coordination: #12