fix(pipeline): escape dynamic edge properties as JSON#1065
Open
tmonestudio wants to merge 1 commit into
Open
Conversation
Escape import aliases and GraphQL operation strings before serializing edge properties, preventing raw control characters and quotes from producing malformed JSON. Add a multiline GraphQL regression fixture and assert that emitted edge properties remain valid JSON. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: tmonestudio <tmonestudio@users.noreply.github.com>
a88ccc4 to
67433fc
Compare
Owner
|
Thanks for the focused JSON escaping fix. This is a high-priority 0.9.1-rc graph-correctness PR. Review will verify that dynamic edge properties are escaped identically in sequential and parallel paths and that quotes, backslashes, control characters, and non-ASCII values remain valid round-trip JSON. |
isc-tdyar
added a commit
to isc-tdyar/codebase-memory-mcp
that referenced
this pull request
Jul 14, 2026
Add cbm_pipeline_set_version() to stamp a version label (e.g. '28.0', '30.0') on every node emitted during indexing. Versioned runs bypass the incremental path so both versions accumulate side-by-side in the graph. Add diff_versions MCP tool: given a project, from_version, and to_version, returns added and removed node names (default label: Class, limit 500 per side) using OPTIONAL MATCH anti-join queries. Also auto-derives version from trailing numeric path segment in index_repository (e.g. /exports/MyApp/28.0 → version='28.0') when the version param is omitted. Refs DeusData#1065 Signed-off-by: Thomas Dyar <tdyar@intersystems.com>
isc-tdyar
added a commit
to isc-tdyar/codebase-memory-mcp
that referenced
this pull request
Jul 14, 2026
Add cbm_pipeline_set_version() to stamp a version label (e.g. '28.0', '30.0') on every node emitted during indexing. Versioned runs bypass the incremental path so both versions accumulate side-by-side in the graph. Add diff_versions MCP tool: given a project, from_version, and to_version, returns added and removed node names (default label: Class, limit 500 per side) using OPTIONAL MATCH anti-join queries. Also auto-derives version from trailing numeric path segment in index_repository (e.g. /exports/MyApp/28.0 → version='28.0') when the version param is omitted. Refs DeusData#1065 Signed-off-by: Thomas Dyar <tdyar@intersystems.com>
isc-tdyar
added a commit
to isc-tdyar/codebase-memory-mcp
that referenced
this pull request
Jul 15, 2026
Add cbm_pipeline_set_version() to stamp a version label (e.g. '28.0', '30.0') on every node emitted during indexing. Versioned runs bypass the incremental path so both versions accumulate side-by-side in the graph. Add diff_versions MCP tool: given a project, from_version, and to_version, returns added and removed node names (default label: Class, limit 500 per side) using OPTIONAL MATCH anti-join queries. Also auto-derives version from trailing numeric path segment in index_repository (e.g. /exports/MyApp/28.0 → version='28.0') when the version param is omitted. Refs DeusData#1065 Signed-off-by: Thomas Dyar <tdyar@intersystems.com>
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 does this PR do?
Prevents malformed JSON in edge properties when extracted values contain quotes, CR/LF, or other control characters.
Two edge builders serialized parser-derived strings directly:
local_namewithout escaping;A multiline Rust import alias or GraphQL operation could therefore make
json_valid(properties)=0, and JSON-backed SQLite checks/queries could fail withmalformed JSON.Fix
Use the existing
cbm_json_escapehelper for both dynamic values before formatting the properties object.The regression fixture uses a multiline GraphQL operation and asserts that every emitted edge property remains valid JSON.
Validation
PRAGMA quick_checkandjson_validafter reindexing affected repositories.Checklist
git commit -s)make -f Makefile.cbm test(left to CI; local Windows sanitizer runtime is unavailable)