Repository navigation
fix(javascript): retain shorter literal metadata encodings - #1408
Conversation
Choose the shorter complete JSON or digest key and string display label. Short values keep their existing identities and labels, while large values retain the payload-copy reduction without an arbitrary truncation limit.
N0zoM1z0
left a comment
There was a problem hiding this comment.
Reviewed ba1db3c. The encoding choice compares complete representations rather than imposing a payload cap: short values retain their existing keys/labels, and large values remain complete in properties.value. The current-main CLI/default SDK stdio regression preserves exact values, artifact/source provenance, typed literal selection and subsequent trace/ping; all 56 focused tests and static checks pass. Keeping this draft until final-head cross-platform CI completes.
N0zoM1z0
left a comment
There was a problem hiding this comment.
Final head ba1db3c: all 19 checks pass, including Windows package/native boundaries on Node 22/24. Local current-main verification passed 56 tests; real stdio MCP preserves the complete large literal and trace/summary/ping. Short metadata remains compact and existing Evidence stays valid. Ready for merge.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
#1407 removes large literal payload copies, but an always-hashed key and
string literallabel expand small values such as"ok". Compare the complete JSON representation with the digest/type representation and keep the shorter one. Exact values stay inproperties.value; no limits or truncation are introduced. Short literal IDs and labels from 6.3.0 are preserved.Follow-up to #1407; refs #723. On the owned
"ok"fixture, CLI JSON drops from 37,601 to 37,522 bytes; the role key shrinks from 129 to 56 characters and the original label returns. The large fixture still retains the complete 1,572,864-character value with the earlier 69% CLI reduction and default stdio MCP recovery.Validation:
1/"1"seeds, empty strings and trace/ping continuation.npm run check:fast(normal pre-push hook).Static JavaScript change; no Hopper/Ghidra verification required. New IDs for hashed large literals remain documented; existing stored graphs continue to work.