fix: 6 non-frontend issues — embedding, BashTool cache, exception logs, leak detection, docs - #167
Merged
Merged
Conversation
ULookup
force-pushed
the
infra-fixes-2026-06-20
branch
from
June 21, 2026 09:50
33ce541 to
66e555b
Compare
This was
linked to
issues
Jun 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
修复/处理 6 个非前端 issue,范围覆盖 embedding 提供者、BashTool 缓存隔离、场景编排器异常可见性、泄密检测精度、以及 2 个 Won't Fix 的架构决策文档化。
Changes
Fixes
dimension()内联解析 model name 移到构造函数成员dimension_,消除运行时字符串匹配反模式。DDL 原本就从embedder_->dimension()读取,无需迁移。readonly_cache文件级 static:将 cache 和 mutex 从翻译单元级 static 移到BashTool实例成员,每个ToolRegistry/AgentLoop拥有独立缓存,避免并发 agent 间的缓存污染。debug提升至warn;在SceneWrapUp新增warnings字段,finish_scene的 3 个 catch 块中追加中文警告信息,供前端展示。SecretStore::check_leak_risk()新增边界感知匹配(match_at_boundary),仅在 CJK 句子边界处识别 truth;新增公开版本消歧——truth 与public_version在 200 字符窗口内共存时,追加低置信度标注。Won't Fix (文档化)
Test plan
cmake --build build && ctest -R tools -V— tools test 通过cmake --build build --target merak-worldbuilding— 编译通过worldbuilding_tests— 需要本地 PostgreSQL(SecretStore/SceneOrchestrator 集成测试)