fix(growth): 审计修复 — CRITICAL 编译错误 + LOW 静默数据丢失
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- CRITICAL: extraction_adapter.rs extract_with_prompt() 使用不存在的 zclaw_types::Error::msg(),改为 ZclawError::InvalidInput/ZclawError::LlmError - LOW: feedback_collector.rs save() 中 serde_json::to_string().unwrap_or_default() 改为显式错误处理 + warn 日志 + continue,避免静默存空数据
This commit is contained in:
@@ -135,8 +135,17 @@ impl FeedbackCollector {
|
||||
|
||||
let mut saved = 0;
|
||||
for record in self.trust_records.values() {
|
||||
let content =
|
||||
serde_json::to_string(record).unwrap_or_default();
|
||||
let content = match serde_json::to_string(record) {
|
||||
Ok(c) => c,
|
||||
Err(e) => {
|
||||
tracing::warn!(
|
||||
"[FeedbackCollector] Failed to serialize trust record {}: {}",
|
||||
record.artifact_id,
|
||||
e
|
||||
);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
let entry = crate::types::MemoryEntry::new(
|
||||
"feedback",
|
||||
MemoryType::Session,
|
||||
|
||||
Reference in New Issue
Block a user