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
+1 -7
View File
@@ -9,10 +9,9 @@ use axum::middleware::Next;
use axum::response::Response;
use axum::Router;
use control_plane::{ControlPlaneStore, SqliteControlPlaneStore};
use std::collections::BTreeMap;
use std::env;
use std::fs;
use std::sync::{Arc, RwLock};
use std::sync::Arc;
use tower_http::trace::TraceLayer;
use tracing::{error, warn};
@@ -140,8 +139,6 @@ pub struct AppState {
pub editor_actor: EditorRuntimeActor,
pub block_delta_tx: broadcast::Sender<serde_json::Value>,
pub stream_delta_tx: broadcast::Sender<serde_json::Value>,
pub local_ocr_job_tx: broadcast::Sender<serde_json::Value>,
pub local_ocr_active_jobs: Arc<RwLock<BTreeMap<String, serde_json::Value>>>,
pub acp_runtime: Arc<AcpRuntimeManager>,
pub buffer_store: BufferStore,
control_plane: Arc<SqliteControlPlaneStore>,
@@ -151,7 +148,6 @@ impl AppState {
pub fn new(config: AppConfig) -> Self {
let (block_delta_tx, _) = broadcast::channel(256);
let (stream_delta_tx, _) = broadcast::channel(256);
let (local_ocr_job_tx, _) = broadcast::channel(256);
let actor = EditorRuntimeActor::new();
actor.set_block_delta_tx(block_delta_tx.clone());
let buffer_store = BufferStore::new();
@@ -165,8 +161,6 @@ impl AppState {
editor_actor: actor,
block_delta_tx,
stream_delta_tx,
local_ocr_job_tx,
local_ocr_active_jobs: Arc::new(RwLock::new(BTreeMap::new())),
acp_runtime: Arc::new(AcpRuntimeManager::from_env()),
buffer_store,
control_plane,