[codex] fix node label lookup normalization#1353
Merged
Merged
Conversation
15572a6 to
fe23d7d
Compare
galshubeli
added a commit
to galshubeli/graphify
that referenced
this pull request
Jun 17, 2026
Resolve 39 conflicts, reconciling the FalkorDB migration (cache-free GraphStore, no networkx) with v8's improvements: - pyproject: keep falkordb + numpy (v8's _minhash replaced datasketch); drop networkx + datasketch. - build.py: keep v8's dedupe_nodes/dedupe_edges helpers + Graphify-Labs#1257 ghost-collision tracking + Graphify-Labs#1327 AST-origin skip, adapted to node_attrs (no in-memory G during build); keep the GraphStore build_from_json. - serve.py: adopt v8 label_tokens matching (Graphify-Labs#1353) + community_name (Graphify-Labs#1305) on the cache-free _find_node/_tool_get_node paths. - analyze.py: keep the simpleCycles UDF path (max_cycle_length bounds it like v8's length_bound Graphify-Labs#1196). - export.py: keep store-native to_json; fold in v8 community_name (Graphify-Labs#1305). - global_graph.py: keep the GraphStore batch path; adopt v8 remap-and-rewire of deduplicated externals. - affected.py: keep FalkorDB connect_graph + find_node_ids; adopt v8 normalized + bare-name matching (Graphify-Labs#1353) in the in-memory fallback. - __main__.py: keep _connect_graph loading; preserve v8's Graphify-Labs#1019 huge-graph html guard by node count; adopt community_name in explain. - skill docs regenerated from the merged update fragment (prune = deleted + changed, Graphify-Labs#1178); update goldens blessed. - ci.yml: FalkorDB service container. - tests resolved to the migration versions (seed_graph/store/nxcompat); v8's graph.json-loading tests no longer apply. Verified: package imports, zero runtime networkx, 279/280 merge-relevant tests pass (1 env tree-sitter fail). Remaining full-suite failures are pre-existing env (missing tree-sitter parsers) — test_watch prune-edge-case fails at the pre-merge commit too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
galshubeli
added a commit
to galshubeli/graphify
that referenced
this pull request
Jun 17, 2026
The v8 merge folded label_tokens matching (Graphify-Labs#1353) into _find_node, but the cache-free rows are (id, norm_label) tuples with no `d` in scope — a NameError on every _find_node call (explain / get_node / score). Carry the raw label in rows (3-tuple) and tokenize that, mirroring _score_nodes. This fix existed in the working tree but was not staged into the merge commit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Summary
Fixes node lookup for labels with Unicode normalization differences and full labels that include punctuation.
Root cause
Two lookup paths normalized queries and labels differently:
serve._find_node()tokenized the query but compared it mostly against labels that still kept punctuation, so full labels such asSkill /auditar — Auditoría inquisitiva de enlacescould miss.affected.resolve_seed()used plain.lower()comparisons, so an NFD query copied from macOS could fail to match an NFC graph label.Changes
_find_node()queries against tokenized labels while preserving exact, prefix, and substring ordering.affected.resolve_seed()label/source matching.Validation
python -m pytest tests/test_serve.py tests/test_affected_cli.py -qpython -m graphify update .Note: local
ruffvalidation was not available in this Windows environment (ruffmodule missing anduvnot in PATH). CI for this repo runs pytest via uv.