feat(workbench): F14 coalesce, snapshot manifest, and sse drain evidence

Hold analysis locks across compile for concurrent same-snapshot reads,
emit SnapshotManifestV1 for app retention, and add Go drainForward tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-10-25 11:13:53 +08:00
1 parent 69c4e74872
commit 8cf5288481
8 files changed
+389 -58

No files matched your search

+8 -16
View File
@@ -111,22 +111,14 @@ pub fn resolve_reference(params: &Value) -> Result<Value, Value> {
if !expected_gen.is_empty() {
let current_gen = semantic_generation(&compilation.semantics);
if &current_gen != expected_gen {
return Ok(json!({
"schema": "KnowledgeLocatorV1",
"schema_version": 1,
"resolution": "version_unavailable",
"precision": "none",
"locator": locator.to_json(),
"target": Value::Null,
"candidates": [],
"diagnostics": [{
"code": "generation_mismatch",
"message": format!(
"expected generation {expected_gen}, current projection is {current_gen}; refusing silent downgrade"
)
}],
"label": "引用版本不可用"
}));
return Ok(crate::workbench::snapshot::version_unavailable_result(
&locator.to_json(),
&format!(
"expected generation {expected_gen}, current projection is {current_gen}; refusing silent downgrade (no retained snapshot)"
),
expected_gen,
Some(&current_gen),
));
}
}
}