Function read_facts
Source pub fn read_facts(path: &Path) -> Result<Vec<Fact>, CliError>
Expand description
从 JSONL 文件读取 Fact 列表
每行一个 Fact 的 JSON 序列化。空行跳过,非 JSON 行报错。
§反序列化路径
serde_json::from_str → serde_json::Value → evorule_reactor::wal::fact_from_json → Fact
Io:文件读取失败
Json:JSON 解析失败(行号通过 FactLogParse 携带)
Wal:fact_from_json 失败(字段缺失/类型不匹配/未知 fact type)
FactLogParse:行号 + 原因