feat(query): expose hidden QueryEngine APIs#12
Merged
Conversation
Five methods existed in GraphStore but had no public-facing analogue, forcing skills to reach into private internals (`engine._store`) or drop into Python to compute answers Trailmark already knew: - ancestors_of(name): every function/method that can transitively reach the named node. The dual of callees_of, extended transitively. Upward slicing for audit: "given this sink, who could hit it?" - reachable_from(name): transitive closure of callees_of. - entrypoint_paths_to(name): call paths from any entrypoint to a sink. Answers the canonical attack-surface question; pairs with the recently-added entrypoint detection. - nodes_with_annotation(kind): slice the graph by audit state (e.g. all nodes tagged FINDING). - functions_that_raise(exception_name): consumes the parser-populated but previously-unqueried `exception_types` field on CodeUnit. 12 new tests covering direct/transitive behavior, unknown-node cases, and the module/contains-edge interaction in ancestor queries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five methods existed in GraphStore but had no public-facing analogue, forcing skills to reach into private internals (
engine._store) or drop into Python to compute answers Trailmark already knew:exception_typesfield on CodeUnit.12 new tests covering direct/transitive behavior, unknown-node cases, and the module/contains-edge interaction in ancestor queries.