Repository navigation
fix(llm): preserve integer-zero vertex IDs - #398
bosprimigenious wants to merge 1 commit into
Conversation
Existing ID truthiness checks silently discard edges and primary-key aliases using integer zero. Keep zero without accepting False as an ID. Fixes apache#397 Signed-off-by: bosprimigenious <bosprimigenious@foxmail.com> Generated-by: OpenAI Codex
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: no. Score: 9/10. Summary: _has_vertex_id treats integer 0 as present in the vertex map, endpoint lookup and edge filter, while None, "", False and float 0.0 stay rejected, so 0 -> 1 edges and a 0 alias on a PRIMARY_KEY vertex survive extraction. Four of the new cases fail against the base source and all 46 pass at this head, and CI is green.
|
Hi @bitflicker64 — thanks again for the approval. Is there anything else you'd like on this one before it can land (more instances in the regression set, a different assertion shape, or a changelog/version bump for the module)? Happy to adjust; otherwise it should be ready to merge. |
imbajin
left a comment
There was a problem hiding this comment.
Score: 8.0/10 · Confidence: medium
Blocking: no
Summary
No new actionable finding in the extraction and alias-resolution changes. The shared presence predicate preserves integer zero while continuing to reject False, missing or empty IDs, and floating-point zero.
Evidence
Checked vertex normalization, endpoint resolution and normalized-edge filtering at this head. Eight isolated cases exercised the actual presence predicate. Current LLM, quality, CodeQL and CI Result checks are successful.
Validation notes
No local full operator suite or live database write-through was independently run. The downstream loader's pre-existing CUSTOMIZE_NUMBER handling remains outside this patch; extraction-only checks do not establish end-to-end numeric-ID writes.
Summary
Closes #397.
PropertyGraphExtract currently retains integer-zero vertices but silently discards their edges. A model-generated alias
0also fails to resolve to a PRIMARY_KEY ID.Use the same internal presence predicate for mapping vertices, resolving endpoints and filtering normalized edges. No public API, model, SDK, dependency or prompt change; this restores the existing single-operator ID contract rather than introducing a multi-file feature or cross-module design. The staged feature workflow is not claimed as approved.
Evidence
runpath drops an otherwise valid edge.False/0dictionary-key collision controls, missing zero vertices and integer/string zero distinction. Socket guard observes 0 connections.ruff check .andruff format --check .pass (581 files);ty checkon the changed source passes. Manifest ranges are unchanged, and this base has no tracked uv.lock.Configured required CI gates passed; ready for maintainer review. Exact-head workflow 41877038653 attempt 2 tests synthetic merge
9cac8edwith parents[3cea0068, 7f347be3]. Raw logs confirm:Remaining failures and scope: the full LLM
tystep reports 303 diagnostics and exits 1. This step is explicitly advisory (continue-on-error: true) in the repository workflow; it is not a passed type check and is not hidden by the aggregate success. The changed source's scoped ty check passes. Only the configured Linux/Python 3.12 CI leg was exercised; no broader platform/provider matrix is claimed. The separate existing numeric-ID write-through limitation inCommitToHugeGraphremains outside this PR, which only restores local extraction and alias resolution.Merge Danger
Door: two-way; no migration or stored-data changes.
Blast Radius: extraction. Integer-zero references can now retain edges that were previously discarded; existing nonzero/string IDs and invalid/missing-ID controls remain covered. This is not general ID validation and does not newly accept float
0.0.AI disclosure: patch, tests, analysis and this prose were prepared with OpenAI Codex. No human review is claimed. This independent bug is separate from the Ontogeny scope in #376/#380/#391, which already has public implementations.