Repository navigation
fix(javascript)!: stop copying literals into semantic metadata - #1407
Merged
Merged
Conversation
Commit literal values with canonical JSON SHA-256 in semantic role keys and use a type label for strings. Preserve complete values, provenance and literal queries while avoiding two payload copies in each string node. Verify real compiled CLI/default stdio MCP, typed union seeds, empty strings and trace continuation with a large source-owned fixture. Refs #723 BREAKING CHANGE: Newly produced semantic literal node IDs use value-sha256 role keys, and string labels read "string literal". Read exact values from properties.value and obtain node IDs from the selected parent graph. Previously stored Evidence and its original IDs remain valid.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
…to#1407) Commit literal values with canonical JSON SHA-256 in semantic role keys and use a type label for strings. Preserve complete values, provenance and literal queries while avoiding two payload copies in each string node. Verify real compiled CLI/default stdio MCP, typed union seeds, empty strings and trace continuation with a large source-owned fixture. Refs morluto#723 BREAKING CHANGE: Newly produced semantic literal node IDs use value-sha256 role keys, and string labels read "string literal". Read exact values from properties.value and obtain node IDs from the selected parent graph. Previously stored Evidence and its original IDs remain valid.
5 of 16 tasks
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.
Large JavaScript literals are copied into
identity.role_keyand the string label as well asproperties.value. A source-owned 2.10 MB file with a 1,572,864-character literal produces 7.00 MB CLI JSON and an oversized default MCP response. Commit the canonical JSON value by SHA-256 in the role key and usestring literalfor the display label. Keep the exact value, binding/property role, artifact hash, source range, Evidence, and literal-query behavior.Refs #723. This fixes producer-side repetition; the broader discovery/text/structured design remains open. It does not establish the private-bundle crash cause in #1387.
On the same owned fixture, bounded Linux x64:
Both runs retain the exact literal and the same four semantic nodes/two relations. Node 24.18.0 and 22.22.2 MCP runs verify full value preservation, retained-reference semantic tracing, summary, and subsequent ping. These are serialized-size measurements, not observed model-host token counts or billing.
Validation:
npm run test:focused -- tests/boundary/mcp/javascriptLiteralPayload.test.ts src/application/javascript/JavaScriptSemanticGraphBuilder.test.ts tests/boundary/javascriptSemanticTraceEvidence.test.ts: 56 passed; the final E2E also checks typed1/"1"seeds and the empty string.npm run check:fast.Compatibility: breaking metadata change, marked
!. New literal node IDs usevalue-sha256role keys; string labels becomestring literal. Read exact values fromproperties.valueand obtain IDs from the selected parent graph. Existing stored graphs remain valid. Request/output schema shapes, complete Evidence, and text/structured equivalence are preserved; no caps or truncation are added.Follow-up: the shorter-encoding refinement was not part of this merged head. It is tracked in #1408 to retain short literal keys/labels while preserving the large-payload reduction.