Skip to content

Update pathfinder - #56

Open
uhbrar wants to merge 2 commits into
mainfrom
update_pathfinder
Open

uhbrar wants to merge 2 commits into
mainfrom
update_pathfinder

Conversation

@uhbrar

@uhbrar uhbrar commented Sep 2, 2026

Copy link
Copy Markdown

Updates pathfinder to use one function

@uhbrar
uhbrar requested a review from gloriachin September 2, 2026 14:29

@kennethbruskiewicz kennethbruskiewicz 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.

This is a nice simplification. Four near-identical functions become one, and the notebook is updated to match. It merges cleanly with main, though the branch is 11 commits behind.

I checked for callers of the four removed functions (query_aragorn_pathfinder, query_arax_pathfinder and their _with_constraints forms). There are none in the toolkit, its tests, text-query or translator-agents. They were public, so notebook users outside the repository may still call them. Thin aliases that call query_pathfinder would avoid breaking those users, or the removal could go in the release notes requested in #61.

Three small inline comments follow. None of them blocks merging. #68 wraps the four old functions for capture, and I'll adapt it once this lands.

I read the code at 34b5fb0 and did not run it against the live ARAs.

Comment thread TCT/TCT_pathfinder.py
return response

def query_arax_pathfinder(node1_id:str, node1_category:str, node2_id:str, node2_category:str) -> str:
def query_pathfinder(

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.

A small offline test would help here. It could check that each ARA resolves to the right endpoint, that an unknown ARA raises ValueError, and that passing constraints selects the constrained query builder.

Comment thread TCT/TCT_pathfinder.py
node2_id: str,
node2_category: str,
constraints: Optional[Sequence[str]] = None,
timeout: Optional[float] = None,

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.

Good to have this parameter. With the default of None, a call still waits indefinitely when an ARA stops responding. A default of about 300 seconds would match the consortium's five-minute response target for ARAs, and callers could still override it.

Comment thread TCT/TCT_pathfinder.py
node2_id : str
node2_category : str
constraints : sequence of str, optional
Intermediate node categories. Only up to one allowed.

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.

The docstring says only one intermediate category is allowed, and the function passes the list through whatever its length. Either raising on more than one or warning and using the first would make the behaviour match the docstring.

This branch has not been deployed

No deployments
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.

2 participants