macula_rag_query (macula_rag v0.4.0)
View SourceOne federated query: ask every shard of the org whose embedding matches, in parallel, and merge the answers by score.
The shards are the providers macula lists for the org's procedure, which it has already checked against the org's D25 delegations; a provider listed through two stations is one shard. Each is then judged by the summary it published:
no summary not asked, no_summary another embedding not asked, {embedding_mismatch, Theirs} same embedding asked, and its answer is judged again: an answer in another embedding, or one below the contract, is refused rather than merged
NOTHING IS DROPPED SILENTLY. Every shard ends in answered or in failed with its reason, node ids in lowercase hex. A shard slower than the timeout is timeout and does not hold up the others.
The mesh arrives as functions in Ctx (providers, summary, call, local), so the fan-out is tested without one. This node's own shard, when it is one, answers through local and is never dialled.
Summary
Functions
Run Query across the org's shards.