Skip to content

neo4j: Data_Bank is set once on create, never reset by a re-ingest - #1762

Merged
Evanfeenstra merged 2 commits into
mainfrom
fix/data-bank-on-create
Oct 11, 2026
Merged

Evanfeenstra merged 2 commits into
mainfrom
fix/data-bank-on-create

Conversation

@Evanfeenstra

@Evanfeenstra Evanfeenstra commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

NodeQueryBuilder::build() put Data_Bank = name into $properties and ran ON MATCH SET node += $properties, so an incremental sync of a file reset every one of its nodes' search text to the bare name while text_embeddings and _search_fields_used survived — a vector that no longer matched its text, and jarvis's data_bank_full_index back to name-only (Problem 5 in stakwork/strut plans/semantic-search.md; built by stakwork/strut#140).

Data_Bank now stays out of $properties and is seeded from the map's name under ON CREATE alone (node.Data_Bank = $properties.name — no new parameter; the binder already passes the whole map), like date_added_to_graph: the same set-once rule, for the same reason. A streamed node is searchable at once as before; a later writer — strut's embedding pass, jarvis — composes the richer text from the type's Schema index fields, and a re-ingest of an unchanged function touches nothing it reads. An unnamed node seeds no search text, as before. build_stream() was already ON CREATE only and is untouched.

Without this strut is still correct (its pass sees the reset text as stale and re-embeds the node), but a full re-ingest would re-embed every code node of the repository each time.

Test: build_sets_data_bank_only_on_create_and_keeps_it_out_of_properties, beside the existing set-once tests (cargo test -p ast --lib --features neo4j build_sets). cargo fmt --check on the file reports a pre-existing diff in read_probe_date_added, not touched here.

Also bumps mcp's strut pin to a50eb64, the merge of stakwork/strut#140 (the only changes between the previous pin and it are that PR and its plan documents, #138 and #139). So this is the pin that puts the embedding pass, the Schema index reconcile and the typed-search routing on every swarm at its next deploy — the swarm38 validation in the plan starts after it.

The node MERGE put `Data_Bank = name` into $properties and ran
`ON MATCH SET node += $properties`, so an incremental sync of a file reset
every one of its nodes' search text to the bare name while text_embeddings
and _search_fields_used survived — a vector that no longer matched its text,
and jarvis's data_bank_full_index back to name-only. Data_Bank now stays out
of $properties and is seeded from the map's name under ON CREATE alone, like
date_added_to_graph (the same set-once rule, for the same reason): a later
writer — strut's embedding pass, jarvis — composes the richer text from the
type's Schema index fields, and a re-ingest of an unchanged function touches
nothing it reads. build_stream() was already ON CREATE only.
… typed search through the domain indexes, the no-embed mark — stakwork/strut#140)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant