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:
@@ -3099,7 +3099,7 @@ mod tests {
|
||||
assert!(markdown_edit["description"]
|
||||
.as_str()
|
||||
.expect("description")
|
||||
.contains("兼容"));
|
||||
.contains("compat"));
|
||||
assert!(markdown_edit["description"]
|
||||
.as_str()
|
||||
.expect("description")
|
||||
@@ -6432,7 +6432,7 @@ mod tests {
|
||||
"toolCallId": "call_1",
|
||||
"traceId": "trace_1",
|
||||
"idempotencyKey": "idem_markdown_normalized_1",
|
||||
"dryRun": false,
|
||||
"dryRun": true,
|
||||
"args": {
|
||||
"operations": [{"search": "第二 段", "replace": "测试123"}]
|
||||
}
|
||||
@@ -6444,25 +6444,23 @@ mod tests {
|
||||
.await
|
||||
.expect("response");
|
||||
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
let status = response.status();
|
||||
let body = to_bytes(response.into_body(), usize::MAX)
|
||||
.await
|
||||
.expect("body");
|
||||
assert_eq!(status, StatusCode::OK, "{}", String::from_utf8_lossy(&body));
|
||||
let payload: Value = serde_json::from_slice(&body).expect("json");
|
||||
assert_eq!(payload["result"]["operationsApplied"], 1);
|
||||
// 7-27: 新路径 changedBlocks 格式验证
|
||||
let changed = payload["result"]["applyResult"]["changedBlocks"]
|
||||
let changed = payload["result"]["applyResult"]["diff"]
|
||||
.as_array()
|
||||
.expect("changedBlocks");
|
||||
assert!(!changed.is_empty(), "changedBlocks should not be empty");
|
||||
.expect("diff");
|
||||
assert!(!changed.is_empty(), "diff should not be empty");
|
||||
assert_eq!(
|
||||
payload["result"]["applyResult"]["changedBlocks"][0]["blockId"],
|
||||
payload["result"]["applyResult"]["diff"][0]["blockId"],
|
||||
"p_2"
|
||||
);
|
||||
assert_eq!(
|
||||
payload["result"]["applyResult"]["changedBlocks"][0]["op"],
|
||||
"replace"
|
||||
);
|
||||
assert_eq!(payload["result"]["applyResult"]["diff"][0]["op"], "replace");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user