Skip to content

Hold pathfinder's interior lookup to the hops it needs - #176

Merged
maximusunc merged 3 commits into
develfrom
claude/sharp-cannon-a6xfxl
Oct 20, 2026
Merged

maximusunc merged 3 commits into
develfrom
claude/sharp-cannon-a6xfxl

Conversation

@maximusunc

Copy link
Copy Markdown
Collaborator

The interior lookup pins every near node against every far node, so gandalf returned the edges between all of those combinations rather than the few thousand hops the paths take. It now sends the hops as parameters.pairs, which gandalf uses to return only those edges, and every lookup sends kg_only: the paths are built from the knowledge graph, and merging dropped the results anyway. A server that ignores either parameter returns a superset, which build_paths and the orphan filter already handle.

Claude-Session: https://claude.ai/code/session_01KYcFFcrh3FaNTinGUCCTY8

The interior lookup pins every near node against every far node, so
gandalf returned the edges between all of those combinations rather than
the few thousand hops the paths take. It now sends the hops as
parameters.pairs, which gandalf uses to return only those edges, and every
lookup sends kg_only: the paths are built from the knowledge graph, and
merging dropped the results anyway. A server that ignores either
parameter returns a superset, which build_paths and the orphan filter
already handle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcFFcrh3FaNTinGUCCTY8
@maximusunc
maximusunc requested a review from uhbrar October 19, 2026 19:41
The endpoint lookups pinned each endpoint against anything, so a hub
endpoint returned every edge of it and its subclass children, with an
inferred edge and support graph for each child edge: one such response
came back at 860MB. They now pin the endpoint against the nodes the paths
take next to it, and subclass_qnodes keeps those nodes exact rather than
expanding them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcFFcrh3FaNTinGUCCTY8
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.56%. Comparing base (2c9a0b5) to head (02a415c).
⚠️ Report is 3 commits behind head on devel.

Files with missing lines Coverage Δ
workers/aragorn_pathfinder/worker.py 83.38% <100.00%> (+0.14%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3594828...02a415c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@uhbrar uhbrar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good. I ran a few queries and was able to see a noticeable improvement in overall speed. Comment is a non-issue in my opinion.

Comment thread workers/aragorn_pathfinder/worker.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcFFcrh3FaNTinGUCCTY8
@maximusunc
maximusunc merged commit 7dfec3b into devel Oct 20, 2026
2 checks passed
@maximusunc
maximusunc deleted the claude/sharp-cannon-a6xfxl branch October 20, 2026 16:26
maximusunc pushed a commit that referenced this pull request Oct 20, 2026
Brings in pathfinder's narrower edge lookups (subclass_qnodes, pairs,
exclude_results) and the pathfinder mount paths, which are TRAPI-neutral.
devel's "ARAX Pathfinder TRAPI 2.0 fixes" are ported to 1.x where they
apply: only pinned qnodes give the pinned keys, a path constraint without
intermediate_categories defaults to biolink:NamedThing, and PathFinder's
hard-coded "p0" path bindings are rekeyed to the query's own path
(rekey_path_bindings). Its 2.0-only result conversion is not taken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TtsBikU9y9AFQ5uu9tcioz
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.

3 participants