3 Commits
Author SHA1 Message Date
devkancheti4-design 3ba70ce9ac test(query): a seed given with --seed renders first and survives truncation
The seeded path hands the resolved nodes to _subgraph_to_text as seeds (seeds=start_nodes, the BUG2 fix), so the
given seed is the first NODE line and still shows under a small token budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 67f65c44b0)
2026-10-12 22:58:40 +01:00
devkancheti4-design f2d4bd49d3 feat(query): --seed fails closed without a value; report each unresolved seed once; log seeds
- graphify query --seed with no value (trailing --seed or --seed=) now exits with an error instead of running a
  keyword query.
- An unresolved seed given twice is listed once.
- The query log records the seeds used.
- Tests: the callable form (name and name()), --seed with --context, both no-value forms, and the logged seeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit c46b0e78d0)
2026-10-12 22:58:40 +01:00
devkancheti4-design 4545e73124 feat(query): --seed to start the traversal at given nodes
An external ranker (embeddings, a hybrid or learned retriever, or an agent
that already knows the file) can choose where graphify query starts instead
of the question's keyword matches; the graph then does the expansion.

Each --seed value resolves exactly as affected resolves its seed
(affected.resolve_seed: node id, unique label, callable name, repo-relative
or absolute file path anchored to the graph's root), so there is one
interpretation of a node reference. Fail closed: a value that does not
resolve to exactly one node is reported and skipped; if none resolve, the
query says so and does not fall back to keyword seeds. Without --seed the
output is unchanged (rendering moved into _render_query as is).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit c8af4e1b93)
2026-10-12 22:58:40 +01:00