feat(rag): harden post-LightRAG runtime

Retire legacy OCR/media/evidence fallbacks, add local-folder event bus and Page Aggregate guards, and archive completed design checklists.

Validation: cargo test -p mnote-web -- --test-threads=1; cargo test --workspace -- --test-threads=1; git diff --check; codegraph sync .; codegraph_status.
This commit is contained in:
lix-2026
2026-06-07 10:35:21 +08:00
parent 22a92edcda
commit 9551d4c1dc
59 changed files with 4053 additions and 5249 deletions
+5 -12
View File
@@ -1087,7 +1087,7 @@ mod tests {
}
#[tokio::test]
async fn evidence_search_route_prefers_sqlite_index() {
async fn evidence_search_route_returns_retired_guard() {
let root = std::env::temp_dir().join(format!(
"mnote-evidence-route-sqlite-{}-{}",
std::process::id(),
@@ -1182,22 +1182,15 @@ mod tests {
.await
.expect("response");
assert_eq!(response.status(), StatusCode::OK);
assert_eq!(response.status(), StatusCode::GONE);
let body = to_bytes(response.into_body(), usize::MAX)
.await
.expect("body");
let payload: Value = serde_json::from_slice(&body).expect("json");
let first = payload["results"]
.as_array()
.and_then(|items| items.first())
.expect("sqlite evidence result");
assert_eq!(payload["ok"], false);
assert_eq!(
first["source"]["ownerDocumentPath"].as_str(),
Some("README.md")
);
assert_eq!(
first["source"]["schema"].as_str(),
Some("mnote.evidence_locator.v1")
payload["code"].as_str(),
Some("mnote_evidence_search_retired")
);
fs::remove_dir_all(&root).ok();
}