Skip to content

Clear every derived structure cache per pathway (deltasignal specs/065 amendment 1) - #116

Merged
adamjohnwright merged 1 commit into
mainfrom
derived-caches-per-pathway
Oct 16, 2026
Merged

adamjohnwright merged 1 commit into
mainfrom
derived-caches-per-pathway

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Same defect as #115, found by reading neo4j_connector.py directly: _variant_leafsets_cache, _matching_leaves_cache, _handoff_leaf_cache, _sets_chosen_cache and the variant_keys memo are computed from getters that return empty outside the current pathway's prefetch, and are never cleared between pathways of a build.

  • Fix: clear them in prime_entity_caches. Caches filled by their own direct query (containing complexes, drugs, pathogens, form profiles, cofactors) are kept.
  • Test fails without the fix.
  • Measurement pre-registered in deltasignal specs/065 amendment 1; draft until measured.

🤖 Generated with Claude Code

…5 amendment 1)

The variant leaf-set, matching-leaf, hand-off leaf and set-chooser memos and
the variant_keys memo are built from getters that return empty outside the
current pathway's prefetch, and survived into the next pathway of a build.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@adamjohnwright
adamjohnwright marked this pull request as ready for review October 16, 2026 21:06
@adamjohnwright
adamjohnwright merged commit 24cbe63 into main Oct 16, 2026
4 checks passed
@adamjohnwright
adamjohnwright deleted the derived-caches-per-pathway branch October 16, 2026 23:01
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