fix(vscode): a more compact serializer outcome - #13758
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 126.7K · Output: 6.6K · Cached: 160.4K Review guidance: REVIEW.md from base branch |
marius-kilocode
approved these changes
Sep 3, 2026
This was referenced Sep 6, 2026
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.
What Problem This Solves
The tuple serializer introduced in #13733 repeats full JavaScript type names and array wrappers for every scalar, making Agent Manager’s internal change-detection keys unnecessarily long.
Why This Change Was Made
Use compact numeric type IDs and
id:payloadstring leaves while retaining the original recursive mapping, scalar conversion, negative-zero handling, and JSON escaping. This follows the compact-serializer discussion on #13733 without changing which supported, ordinary acyclic inputs produce equal keys.User Impact
Reduce internal PR-signature and filesystem-stamp key sizes without changing update detection or requiring stored-state migration. There is no visible UI change.
Evidence
The tuple
[0, -0, 0n, [1, 2, 3]]shrinks from 94 to 40 characters and UTF-8 bytes, approximately 57%. Every scalar occurrence saves 9–12 characters and bytes; arrays and holes add no new overhead, so array/hole-only inputs remain unchanged rather than becoming larger. Regression coverage checks scalar distinctions, exact bigints, signed zero/nonfinite numbers, escaped text, nesting, sparse holes, and structural equality across separate allocations.A before/after differential run using Bun 1.3.14 compared 596 cases, including a deterministic 546-entry sparse-tuple corpus, against keys captured from the original export. Both directions preserved all 397 equality groups: 547 cases became shorter and 49 stayed byte-for-byte identical.