feat(core): 三连逆向借鉴的独立模块 - Claude Code/Codex/PenguinHarness - #181
Open
raymondginger2018-sudo wants to merge 4 commits into
Open
feat(core): 三连逆向借鉴的独立模块 - Claude Code/Codex/PenguinHarness#181raymondginger2018-sudo wants to merge 4 commits into
raymondginger2018-sudo wants to merge 4 commits into
Conversation
raymondginger2018-sudo
force-pushed
the
pr/reverse-landing
branch
3 times, most recently
from
August 16, 2026 00:20
6ce4fe9 to
485c993
Compare
Collaborator
|
感谢这份工作量可观的贡献!已在最新 main(合并后)上试合验证:无冲突,全量 1572 passed(含你新增的约 97 个用例),ruff 通过。 全部为新增文件、不修改任何既有代码,并且用环境变量( 一个流程上的建议:8 个模块放在同一个 PR 里(+3031 行)评审周期会比较长。如果能拆成几个独立 PR(例如 keyring / classifier / loop 系列分开),我们可以更快逐个合入,你也不必等最慢的那一个。 |
raymondginger2018-sudo
pushed a commit
to raymondginger2018-sudo/DeepCode
that referenced
this pull request
Aug 19, 2026
从三连逆向分析(Claude Code v2.1.233 / Codex v0.145.0 / PenguinHarness)提炼的独立新模块,全部零依赖 core 其他改动,可直接在 upstream 架构上运行: - core/harness/classifier.py: LLM 风险分类器 (env: DEEPCODE_RISK_CLASSIFIER) — Claude Code Auto-mode 借鉴 - core/keyring.py: 系统密钥环 + JSON 兜底 (env: DEEPCODE_KEYRING) — Codex keyring-store 借鉴 - core/memory_distill.py: 会话→cerebellum 记忆桥接 + secrets 脱敏 + Phase-1 结构化提取 (env: DEEPCODE_MEMORY_DISTILL / DEEPCODE_MEMORY_DISTILL_STRUCTURED / DEEPCODE_CEREBELLUM_SCHEDULER) - core/observability/events.py: 规范命名事件 EventName/emit_event — Claude Code 遥测借鉴 - core/loop/goal_file.py: GOAL.yaml 模型可写状态协议 (信箱+容错归一化) — PenguinHarness 借鉴 - core/loop/optimizer.py: ArtifactOptimizer 自进化接受/回滚闭环 — PenguinHarness agent-optimization 借鉴 - core/loop/evaluation.py: 评测隔离协议 (public/private + 快照变更检测) — PenguinHarness 借鉴 - core/loop/cerebellum_optimizer.py: 端到端 skill 进化闭环 (提案→apply→MRR→接受/回滚) — 接 cerebellum 路径全部 env 可覆盖 + 仓库相对解析, 无硬编码绝对路径; 缺失 cerebellum 优雅降级。 97 测试全绿 (独立模块, 基于 upstream/main)
依据 microsoft/generative-ai-for-beginners 22 课学习报告(F:\DS-HARNESS\genai-course-learning.md)与借鉴计划(F:\DS-HARNESS\genai-borrow-plan.md)落地 P1 九项,全部零冲突、不重复已吸收营养: - P1-1 anti-fabrication 子句: agent_setup SYSTEM_PROMPT 增加不编造证据声明 - P1-4 温度 per-task: session 工具循环默认 0.1 (profile 显式优先, 0.0 不被误替换) - P1-3 记忆注入数据-指令隔离+restrict: MEMORY.md 经 <untrusted-data> 边界注入 (lesson 13 prompt injection 防护) - P1-8 提示注入回归测试集: loop/injection_regression.py (9 样本 x 4 注入面) + 12 测试 - P1-2 工具 description 质量: base.py description_quality_issues/sanitize_description + MCP 远端 description 清洗 - P1-6 检索失败三模式缓解: loop/memory_retrieval.py 阈值 0.45 + 无记忆回退 + assert_all_injected 链路自检 - P1-7 检索评估强化: cerebellum_optimizer split_held_out_qa (异源留出) + evaluate_retrieval (余弦打分, weak 显式标记) - P1-5 压缩即记忆: runner compaction_summary_sink (auto+manual, 锚点) -> session 后台线程 -> memory compactions.md (bound 32k) + memory.compaction.deposited 事件 - P1-9 MCP server 白名单: naming.server_allowed (env DEEPCODE_MCP_SERVER_ALLOWLIST) + runtime 注册过滤 (供应链加固) 新增 79 项测试全绿; 全量 134 失败均为 baseline pre-existing (Windows 路径/symlink 特权), 本次改动 0 新失败。
raymondginger2018-sudo
force-pushed
the
pr/reverse-landing
branch
from
August 19, 2026 05:50
b019a5f to
f41c349
Compare
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.
概述
从三个开源 coding agent 的逆向分析中提炼的独立新模块(零依赖 core 其他改动,可直接在 upstream 架构上运行):
设计要点
测试
97 个测试 (8 个新测试文件), 全部通过, 基于 upstream/main 验证