mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-31 03:40:38 +02:00
chore: refactor retrieval pipeline to chunk-first RRF with derived entities and slimmer eval surface.
Collapse the multi-strategy entity engine into one benchmarked chunk retrieval path, derive entities from retrieved chunks, and update consumers, docs, and clippy fixes across the workspace.
This commit is contained in:
@@ -95,6 +95,7 @@ pub(crate) async fn init_with_config(config: AppConfig) -> anyhow::Result<Shared
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(dead_code)] // helpers are shared across binary test targets
|
||||
pub(crate) mod tests {
|
||||
use std::path::Path;
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@ use html_router::{
|
||||
use super::SharedServices;
|
||||
|
||||
/// Builds the Minne API and HTML route subtrees without fixing the outer Axum state
|
||||
/// type. SaaS consumers can merge additional routers and attach their own `AppState`
|
||||
/// type. `SaaS` consumers can merge additional routers and attach their own `AppState`
|
||||
/// as long as it implements `FromRef` for `ApiState` and `HtmlState`.
|
||||
#[allow(dead_code)] // used by server/main binaries, not worker
|
||||
pub fn minne_routes<S>(api_state: &ApiState, html_state: &HtmlState) -> Router<S>
|
||||
where
|
||||
S: Clone + Send + Sync + 'static,
|
||||
@@ -24,6 +25,7 @@ where
|
||||
.merge(html_routes(html_state))
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // used by server/main binaries, not worker
|
||||
pub fn build_api_state(services: &SharedServices) -> ApiState {
|
||||
ApiState {
|
||||
db: Arc::clone(&services.db),
|
||||
@@ -32,6 +34,7 @@ pub fn build_api_state(services: &SharedServices) -> ApiState {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // used by server/main binaries, not worker
|
||||
pub async fn build_html_state(services: &SharedServices) -> anyhow::Result<HtmlState> {
|
||||
let session_store = Arc::new(
|
||||
services
|
||||
|
||||
@@ -75,6 +75,7 @@ struct AppState {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::expect_used)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use axum::{
|
||||
|
||||
Reference in New Issue
Block a user