fix(growth,hands): 穷尽审计后 3 项修复 — browser 文档注释 + experience_store warn 日志 + identity 数字更正
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

- browser.rs: 过时 doc comment pending_execution → delegated_to_frontend
- experience_store.rs: merge 反序列化失败时 warn!() + fallback 覆写
- wiki/log.md: identity_patterns 43→54 更正
This commit is contained in:
iven
2026-04-21 12:46:26 +08:00
parent ec22f0f357
commit 74ce6d4adc
3 changed files with 20 additions and 3 deletions

View File

@@ -126,7 +126,16 @@ impl ExperienceStore {
// If an experience with this URI already exists, merge instead of overwrite.
if let Some(existing_entry) = self.viking.get(&uri).await? {
if let Ok(existing) = serde_json::from_str::<Experience>(&existing_entry.content) {
let existing = match serde_json::from_str::<Experience>(&existing_entry.content) {
Ok(e) => e,
Err(e) => {
warn!("[ExperienceStore] Failed to deserialize existing experience at {}: {}, overwriting", uri, e);
// Fall through to store new experience as overwrite
self.write_entry(&uri, exp).await?;
return Ok(());
}
};
{
let merged = Experience {
id: existing.id.clone(),
reuse_count: existing.reuse_count + 1,

View File

@@ -1,7 +1,7 @@
//! Browser Hand - Web automation capabilities (TypeScript delegation)
//!
//! **Architecture note (M3-02):** This Rust Hand is a **schema validator and passthrough**.
//! Every action returns `{"status": "pending_execution"}` — no real browser work happens here.
//! Every action returns `{"status": "delegated_to_frontend"}` — no real browser work happens here.
//!
//! The actual execution path is:
//! 1. Frontend `HandsPanel.tsx` intercepts browser hands → routes to `BrowserHandCard`