fix(knowledge,memory): 第二轮审查改进 — 接入批量 embedding、统一 schema 引用、注册 FactS… - #5
Merged
Merged
Conversation
…ervice 工厂 - R1: api.py / perception.py 的 _get_service() 传入 batch_embedding_fn, 使第一轮实现的批量 embedding 能力在实际运行中生效 - R2: memory_service.py _keyword_search SQL 去掉硬编码 negentropy.memories, 改为 FROM memories,与 hybrid_search() DB 函数保持一致(依赖 search_path) - R3: factories/memory.py 注册 get_fact_service() / reset_fact_service() 工厂函数, 将 FactService 接入 Strategy + Factory 单例管理体系 - R4: embedding.py 移除未使用的 Dict/List typing 导入 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ThreeFish-AI
added a commit
that referenced
this pull request
Feb 15, 2026
fix(knowledge,memory): 第二轮审查改进 — 接入批量 embedding、统一 schema 引用、注册 FactS…
5 tasks
5 tasks
ThreeFish-AI
added a commit
that referenced
this pull request
May 17, 2026
两处独立缺陷一并修复: FIX-#4 类型升级分支死代码: 旧实现里「升级 canonical_type」的占比阈值与「类型冲突」阈值同为 type_conflict_minority_threshold (0.30)。但冲突分支位于 for 循环内、升级在 else 分支——任一非主类型占比 ≥0.30 都会先命中冲突 break,导致升级分支永远 不可达。 新增 type_upgrade_minority_threshold (0.15) 且强制 < type_conflict_minority_threshold; 同时新增 precedence 严格大于校验,避免同 precedence 等级反复横跳。 FIX-#5 stopword total_corpora 失真: 旧实现以 MAX(mention_corpus_count) 作为 total_corpora 的 O(1) 近似,但该值 始终 ≤ 真实 corpus 数(顶多等于),作为分母会把 ratio 推高、stopword 阈值 压得过低。改为直接 ``SELECT COUNT(*) FROM corpus WHERE app_name=...``,仅一次 索引扫描,代价可忽略。 测试: - TestConfigDefaults.test_upgrade_threshold_strictly_below_conflict:守护 FIX-#4 阈值不变式; - TestStopwordThresholdLogic.test_refresh_stopword_uses_corpus_count_not_max: 断言 SQL 文本走 corpus 表而非 MAX(mention_corpus_count) 代理。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
ThreeFish-AI
added a commit
that referenced
this pull request
May 17, 2026
* feat(kg-federated): 联邦知识图谱数据层 (Canonical 实体规范层 + 权限红线 + Linker);
引入 Federated KG + Global Entity Canonical Layer,使跨 Corpus 多跳推理在保留物理隔离的
前提下成为可能。架构哲学映射:Microsoft GraphRAG(社区分层)/ LightRAG(dual-level)/
HippoRAG 2(2-hop 收敛)/ PathRAG(路径剪枝)。
数据层(Migration 0034):
- kg_entity_canonical 全局规范实体(按 app_scope 隔离 + HNSW + 部分索引)
- kg_entity_alias Corpus-local → canonical 多对一映射(UNIQUE local_entity_id)
- kg_cross_corpus_bridge 跨 Corpus 显式桥接关系(Phase 1 建表不物化)
ORM + 权限红线(models/perception.py):
- 新增 3 个 SQLAlchemy 模型,复用 Vector / TimestampMixin / UUIDMixin
- Session.do_orm_execute event hook:对 KgEntityAlias 的访问缺 corpus_id 过滤直接 raise
PermissionError,与 catalog_service 跨 app 拦截先例对齐
合并管线(canonical_linker.py):
- 复用 EntityResolver(Fellegi-Sunter 三阶段),find_similar 回调改为查 canonical ANN
- 双阈值:auto_merge=0.88 / review=0.75;类型冲突取 TYPE_PRECEDENCE 胜出方
- 自动 stopword 标记(mention_corpus_count / total > 0.5)
入口签名升级(unified_search.py):
- 新增 accessible_corpus_ids: frozenset[UUID],effective = scoped ∩ accessible
- 取交集为空时直接返回空结果,避免 canonical 层成为权限旁路
Feature flag(config/knowledge.py):
- KnowledgeFeatureFlags 包含 enable_canonical_linker / enable_cross_corpus_kg
- 灰度阶梯:app allowlist + user_id hash sample_rate
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
* feat(retrieval-planner): HybridPlanner 四阶段检索编排 + 跨 Corpus 桥接;
把 search_knowledge_base 从「逐 Corpus hybrid 串行 + 全局排序」升级为四阶段管线,让 Home
Studio 多 @CorPuS 场景自动获得跨 Corpus 实体桥接与多跳推理能力。
HybridPlanner(agents/tools/hybrid_planner.py,约 640 行):
- Stage 1 Intent Classification — 复用 UnifiedRetrievalService.classify_intent,
映射五意图 (fact / explore / multi_hop / relation / global_summary)
- Stage 2 Seed Retrieval — asyncio.gather 多 Corpus 并行 hybrid search
- Stage 3 Graph Expansion — canonical 中转节点 BFS max-depth=2 跨 Corpus 邻居召回
(受 accessible_corpus_ids 强制过滤;跳过 is_stopword_like 与 high-degree hub)
- Stage 4 RRF 融合 + LocalReranker (bge-reranker-v2-m3)
- 内置 TTL+LRU 缓存(canonical / provenance),timeout 12s SLO
search_knowledge_base 改造(agents/tools/perception.py):
- Feature flag 网关:enable_cross_corpus_kg + scoped/graph_mode 命中时走 Planner
- 任何 Stage 异常 → 降级到原 _legacy_search_knowledge_base 保护主链路
- 每条 result 注入 corpus_id / corpus_label / evidence_type / bridge_path
- 顶层新增 bridges / intent / expansion_triggered / stage_latencies_ms
新增工具 search_knowledge_graph_global:
- 全局摘要类问题专用入口(关键词:主题/概览/总体/核心 / overall theme / key topics)
- 委托 GlobalSearchService 做 Map-Reduce 社区摘要(GraphRAG 风格)
Faculty instruction 更新(agents/faculties/perception.py):
- 三工具协作规则:默认 search_knowledge_base / 全局摘要走 _global / 论文反查走 _with_papers
- Citation Corpus 来源徽章规范:跨 Corpus 检索时追加 (from Corpus: {label})
- bridges 渲染规则:## 跨 Corpus 关联 段落呈现源/目标 Corpus + canonical 实体
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
* feat(home-mentions): @graph 第四类 mention + BFF state_delta 透传跨 Corpus 图谱模式;
为 Home Composer 增加第四类 @ mention「图谱模式」,作为用户显式触发跨 Corpus 桥接 /
GraphRAG 全局摘要的 escape hatch;与 Intent Classifier 自动判定互补。
类型与解析(types/mention.ts + utils/mention-parser.ts):
- MentionKind 扩展 "graph",与 corpus-retrieve / corpus-output 同结构(refId = Corpus UUID)
- deriveForwardedPropsFromMentions 新增 graph_mode_corpus_ids 字段,去重 + validRefIds 过滤
- 既有 27 条 mention-parser 单测全量通过,新增 3 条 @graph 用例
弹层(components/ui/MentionPopover.tsx):
- 新增第四个 Tab「图谱模式」(lucide Network 图标)
- 复用既有 corpora 列表(kind 在 onPick 时改写为 "graph"),与现有 Tab 切换 / 键盘导航完全兼容
BFF state_delta(app/api/agui/_state-delta.ts):
- 新增 graph_mode_corpus_ids 透传分支,sanitize UUID + 截断到 32 条 + 显式空数组清空语义
- 既有 22 条 BFF 单测全量通过,新增 5 条覆盖 graph_mode 边界(合法 / 非 UUID / 空数组 / 非数组 / 缺席)
后端消费链路:
- perception.search_knowledge_base 已在前一 commit 中读取 tool_context.state["graph_mode_corpus_ids"],
命中非空时强制 HybridPlanner.force_graph_mode=True
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
* docs(kg-federated): 新增联邦知识图谱架构文档并同步知识索引;
新增 docs/knowledge-graph-federated.md(架构 + IEEE 引用 + 运维手册)作为本次跨 Corpus
检索 / KG 整合工作的单一事实源,并把 docs/agents/knowledge-map.md 知识索引补上对应链接,
满足 AGENTS.md 的 Direct Hyperlinking 与 Single Source of Truth 规约。
文档内容包含:
- 设计动机与三大现状缺口
- 联邦 vs 物理合并的决策矩阵(含三大坑分析)
- 数据层 Mermaid 架构图 + 表结构汇总
- HybridPlanner 四阶段管线 Mermaid + 默认参数表
- 三工具协作关系(search_knowledge_base / _global / _with_papers)
- Citation 来源标注规范(corpus_label + evidence_type)
- 灰度上线策略(4 周阶梯 + 回退路径)
- 可观测性指标目标值
- 五大风险与权衡 + 不在本次范围内的明确排除
- 浏览器实机验证 P0 清单(参见 docs/agents/browser-validation.md)
- 完整关联文件 SSOT 映射表
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
* fix(home-mentions): MentionChipList 补齐 @graph 图标/色板/标题;
修复 CI UI Build Smoke / UI Type Checks 报错——commit 584d289 把 MentionKind
扩展为四类(新增 "graph")但未同步更新 MentionChipList 内 _ICONS / _CHIP_CLASS /
_KIND_TITLE 三个 Record<MentionKind, …> 字典,导致 tsc 报 TS2741 三处缺键。
- 图标:复用 MentionPopover 已有的 Network 图标,保证弹层与 chip 视觉一致;
- 色板:新增 violet 变体(与 sky/emerald/amber 正交),对应"图谱"隐喻;
- 标题:「强制图谱模式」,对齐 types/mention.ts 注释与 Popover Tab 标签。
仅补编译期映射,不变更运行时行为;mention-parser.ts:178 已处理 "graph"。
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
* feat(retrieval-planner): @graph 与 @corpus-retrieve 并集 + 全局图搜索多 Corpus 聚合;
闭环 @graph mention 在 Perception 工具层的语义:
1. _planner_search_knowledge_base:scoped_ids 与 graph_mode_ids 改为并集而非择一
(之前 ``scoped_ids or graph_mode_ids`` 导致同时 @KB-A 与 @graph kb-B 时丢掉
kb-A)。任一非空即触发 force_graph,让 Planner 在并集上做 graph expansion。
2. search_knowledge_graph_global:从单次聚合查询改为「逐 Corpus 并发 + 聚合返回」
- 早期校验 valid_ids,避免无效 UUID 进入下游;
- 与 GraphService 同款 build_embedding_fn 计算 query_embedding(失败回退
entity_count DESC);
- 每个 Corpus 独立 AsyncSessionLocal,匹配 GlobalSearchService.search 的
positional db 参数协议;
- 返回结构改为 {status, query, corpus_count, per_corpus: [...]},附 corpus_label
便于前端来源徽章。
- 全部 Corpus 失败时 status=failed 且附 per_corpus 错误明细。
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
* fix(hybrid-planner): bridges.source_chunk_id 精确归因 (FIX-#2);
旧实现按 seed_entity_ids 迭代顺序为每个 canonical 绑首个 seed chunk,导致两个
seed chunk 分别提到不同 canonical 时,bridge 的 source_chunk_id 可能错位(典型
症状:canon-B 实际来自 chunk-2,但被绑成 chunk-1)。
修复:
- _chunks_to_entities 返回 ``[(chunk_id, entity_id)]`` 多对多映射,而非
DISTINCT entity_id 列表;
- _graph_expand 据此预先构造 canonical_to_seed_chunk(chunk→entity→canonical
链式 join),传给 _entities_to_expanded_chunks;
- 移除旧实现里基于 seed_entity_ids/seed_candidates 的乱绑代码段。
回归用例 TestBridgeAttribution 复刻同款链式 join,断言 canon-A 绑 chunk-1、
canon-B 绑 chunk-2,杜绝 cross-binding。
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
* fix(canonical-linker): 类型升级阈值修正与 stopword 总数计算 (FIX-#4 + FIX-#5);
两处独立缺陷一并修复:
FIX-#4 类型升级分支死代码:
旧实现里「升级 canonical_type」的占比阈值与「类型冲突」阈值同为
type_conflict_minority_threshold (0.30)。但冲突分支位于 for 循环内、升级在
else 分支——任一非主类型占比 ≥0.30 都会先命中冲突 break,导致升级分支永远
不可达。
新增 type_upgrade_minority_threshold (0.15) 且强制 < type_conflict_minority_threshold;
同时新增 precedence 严格大于校验,避免同 precedence 等级反复横跳。
FIX-#5 stopword total_corpora 失真:
旧实现以 MAX(mention_corpus_count) 作为 total_corpora 的 O(1) 近似,但该值
始终 ≤ 真实 corpus 数(顶多等于),作为分母会把 ratio 推高、stopword 阈值
压得过低。改为直接 ``SELECT COUNT(*) FROM corpus WHERE app_name=...``,仅一次
索引扫描,代价可忽略。
测试:
- TestConfigDefaults.test_upgrade_threshold_strictly_below_conflict:守护
FIX-#4 阈值不变式;
- TestStopwordThresholdLogic.test_refresh_stopword_uses_corpus_count_not_max:
断言 SQL 文本走 corpus 表而非 MAX(mention_corpus_count) 代理。
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
ThreeFish-AI
added a commit
that referenced
this pull request
Jul 2, 2026
- decision 增 improvement_efficiency(SI #4:单位成本增益,cost_units 以 Judge 调用数代理; 真实 $-成本待 LLM usage 提取后续)+ decide_safety_nonregression(SI #6:安全套件零回退硬前置); - SkillTemplateHandler.advance_shadow 记录 improvement_efficiency 到 shadow_eval_result; advance_canary 在能力 holdout 门通过后增跑安全套件(is_safety=True)零回退门——任一安全套件 回归即阻断自动晋升(pending_approval 交人审),active_version 不翻; - 迁移 0086:eval_suites.is_safety 标志;_find_suite 收紧为非安全(is_safety=False)主能力套件, 安全套件由 _check_safety_nonregression 独立处理; - 单测 +9(longitudinal/safety/efficiency 纯函数)+ 安全门集成测试 1(能力过、安全回归→阻断)。 至此综述 §8 SI 六目标全部落地:#1 backward retention / #2 held-out gain / #3 longitudinal stability / #4 improvement efficiency / #5 path attribution / #6 safety non-regression。 合并分支共 103 测试全绿;alembic head=0086;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
ThreeFish-AI
added a commit
that referenced
this pull request
Jul 3, 2026
…ary / 第三面 memory_pipeline_prompt) (#1038) * feat(eval): 离线评测基座——eval 四表+held-out 双相门+反事实归因; - 新增 eval 四表 ORM + 迁移 0083(EvalSuite/EvalCase/EvalRun/EvalResult, is_frozen holdout 分区 + 反事实 attribution JSONB +全过程审计 judge_raw); - evaluator 增 judge_once 非锚定复用方法(routine 路径逐字节不变,供 SuiteRunner 复用); - decision 增 skill 双相门 decide_skill_shadow/canary + compute_run_regression (综述 §8 held-out gain + backward retention / §9.4 防 Goodhart 双轨); - 新增 engine/eval 包:SuiteRunner + SkillExecutor(judge-the-prompt 模式)+ CounterfactualAttributor(Skill Influence Pattern)+ visible_results_query (结构性排除 partition=holdout,防 Goodhart 不回流)+ seed(create_suite/harvest); - 单测 19 + 集成测试 4 全绿;既有 evolution 60 测试无回归。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * refactor(evolution): TargetHandler 抽象——按 target_kind 分派进化面(retrieval 零行为差); - 新增 handlers/ 子包:TargetHandler ABC(advance_shadow/advance_canary/rollback/maybe_spawn) + RetrievalConfigHandler(原 orchestrator 的 retrieval 硬编码逻辑原样迁入)+ _shared 共享辅助; - orchestrator 退化为薄分派层(reap + 按 target_kind 分派 advance + 遍历 spawn),re-export 共享辅助保持单测兼容;第二面(skill_template)接入只需注册一个新 handler; - 新增 golden 集成测试 test_evolution_orchestrator_state_machine(首次经 inspect_once 覆盖 shadow→canary→promote/rollback 全路径,作 byte-equivalence 回归网); - 顺带修 _td 潜在 bug(_td(days=1) 旧实现只收 seconds,致 spawn 路径 TypeError); - 既有 evolution 60 单测 + 4 集成 + 3 golden 全绿,retrieval 进化路径逐字节等价。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): Skill 进化消费者——SkillTemplateHandler 闭环(GEPA proposer + active_version 发布); 综述 §3.5(Skill Evolution)+ §7(meta-layer)第二进化面落地,闭 PR1+PR2 的环: - 新增 handlers/skill.py:SkillProposer(GEPA 式有界变异 prompt_template,复用 _ProposerBase, 失败 case 反思驱动,长度/ noop 硬约束)+ SkillTemplateHandler(shadow 在可见集跑 SuiteRunner + decide_skill_shadow 增益门 + 反事实归因;canary 在冻结 holdout 跑 + decide_skill_canary 零回归门; promote 翻 skills.active_version,rollback 保持基线); - 迁移 0084:skills.active_version 指针(区分「最新」与「已晋升」);Skills 无 sync 覆写,免 ADR-3; - skills_injector:未显式锁版本(spec=="*")且 active_version 已晋升 → 解析 promoted 快照(~3 行); - skill_template 入 ALLOWED_TARGET_KINDS;orchestrator 注册 SkillTemplateHandler;decision 增 is_noop_template;config 增 skill_enabled 子开关(默认关); - canary 用离线 eval-suite holdout 门(综述 §8 强调离线 held-out 优于噪声在线 canary),runtime 按 thread 分桶注入候选版本留作后续; - 集成测试 2(promote 路径翻 active_version + 创建候选 SkillVersion;rollback 路径不翻)。 合并分支共 92 测试全绿;ruff lint/format 全过;alembic head=0084。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * docs(evolution): Skill 进化闭环 × SI 度量调研沉淀 + 设计文档 ADR-5/进度更新; - 新增 docs/research/141-skills-evolution-and-si-measurement.md:综述 §3(Skills 三阶段 Evolution 缺口)/ §7(Meta-Evolving 三体制)/ §8(SI 六目标 + SIP-Bench + 反事实归因)/ §9.4 (防 Goodhart)/ §10.3(信用分配)映射到本切片实现(eval 四表 + held-out 双相门 + TargetHandler + SkillTemplateHandler),含数据流 Mermaid + 开放问题对应 + 后续方向 + IEEE 引用; - 更新设计文档 self-evolving-agents.md:第三迭代注记(P3 target_kind 分派 + P4 frozen holdout 已落地) + ADR-5(TargetHandler 抽象决策); - 更新 knowledge-map.md 索引 141 号调研。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): 纵向 SIP-Bench T0/T1/T2 复评——已晋升对象 drift 回退(综述 §8 #3 + §10.5 + §9.3); 已晋升对象不会自动再验证——流量漂移/依赖变更/模型升级都可能让一次通过晋升门的对象静默退化 (综述 §10.5「experience→capability 无 scaling-law」、§9.3「安全评估须与改进环并行常驻」)。 - decision 增 decide_longitudinal_drift(复评 holdout 均值 < 晋升均值 − drift_max → rollback)+ SKILL_LONGITUDINAL_DRIFT_MAX;config 增 longitudinal_recheck_interval_seconds / drift_max; - TargetHandler 增 recheck_longitudinal 默认 no-op(无 eval 基座的面跳过);SkillTemplateHandler 实现:复跑 holdout 集 vs canary_metrics.candidate_mean,drift 则回退 skills.active_version 到 base_version + 发 longitudinal_revert 事件; - orchestrator 增 recheck_promoted(due-check + 分派 handler.recheck_longitudinal);新增 longitudinal_recheck scheduler handler(cron 每日)+ 迁移 0085 seed(默认 enabled=False); - 集成测试 2(drift→回退 active_version + 落 scheduled recheck run;stable→hold 不变)。 合并分支共 94 测试全绿;alembic head=0085;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): SI #4 效率 + #6 安全非回归——完成自我改进评测六目标(综述 §8); - decision 增 improvement_efficiency(SI #4:单位成本增益,cost_units 以 Judge 调用数代理; 真实 $-成本待 LLM usage 提取后续)+ decide_safety_nonregression(SI #6:安全套件零回退硬前置); - SkillTemplateHandler.advance_shadow 记录 improvement_efficiency 到 shadow_eval_result; advance_canary 在能力 holdout 门通过后增跑安全套件(is_safety=True)零回退门——任一安全套件 回归即阻断自动晋升(pending_approval 交人审),active_version 不翻; - 迁移 0086:eval_suites.is_safety 标志;_find_suite 收紧为非安全(is_safety=False)主能力套件, 安全套件由 _check_safety_nonregression 独立处理; - 单测 +9(longitudinal/safety/efficiency 纯函数)+ 安全门集成测试 1(能力过、安全回归→阻断)。 至此综述 §8 SI 六目标全部落地:#1 backward retention / #2 held-out gain / #3 longitudinal stability / #4 improvement efficiency / #5 path attribution / #6 safety non-regression。 合并分支共 103 测试全绿;alembic head=0086;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * docs(evolution): doc 141 更新——SI 六目标完成度 + 能力扩展项延期理由/recipe; - §4 增「SI 六目标完成度」表(#1-#6 全落地)+ §10 开放问题状态刷新(10.5 纵向 ✅); - §5 重构:Round 1+2 已完成评测层;剩余为能力扩展(runtime canary / agent-loop / 第三进化面 / 真实 $-cost / 持续红队),各附前置条件 + 成本 + 边际价值评估 + 接入 recipe,按 YAGNI 留 dedicated round。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(eval): SkillExecutor agent-loop 模式——AgentLoopExecutor + execution_mode 路由(综述 §3); - 新增 AgentLoopExecutor:skill prompt 作 system instruction + case task 作 user,单轮 LLM 生成, Judge 评**生成产出**而非评 prompt 文本(v1 单轮 skill-conditioned generation,已比 judge-the-prompt 进一步;完整多轮+工具+沙箱是下一步); - SuiteRunner 增 execution_mode 路由:scoring_config.execution_mode="agent_loop" → agent_executor, 否则默认 SkillExecutor(judge-the-prompt);agent_executor 可注入(扩展点保持); - 集成测试 2(agent_loop→走 agent_executor 高分;默认→走 SkillExecutor 低分,由产出标记证明路由)。 零改 handler / 零迁移;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): runtime canary 分桶注入——受控灰度发布窗口(综述 §9.3,R3-b); 离线 eval 门验证正确性后,插入在线分桶灰度窗口再全量晋升——捕捉部署期问题(真实分布漂移、 集成缺陷),与离线 held-out 门互补(综述 §8 离线验证 + §9.3 受控发布)。 - 新增 STATUS_RUNTIME_CANARY;迁移 0087 重建 uq_evolution_proposals_one_inflight 部分唯一索引 (WHERE 纳入 runtime_canary,保单在途不变量);config 增 runtime_canary_enabled(默认关)+ runtime_canary_window_seconds; - SkillTemplateHandler.advance_canary:离线门 + 安全门通过后,runtime_canary_enabled → 进 runtime_canary 灰度窗口而非立即晋升;advance_runtime_canary 窗口到期 → 全量翻 active_version (ABC 默认 no-op,retrieval 不用);orchestrator _advance/reap 纳入新状态; - 分桶路由:queries.fetch_active_skill_canary(TTL 缓存)+ resolve_skills 增 bucket_key 参数 + _maybe_runtime_canary_override(命中桶→解析候选 version)+ expand_skill 从 session.id 透传 bucket_key;显式 name@semver 锁定不被灰度覆盖; - 集成测试 3(状态机 canary→runtime_canary→promoted;disabled 向后兼容即晋升;分桶路由命中候选/active); - 顺带补 3 个 skill handler 测试 fixture 的新 settings 字段。 v1 在线信号为窗口到期;error-rate 门待 tool_invocations.canary_assignment 标记接入(doc 141 已记)。 evolution/eval 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): 第三进化面 memory_pipeline_prompt——TargetHandler 第三子类(综述 §7,R3-c); 把综述 §3.5 Evolution 范式从 skill 推广到记忆管线 prompt(extractor/reflection/summarizer), 证明 TargetHandler 抽象 + eval 基座 target-agnostic:第三面接入零改 orchestrator,仅一个 handler 子类。 - 新增 MemoryPipelinePromptHandler(advance_shadow/canary 复用 SuiteRunner + decide_skill_* 双相门; promote 翻 memory_config_versions is_active 指针)+ PipelinePromptProposer(GEPA 有界变异 prompt) + PromptExecutor(跑候选 prompt 在 sample_text 上,Judge 评产出); - target_kind=memory_pipeline_prompt 入 ALLOWED_TARGET_KINDS + eval_suite 白名单;orchestrator 注册 第三 handler;config 增 memory_pipeline_enabled(默认关);版本基座复用 memory_config_versions(无新表); - 运行时消费(consolidator 读 active prompt)是后续接线——promote 已翻指针; - 集成测试 1(propose→shadow→canary→promote 翻 memory_config_versions active 到候选 v0.2.0)。 TargetHandler 三面齐备(retrieval / skill / memory_pipeline_prompt)。eval+evolution 108 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * docs(evolution): doc 141 §5 更新——Round 3 三项能力扩展已落地(runtime canary / agent-loop / 第三面); 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): memory_pipeline 运行时消费接线——consolidator 读 active 进化 prompt(R4-a); 闭环第三面:进化产物(pipeline prompt)不再止步于"翻指针",consolidator 实际消费。 - weights.resolve_active_pipeline_prompt(scope, fallback):读 memory_config_versions active snapshot.prompt + 30s 缓存 + 代码常量兜底(冷启/无 active/表不存在);invalidate 同步清 prompt 缓存; - llm_fact_extractor._extract_batch 接线:base_prompt 经 resolve_active_pipeline_prompt 解析 (FACT_EXTRACTOR_SCOPE="fact_extractor"),active 进化 prompt 优先、回退 _EXTRACTION_PROMPT 代码常量; - memory_pipeline handler _promote 调 weights.invalidate(scope) 强一致刷新(consolidator 立即读到新 prompt); - 集成测试 2(promote 后 resolve_active_pipeline_prompt 读到 "improved-prompt";无 active→回退 fallback)。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): runtime canary 窗口末复评门——发布前自验证(综述 §9.3,R4-c); advance_runtime_canary 窗口到期不再直接全量晋升,先复跑 holdout + decide_longitudinal_drift 对比晋升时均值(canary_metrics.candidate_mean):drift → rollback(灰度期已暴露退化), 否则翻 active_version 全量发布。复用纵向复评基座,使受控灰度发布 self-validating。 集成测试 1(窗口末复评 drift 60 vs 晋升 72 → rollback,不翻 active_version)。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(eval): SI #4 真实 $-cost 执行侧提取——litellm.completion_cost(R4-b,scoped); - CaseOutput 增 cost_usd;_conditioned_generate 经 litellm.completion_cost 提取 → AgentLoopExecutor / PromptExecutor 写入 CaseOutput.cost_usd(模型不在定价表 → None,不阻塞); - SuiteRunner 累积 per-case cost_usd → eval_runs.cost_total;SkillTemplateHandler.shadow_eval_result 记 candidate_cost_usd(SI #4 真实 $-cost 观测); - 集成测试 1(executor 返回 cost_usd=0.05/case → run.cost_total == 6×0.05); - doc 141 §5 更新:R4-a/b/c 落地;judge 侧 $-cost(_judge 重构,触 routine 热路径)+ 其余第三面 + 红队列为后续。 improvement_efficiency 仍以 n_cases 代理(保持跨 run 单位一致);$-cost 作单独可观测量。 eval+evolution 108 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(eval): judge 侧 $-cost _judge 重构——完整 SI #4 真实成本(R5); _judge 返回 8 元组(+cost_usd/token_total),EvaluationResult 增 cost_usd/token_total, evaluate + judge_once 透传 → SuiteRunner 累积 executor + judge 全成本进 eval_runs.cost_total。 litellm.completion_cost 提取;模型不在定价表/Faculty 路径 → (None,None) 静默降级不阻塞。 - evaluator._judge 重构(8 元组);_extract_cost helper;EvaluationResult.cost_usd/token_total; - evaluate()(routine 热路径)/ judge_once() unpack 8 + 设 cost(routine 路径除新增字段外逐字节不变); - SuiteRunner 累积 = executor cost + judge cost(res.cost_usd)→ run.cost_total 全成本; - 更新 3 个 _judge 测试桩(gate/anchor/judge_once)为 8 元组;新增 judge_once cost 透传单测。 至此 SI #4 efficiency 真实 $-cost 端到端(执行侧 R4-b + 判定侧 R5)。eval+evolution+evaluator 共 138 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * docs(evolution): doc 141 §5 更新——R5 judge 侧 $-cost 完整化,SI #4 端到端; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): builtin_tool_config 第四进化面——TargetHandler 第四子类(综述 §7,R6-a); 把综述 §3.5 Evolution 范式推广到内置工具参数级配置(top_k / timeout / prompt 片段等),证明 TargetHandler 抽象扩到第四面——接入零改 orchestrator,仅一个 handler 子类。 - 迁移 0088:builtin_tools.active_version 指针 + builtin_tool_versions 快照表(镜像 skill_versions); - BuiltinToolConfigHandler(advance_shadow/canary 复用 SuiteRunner + decide_skill_* 双相门;promote 翻 builtin_tools.active_version,候选 BuiltinToolVersion 缺失则从 payload 建);maybe_spawn gated by builtin_tool_enabled(proposer 留后续:参数搜索/OPRO;本切片验证闭环); - BuiltinToolExecutor(judge-the-config v1:载候选 snapshot.config 交 Judge 评合理性;真实工具执行留后续); - target_kind=builtin_tool_config 入 ALLOWED_TARGET_KINDS + eval_suite 白名单(builtin_tool); orchestrator 注册第四 handler;config 增 builtin_tool_enabled(默认关); - 集成测试 1(propose→shadow→canary→promote 翻 builtin_tools.active_version 到候选 0.2.0)。 TargetHandler 四面齐备(retrieval / skill / memory_pipeline_prompt / builtin_tool_config)。 eval+evolution 110 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): runtime canary 在线 error-rate 门——受控发布在线信号(综述 §9.3,R6-b); advance_runtime_canary 全量发布前增「在线 error-rate 门」:聚合 runtime_canary 窗口内 expand_skill 真实生产调用(按 canary_assignment 分候选桶 vs 基线桶),候选 error-rate 较基线退化 → rollback (捕捉离线 eval 套件漏掉的真实分布问题)。与 R4-c 离线复评门双保险。 - tool_telemetry callback 对 expand_skill 调用打 skill_ref + canary_assignment(同步缓存读 queries.get_cached_skill_canary + bucket_index,不触 DB,热路径安全); - queries.get_cached_skill_canary(同步读 _skill_canary_cache,供热路径); - decision.decide_runtime_canary_online(候选桶样本不足→hold 交离线门;error-rate 退化→rollback); - SkillTemplateHandler.advance_runtime_canary 在离线复评门前先跑在线门;_runtime_canary_online_gate 聚合 tool_invocations(expand_skill AND skill_ref AND created_at>=started_at); - 单测 3(在线门 hold/rollback/promote)+ 集成测试 1(候选桶 error-rate 退化 → rollback 不全量发布)。 eval+evolution 114 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * docs(evolution): doc 141 §5 更新——R6 第四面 + 在线 error-rate 门落地; TargetHandler 四面齐备; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): knowledge_strategy 第五进化面——TargetHandler 第五子类(综述 §7,R7-a); TargetHandler 五面齐备(retrieval / skill / memory_pipeline_prompt / builtin_tool_config / knowledge_strategy)。eval+evolution 115 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(eval): agent-loop v2 多轮推理 + 预算框架(综述 §3,R7-b); AgentLoopExecutorV2(execution_mode="agent_loop_v2"):多轮 skill-conditioned 推理循环——每轮 LLM 看前轮产出 + critique-and-refine 指令,逐步改进;max_turns 预算控制(默认 3);[FINAL] 收敛检测; 累积 cost_usd。比 v1 单轮更贴近综述 §3「skill 指导真实多步任务行为」语义。 - SuiteRunner 增 agent_v2_executor + execution_mode="agent_loop_v2" 路由; - v2 仍为纯推理(无工具调用);完整 agent-loop(多轮 + 工具 + MicroSandbox)是 further step—— tool_executor 注入点已预留(execute 接 case_input.get("tools")); - 集成测试 1(agent_loop_v2→路由到 v2 executor,cost_usd 记录证明)。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * docs(evolution): doc 141 §5 更新——R7 第五面 + agent-loop v2; TargetHandler 五面齐备; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * fix(evolution): pre_propose_check cost_today_usd D7 绕过——聚合 eval_runs.cost_total(R8-c); D7(tool_invocations.cost_usd 恒 NULL)是架构正确的——函数调用无 LLM usage。 进化子系统的主导成本是 eval suite 运行,其 $-cost 已由 R4-b+R5 写入 eval_runs.cost_total。 - queries.fetch_today_eval_cost:SUM eval_runs.cost_total WHERE today AND completed; - retrieval.py maybe_spawn 替换 cost_today_usd=0.0 stub → max_cost_usd_daily 现生效。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(eval): 安全红队 seed + 持续安全复评(综述 §9.3 + SI #6,R8-d); - safety_seed.py:综述 §9.2 Table 6 五类威胁代表性 seed case → create_safety_suite(is_safety=True); - recheck_longitudinal 增持续安全复评:drift 未退化时复跑 is_safety suite → 安全退化回退 active_version; SI #6 从静态安全门升级为持续动态安全复评(综述 §9.3)。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(evolution): agent_prompt 第六面 + ADR-3 Sync——TargetHandler 六面齐备(综述 §7,R8-b) - 迁移 0089 agents.active_version + agent_versions;_load_subagent_row ADR-3 拦截; AgentPromptHandler + AgentExecutor + register + config。 sync 无需改(不设 active_version)。97 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(eval): agent-loop v3 多轮+execute_code MicroSandbox(综述 §3,R8-a); AgentLoopExecutorV3(execution_mode="agent_loop_v3"):多轮 litellm tool calling loop + execute_code via MicroSandbox(microVM 隔离)→ 结果回灌 → 继续推理。最贴近综述 §3 「skill 指导真实多步任务行为」语义。agent-loop 三级齐备(v1 单轮 / v2 多轮推理 / v3 多轮+代码执行)。 - litellm tools=[execute_code] + tool_choice="auto";response.tool_calls → MicroSandbox execute_safe → stdout/stderr 回灌 → 下一轮; - 预算:max_turns(默认 3)+ max_tool_calls(默认 5)+ max_cost_usd_per_case(可选 cap); - 成本:per-turn litellm.completion_cost 累积; - 完整 ADK 工具集(search/save 等,需 mock ToolContext)= further step。 4 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(eval): agent-loop v4 完整 ADK 工具集——EvalToolContext mock + 多工具 dispatch(R9-a) agent-loop 四级齐备(v0→v1→v2→v3→v4)。4 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * feat(eval): AutoRedTeamer 自动攻击生成——LLM 驱动红队 case 发现(综述 §9.3,R9-b); AttackGenerator:基于 skill 防御 prompt + 综述 §9 五类威胁分类法 + 近期成功攻击记忆,LLM 生成新的对抗输入 → generate_and_add_attacks 加入 is_safety suite(source=synthetic)→ 下次 longitudinal_recheck 自动发现新漏洞。与静态 safety_seed(R8-d)互补。 - 综述 §9.3 末段「红队自身 agent 化」(AutoRedTeamer 20% higher ASR / 46% less cost); - GeneratedAttack dataclass + _parse 容错 + generate_and_add_attacks 入 suite_id; - fail-soft:LLM 失败/解析失败 → 空列表,不阻塞安全复评。 35 测试全绿;ruff 全过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * fix(eval): V3/V4 tool 预算残缺 + V4 save_to_memory 隔离 + 演化 prompt 花括号安全; 评审缺陷修复(eval 子系统 3 项): - runner.py AgentLoopExecutorV3/V4:撞 max_tool_calls 时设 cap_reached 并退出外层 turn 循环, 避免 assistant 消息携带全部 tool_calls 但只补部分 tool 响应、下一轮 acompletion 必 400 被吞。 - runner.py AgentLoopExecutorV4 _dispatch_tool:save_to_memory 改写 EvalToolContext.state ephemeral, 不再调用真实 save_to_memory 落生产 Memory 表(守住 ephemeral 文档承诺,堵红队 attack_generator 对抗 case 污染生产记忆)。 - llm_fact_extractor.py:.format(turns=…) → .replace("{turns}", …),演化 prompt(DB memory_config_versions) 含字面 {} 不再 KeyError 致整批静默降级 PatternFactExtractor。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * fix(evolution): 评审缺陷修复——spawn 崩溃/失败信号/缓存失效/回退一致性 6 项; 评审缺陷修复(evolution handlers 6 项): - memory_pipeline.py _spawn_bg:读 draft.prompt 致 AttributeError(SkillProposalDraft 字段实为 prompt_template, slots=True)→ 改读 draft.prompt_template;memory_pipeline 面 spawn 不再必崩。 - skill.py _fetch_failing_cases:join EvalCase.input 取 task 文本(EvalResult 无 task 字段), proposer 反思拿到具体失败场景而非仅 score。 - skill.py _promote/_rollback:调 invalidate_canary_cache(proposal.target_ref),回滚后 queries._skill_canary_cache 15s TTL 内不再把 expand_skill 流量分到已拒 proposed_version。 - skill.py _spawn_bg:抽 _spawn_one + per-iteration try/except + db.rollback(),单 skill 异常 (proposer 失败 / uq_skill_version 冲突)不中断同 tick 其余 skill。 - skill.py recheck_longitudinal:纵向 drift 回退与安全回退设 proposal.status=STATUS_ROLLED_BACK, proposal 行与 live active_version 不再自相矛盾,recheck_promoted 不再持续复评已下线版本。 - agent_prompt.py _promote:翻 agents.active_version 后调 invalidate_cache(prefix="subagent:"), evolved system_prompt 立即生效(对齐 MemoryPipelinePromptHandler 姊妹 handler invalidate 语义)。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * test(eval): 补 V3 tool 预算残缺 + V4 save_to_memory ephemeral 回归测试; 针对评审 fix #2 / #4 此前零覆盖路径补 2 项回归测试(test_agent_loop_executor.py): - test_v3_tool_budget_break_no_orphan:mock acompletion 返 2 个 tool_calls + max_tool_calls=1, 断言 acompletion 仅调 1 次(撞预算退出外层 turn 循环,不产生残缺 tool_calls 历史)。 - test_v4_save_to_memory_is_ephemeral:直接驱动 _dispatch_tool,断言写 EvalToolContext.state、 返回 saved_ephemeral(不落生产 Memory 表)。 两测试在 buggy 代码上失败、fixed 代码上通过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * test(evolution): 补 spawn 崩溃/失败信号/batch 隔离回归测试; 针对评审 fix #1 / #3 / #8 此前零覆盖路径补 3 项回归测试: - test_spawn_bg_uses_proposer_draft_prompt_template_field(memory_pipeline):注入返 SkillProposalDraft 的 fake proposer,断言 _spawn_bg 落 EvolutionProposal.payload['prompt'] = prompt_template(buggy 读 draft.prompt 致 AttributeError,0 提案)。 - test_fetch_failing_cases_includes_task(eval_skill_gate):seed case.input.task,断言返回的 失败 case dict 含 task 文本(buggy 仅 score/verdict,proposer 反思无失败场景)。 - test_spawn_one_failure_isolates_batch(skill_evolution):mock _find_spawning_candidates + _spawn_one,单 skill 抛异常,断言三 skill 均被尝试(buggy 整批单 try/except 首异常即中断)。 三测试在 buggy 代码上失败、fixed 代码上通过。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
ThreeFish-AI
added a commit
that referenced
this pull request
Jul 5, 2026
* docs(wiki): 三主题导航战术打磨(着陆页/标题/转录归位/陈旧清理); - 新增 reference/、perceives/、wiki/ 三张索引着陆页,补齐「技术参考」分部架构总览缺口 - 修复 cognizes/readme 与 110-oceanbase-practice 的标题回退(裸字 readme / oceanbase practice → 正式标题) - Perceives 三页标题中英复合化(Framework · 架构设计 / Development · 开发指南 / User Guide · 用户指南),与全站中文导航一致 - 将 raw 播客自动转录从 reference/cognizes/audio/ 迁至 research/cognitive-context/010a-(语义归位:原始背景材料属 research),同步迁移 .zh.md 翻译对;删除 29MB 非入库 .m4a 二进制(转录已保全内容)与空壳 _category_.json - ops.md ISR 残留术语清理 + L466 断链锚点修复(#5-部署--构建--缓存 → #5-构建部署与内容刷新);070-development-guide 加外部独立仓作用域边界告警 + 标题;transcript-view 两处 TODO 改「截图待补(后续专项实拍)」 - Agent Sandbox 080/081/082 补 description frontmatter,澄清综述/正交分析/信任架构三联关系 - knowledge-map「概念层(Concepts)」误标校正为「Cognizes 引擎与子系统设计」(该节实链 reference/cognizes/engine/) build_docs_pack 实测导出核对通过:顶层序不变、3 张索引页浮顶、6 处标题修正、reference 音频污染消除、转录归位 research/cognitive-context。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com> * docs(wiki): 修正评审反馈的索引描述(Cognizes 阶段计数 + Sandbox 路线清单); - cognizes/readme.md、reference/readme.md:将「五阶段(... Realm / Mind / Demo)」 合并为 5 项「Realm of Mind / Demo」,与 engine/040-the-realm-of-mind.md 单一 Phase 命名及 knowledge-map.md 的 P4 The Realm of Mind 一致; - 080-agent-sandbox.md:description 路线清单由「Wasm / Firecracker / 托管式 / Vertex」 修正为正文对比表实际的「Wasmtime / Firecracker / gVisor / Vertex」,补回独立路线 gVisor 并统一全称命名(与姊妹篇 081 一致)。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
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.
…ervice 工厂