Skip to content

feat(cli): add inspect command for semantic input preview#1614

Open
aerbilir wants to merge 1 commit into
Graphify-Labs:v8from
aerbilir:feat/inspect-semantic-inputs
Open

feat(cli): add inspect command for semantic input preview#1614
aerbilir wants to merge 1 commit into
Graphify-Labs:v8from
aerbilir:feat/inspect-semantic-inputs

Conversation

@aerbilir

@aerbilir aerbilir commented Jul 2, 2026

Copy link
Copy Markdown

Summary

Adds a new read-only CLI command:

graphify inspect <path>

The command performs a corpus scan using the existing detection pipeline and displays:

  • file counts by category
  • semantic inputs (documents, papers, and images)
  • a note when semantic extraction would require an LLM during graphify extract

This makes it easier to understand why an API key is required before running extraction.

Changes

  • add graphify inspect <path>
  • add a human-readable semantic input summary
  • handle empty corpora with a clear message
  • add CLI tests

Testing

uv run pytest tests/test_inspect_cli.py -q
7 passed

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