fix(growth,kernel,runtime): 穷尽审计后 7 项修复 — body 持久化 + embedding 死路径 + 安全加固
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 修复: - body_markdown 数据丢失: SkillManifest.body 字段 + serialize_skill_md 使用 body 替代默认内容 - embedding 检索死路径: rerank_entries 使用异步 index_entry_with_embedding + score_similarity_with_embedding (70/30 混合) - try_write 静默丢失: pending_embedding 字段 + apply_pending_embedding() 延迟应用 IMPORTANT 修复: - auto_mode 内存泄漏: add_pending 容量限制 100 + 溢出时丢弃最旧 - name_to_slug 空 ID: uuid fallback for empty/whitespace-only names - compaction embedding 缺失: compaction GrowthIntegration 也接收 embedding - kernel 未初始化警告: viking_configure_embedding warn log 验证: 934+ tests PASS, 0 failures
This commit is contained in:
@@ -174,8 +174,9 @@ pub async fn skill_create(
|
||||
tags: vec![],
|
||||
category: None,
|
||||
triggers: request.triggers,
|
||||
tools: vec![], // P2-19: Include tools field
|
||||
tools: vec![],
|
||||
enabled: request.enabled.unwrap_or(true),
|
||||
body: None,
|
||||
};
|
||||
|
||||
kernel.create_skill(manifest.clone())
|
||||
@@ -221,8 +222,9 @@ pub async fn skill_update(
|
||||
tags: existing.tags.clone(),
|
||||
category: existing.category.clone(),
|
||||
triggers: request.triggers.unwrap_or(existing.triggers),
|
||||
tools: existing.tools.clone(), // P2-19: Preserve tools on update
|
||||
tools: existing.tools.clone(),
|
||||
enabled: request.enabled.unwrap_or(existing.enabled),
|
||||
body: existing.body.clone(),
|
||||
};
|
||||
|
||||
let result = kernel.update_skill(&SkillId::new(&id), updated)
|
||||
|
||||
@@ -637,6 +637,11 @@ pub async fn viking_configure_embedding(
|
||||
if let Some(ref mut k) = *kernel_lock {
|
||||
k.set_embedding_client(arc_adapter);
|
||||
tracing::info!("[VikingCommands] Embedding propagated to Kernel skill router + memory retriever");
|
||||
} else {
|
||||
tracing::warn!(
|
||||
"[VikingCommands] Kernel not initialized, embedding only applied to SqliteStorage. \
|
||||
It will be applied when Kernel boots."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user