Skip to content

fix(javascript): retain shorter literal metadata encodings - #1408

Merged
N0zoM1z0 merged 1 commit into
mainfrom
fix/javascript-short-literal-metadata
Oct 10, 2026
Merged

N0zoM1z0 merged 1 commit into
mainfrom
fix/javascript-short-literal-metadata

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

#1407 removes large literal payload copies, but an always-hashed key and string literal label expand small values such as "ok". Compare the complete JSON representation with the digest/type representation and keep the shorter one. Exact values stay in properties.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:

  • 56 focused tests on the current main base: semantic graph builder and real compiled CLI/default SDK stdio MCP regression, including typed 1/"1" seeds, empty strings and trace/ping continuation.
  • npm run check:fast (normal pre-push hook).
  • Integrated verification includes the provider Evidence deduplication changes that landed alongside fix(javascript)!: stop copying literals into semantic metadata #1407.

Static JavaScript change; no Hopper/Ghidra verification required. New IDs for hashed large literals remain documented; existing stored graphs continue to work.

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 N0zoM1z0 added bug Something isn't working area: domain Domain logic, errors, and pure functions labels Oct 10, 2026

@N0zoM1z0 N0zoM1z0 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
N0zoM1z0 marked this pull request as ready for review October 10, 2026 03:23

@N0zoM1z0 N0zoM1z0 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@N0zoM1z0
N0zoM1z0 merged commit de8fc67 into main Oct 10, 2026
19 checks passed
@N0zoM1z0
N0zoM1z0 deleted the fix/javascript-short-literal-metadata branch October 10, 2026 03:23
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant