feat(cli): add inspect command for semantic input preview#1614
Open
aerbilir wants to merge 1 commit into
Open
Conversation
nokternol
added a commit
to nokternol/graphify
that referenced
this pull request
Jul 4, 2026
…raphify-Labs#1614) Port of Graphify-Labs#1613's `explain` fix into `path`'s endpoint resolution. `path` already detected a close top-vs-runner-up score gap on either endpoint, but only printed a stderr warning and then silently proceeded with the top-scored candidate regardless — the same silently-wrong-with-no-actionable-signal failure Graphify-Labs#1445 and Graphify-Labs#1613 fixed elsewhere. Confirmed live against the real repro: `path "filterRegistry" "useMediaLookups"` has `filterRegistry.ts` (degree 21, the real module) and `filterRegistry.test.ts` (degree 8) tied at the exact same score — a real ambiguity a stable sort tiebreak happened to resolve "correctly" this time, with nothing to say it might not next time. Both endpoints were individually resolving fine in isolation; the misleading result came from silently accepting a coin-flip on one of them. Endpoint resolution now uses the same two-part gate as Graphify-Labs#1613: a close score gap is treated as ambiguous and prints a numbered candidate list (label, source, degree, score) instead of guessing, unless one candidate's degree dominates the runner-up (mirrors Graphify-Labs#1613's degree-dominance escape hatch, applied here to the pre-existing score-gap check rather than tier membership). `--force` bypasses the guard entirely, reproducing pre-Graphify-Labs#1614 behavior. Full suite (2768 tests, same 1 pre-existing unrelated failure as prior commits) and ruff pass. Verified live: the repro now lists both tied candidates instead of silently picking one; `--force` reproduces the old misleading result for comparison; a genuinely unambiguous path (identityResolutionJob -> plexProvider) resolves directly with no false-positive prompt. Scope: this fixes endpoint disambiguation, not the separate issue that a correctly-resolved shortest path can still route through irrelevant test-infrastructure edges when that happens to be graph-theoretically shortest — that's a distinct, unaddressed problem in path's traversal itself, not its endpoint resolution.
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.
Summary
Adds a new read-only CLI command:
The command performs a corpus scan using the existing detection pipeline and displays:
graphify extractThis makes it easier to understand why an API key is required before running extraction.
Changes
graphify inspect <path>Testing