Source search takes up to eight texts, fused by reciprocal rank (k=60) #52

Merged
eureka merged 5 commits from gamecult-chat/source-query-texts into main 2026-11-11 16:20:41 +00:00
Owner

Executes cut spec gamecult-chat:cut_spec:cut-source-query-texts.r1 (map cut 1, multi-text-query, docs/chat-retrieval-map.md).

SourceQuery gains texts (one to eight); sources::search embeds all distinct trimmed texts in one embed call, searches once per vector (FUSE_DEPTH = 50 deep when several), and fuses with reciprocal rank fusion (FUSE_K = 60, Cormack, Clarke, Buttcher, SIGIR 2009) through a pure generic fuse the chat cut reuses. One text answers exactly as before (cosine scores, top_k deep, unfused). text stays as a transitional field, documented as such, to be deleted once no client sends it. huginn sources <TEXT>... takes one to eight positional texts and always sends texts; the daemon and CLI deploy together.

Commits, in the spec's order: (1) wire fields, door, regenerated request and response schemas; (2) fuse and its tests; (3) search over the batch, with the behavioural tests; (3b) daemon door test; (4) CLI.

Verification: the Yggdrasil verify path (ygg-verify.sh) is unreachable from the Self body (ssh: Could not resolve hostname ygg), so the focused suites ran locally in a scoped target dir: huginn-mind 415 passed, huginn-daemon lib 205 passed and its other targets green, eureka-state cli 80 passed; cargo check --locked --workspace exit 0. One failure, eureka-state tests/mcp.rs::selection_schema_matches_cultlib, needs a network crate download under the Self's offline cargo and does not touch this diff. No mutation pass was run (needs the verify path).

Not merged, not deployed.

🤖 Generated with Claude Code

Executes cut spec `gamecult-chat:cut_spec:cut-source-query-texts.r1` (map cut 1, multi-text-query, `docs/chat-retrieval-map.md`). `SourceQuery` gains `texts` (one to eight); `sources::search` embeds all distinct trimmed texts in one `embed` call, searches once per vector (`FUSE_DEPTH` = 50 deep when several), and fuses with reciprocal rank fusion (`FUSE_K` = 60, Cormack, Clarke, Buttcher, SIGIR 2009) through a pure generic `fuse` the chat cut reuses. One text answers exactly as before (cosine scores, top_k deep, unfused). `text` stays as a transitional field, documented as such, to be deleted once no client sends it. `huginn sources <TEXT>...` takes one to eight positional texts and always sends `texts`; the daemon and CLI deploy together. Commits, in the spec's order: (1) wire fields, door, regenerated request and response schemas; (2) `fuse` and its tests; (3) `search` over the batch, with the behavioural tests; (3b) daemon door test; (4) CLI. Verification: the Yggdrasil verify path (`ygg-verify.sh`) is unreachable from the Self body (`ssh: Could not resolve hostname ygg`), so the focused suites ran locally in a scoped target dir: `huginn-mind` 415 passed, `huginn-daemon` lib 205 passed and its other targets green, `eureka-state` cli 80 passed; `cargo check --locked --workspace` exit 0. One failure, `eureka-state` `tests/mcp.rs::selection_schema_matches_cultlib`, needs a network crate download under the Self's offline cargo and does not touch this diff. No mutation pass was run (needs the verify path). Not merged, not deployed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
SourceQuery gains `texts` (one to eight, SOURCE_TEXTS_MAX) beside the
transitional `text`; check() refuses neither, both, more than eight and blank
entries, naming `texts`. SourceHit.score documents cosine versus reciprocal-rank
sum. Published request and response schemas regenerated. Cut
gamecult-chat:cut_spec:cut-source-query-texts.r1, commit 1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fuse is a pure generic function over ranked lists and a key closure, with
FUSE_K = 60 (Cormack, Clarke, Buttcher, SIGIR 2009) and FUSE_DEPTH = 50 named
beside CORPUS. Nothing calls it yet. Cut
gamecult-chat:cut_spec:cut-source-query-texts.r1, commit 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
search() embeds each distinct trimmed text (Instruct:-prefixed) in one batch,
searches once per vector, and fuses with reciprocal rank (k=60, depth 50) only
when more than one text remains; one text is searched top_k deep and answers
with the cosine scores as before. Cut
gamecult-chat:cut_spec:cut-source-query-texts.r1, commit 3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Zero, nine and blank texts answer Refused naming `texts` and never reach the
index; two texts are one queued search. Cut
gamecult-chat:cut_spec:cut-source-query-texts.r1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The CLI sends every positional text as `texts` and never `text`; help says each
is a topic and the lists are fused. Daemon and CLI deploy together. Cut
gamecult-chat:cut_spec:cut-source-query-texts.r1, commit 4.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
eureka merged commit b373c2a5b1 into main 2026-11-11 16:20:41 +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!52
No description provided.