huginn sources --front: search only a repo's front-page files #27

Merged
eureka merged 1 commit from eureka/prose-index-map into main 2026-11-10 14:51:21 +00:00
Owner

What

huginn sources --front "what is this repo" returns only front-page chunks: path exactly one of README.md, README, readme.md, README.markdown, CLAUDE.md, AGENTS.md at the repo root. --repo still applies and composes with it. Output already prints repo:path:line_start-line_end @commit score, so the Mind can cite.

Path: CLI --front -> SourceQuery.front (wire type, published schema regenerated) -> sources::search -> SourceIndex::search_sources(.., front, ..) -> Qdrant {"key":"path","match":{"any":[..]}} on the existing keyword index. One owner of the list: sources::FRONT_PAGE_FILES. No adapter, nothing deleted.

Wire compatibility

front is #[serde(default)]: an old client's request decodes as false (tested). The reverse is not safe: a new client against an old daemon has front silently ignored and gets ordinary hits. Deploy the daemon before relying on the flag.

Not live

This is not live. It needs the daemon release and huginn-sources redeployed, and the index rebuilt against #26 (noise skipping) before front pages are what the index holds. Nothing here has been run against the live Qdrant; the filter shape is covered by unit tests only.

Tests

  • index::qdrant::source_filter_tests (filter construction: front paths only, repo composed, no front condition without the ask)
  • sources::tests::a_front_search_answers_only_root_front_pages_within_the_repo_asked (nested docs/README.md, README.md.bak, other repos excluded)
  • cli::sources_front_prints_only_the_front_page_with_its_lines
  • wire::a_source_query_encoded_without_front_decodes_as_false, published schema derivation test
  • Probe mutants (run once, not committed), each caught: front condition disabled; repo dropped when front; nested path added to the list; front not threaded in sources::search.
  • huginn_daemon::sources::forge::tests::a_full_feed_page_asks_for_the_next_and_a_repo_past_the_cap_is_named failed once in one full sources run and passed on 3 reruns and on baseline; unrelated to this diff, looks flaky.

Follow-up note (not implemented)

Markdown-heading idea: chunk markdown by heading sections (carry the heading path in the chunk) so a front-page hit starts at a section, not a line window. That is a chunker change and needs a CHUNKER_VERSION bump and a rebuild; deliberately left out here.

🤖 Generated with Claude Code

## What `huginn sources --front "what is this repo"` returns only front-page chunks: path exactly one of `README.md`, `README`, `readme.md`, `README.markdown`, `CLAUDE.md`, `AGENTS.md` at the repo root. `--repo` still applies and composes with it. Output already prints `repo:path:line_start-line_end @commit score`, so the Mind can cite. Path: CLI `--front` -> `SourceQuery.front` (wire type, published schema regenerated) -> `sources::search` -> `SourceIndex::search_sources(.., front, ..)` -> Qdrant `{"key":"path","match":{"any":[..]}}` on the existing keyword index. One owner of the list: `sources::FRONT_PAGE_FILES`. No adapter, nothing deleted. ## Wire compatibility `front` is `#[serde(default)]`: an old client's request decodes as false (tested). The reverse is not safe: a new client against an old daemon has `front` silently ignored and gets ordinary hits. Deploy the daemon before relying on the flag. ## Not live This is not live. It needs the daemon release and `huginn-sources` redeployed, and the index rebuilt against #26 (noise skipping) before front pages are what the index holds. Nothing here has been run against the live Qdrant; the filter shape is covered by unit tests only. ## Tests - `index::qdrant::source_filter_tests` (filter construction: front paths only, repo composed, no front condition without the ask) - `sources::tests::a_front_search_answers_only_root_front_pages_within_the_repo_asked` (nested `docs/README.md`, `README.md.bak`, other repos excluded) - `cli::sources_front_prints_only_the_front_page_with_its_lines` - `wire::a_source_query_encoded_without_front_decodes_as_false`, published schema derivation test - Probe mutants (run once, not committed), each caught: front condition disabled; repo dropped when front; nested path added to the list; `front` not threaded in `sources::search`. - `huginn_daemon::sources::forge::tests::a_full_feed_page_asks_for_the_next_and_a_repo_past_the_cap_is_named` failed once in one full `sources` run and passed on 3 reruns and on baseline; unrelated to this diff, looks flaky. ## Follow-up note (not implemented) Markdown-heading idea: chunk markdown by heading sections (carry the heading path in the chunk) so a front-page hit starts at a section, not a line window. That is a chunker change and needs a `CHUNKER_VERSION` bump and a rebuild; deliberately left out here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
SourceQuery gains `front` (serde default false, so an old client's request
decodes as before). The one owner of the list is sources::FRONT_PAGE_FILES;
the Qdrant filter matches `path` against it with MatchAny on the existing
keyword index, composed with the `repo` condition. The CLI prints the
citation line range as before.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
eureka merged commit 3903cf6b51 into main 2026-11-10 14:51:21 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Huginn!27
No description provided.