Repository navigation
v2.18.0 — Bug fixes, VLP/adjacency corrections, spec-hygiene gates
v2.18.0 (2026-09-07)
Bug fixes across Cypher VLP, adjacency indexing, SQL bridge, and spec-hygiene gates
27 previously-failing tests now pass. Key fixes: BuildKG never populated ^KG for
default-graph edges (IRIS SQL %GetData returns $C(0) for empty-string VARCHAR NOT NULL,
not ""); VLP source-ID extraction heuristic picked the property-key string instead of the
node ID; SQL bridge had column-name typos unreachable without a live container. Five
spec-hygiene gates added to prevent these categories of regression.
Fixes
TraversalBuild.BuildKG:$ZStrip(edgeGraph, "*C")strips the$C(0)sentinel
before comparing to"", so default-graph edges are now correctly written to
^KG("out", 0, s, p, o). Without this,sync()/BuildKGran without error but
left^KGempty, silently breaking all multi-hop BFS and variable-length-path queries.LedgerApply.OpCreateRel: missing)inWriteAdjacency(...)call (introduced by
spec-214 graph-param addition) — caused compile error at container startup that was
swallowed by|| true. Fixed toWriteAdjacency(tS, tP, tO, ..WeightOf(tQuals), tGKey).- VLP source-ID extraction (
_engine/query.py): replaced broken "first SQL param
that isn't a schema name" heuristic with full-SQLDISTINCT source_alias.node_idquery
using all original params. The old heuristic picked'id'(a property key string) as the
source node ID whenrdf_propsJOINs appeared before the Cartesian JOIN boundary.
Also added fast-path forWHERE source_alias.node_id = ?patterns to avoid a DB round-trip. _engine/fhir.pycolumn name typos:sqlid_column→sql_table+id_column,
viavia_source→via_sourcein three SQL statements. CausedSQLCODE -29on all
map_sql_tableandlist_table_mappingscalls.- IVF Cypher translation:
kg_IVF(?, ?, k, nprobe)parameters now inlined as SQL
literals — IRIS does not support?parameters insideJSON_TABLE(stored_proc(...)). - String subscript (
'hello'[1..4]): routes toSUBSTRINGinstead of JSON array
logic when base is a string literal. - VLP relationship property filter (
[r*1..2 {weight: 10}]): applied in
_execute_var_length_labeledvia incoming-edge qualifier lookup; was silently ignored. - Label isolation JOIN for mapped SQL table nodes:
translate_node_patternnow skips
rdf_labelsJOIN for nodes registered inmapped_node_aliases— external SQL tables
have nonode_idcolumn, causingSQLCODE -29. test_attrs_roundtrip:attrs.error→attrs.get("error")(dict, not object).bm25_buildtest:"node_id, text"→["node_id", "text"](list, not string).test_store_protocoltest sync:TestPurgeRawBefore,TestDropGraph,
TestUpdateSpoUniqueConstraintupdated to match current implementation semantics
(PurgeResultreturn type, multi-step FK-safe delete, 3-execute DROP+ADD sequence).
Spec-Hygiene Gates (Principle VIII — constitution v1.3.0)
Four gates added to prevent the root-cause categories from recurring:
- Gate 1 (
tests/conftest.py): missing IRIS container →pytest.failinstead of
pytest.skip. Silent fake-green is no longer possible. - Gate 2 (
scripts/enterprise-container.sh):compile-allexits non-zero on any
ObjectScript compile error;|| trueremoved fromupsequence. - Gate 3 (
scripts/enterprise-container.sh): adjacency smoke test on every container
startup —create_edge+sync()+ BFS, asserts result non-empty. - Gate 4 (
tests/unit/test_store_protocol.py,tests/unit/test_spec_hygiene_gates.py):
test_mock_has_all_protocol_methodsusesinspectto diffGraphStoremembers against
MockGraphStoreat unit-test time (no container).test_fhir_sql_columns_match_schema
parsesINSERT/SELECTDML infhir.pyand cross-references column names against
CREATE TABLEinschema.py.