Repository navigation
feat(evolution): 资产进化与 RSI 工作台 - #1314
Open
newexploreor wants to merge 30 commits into
Open
newexploreor wants to merge 30 commits into
newexploreor wants to merge 30 commits into
Conversation
…improvements Attribute failed nodes, rework, low eval scores and user feedback to agents and rules, let an improver draft a candidate body, replay historical runs with the candidate injected (catalog untouched), and release only after a human confirms. Every release and rollback appends an immutable asset version; runs pin the asset hashes they started with. Replay runs never deliver issues, send notifications, use platform MCP writes or count in run lists and analytics. Adds the evolution center (board, proposal and version drawers, L0-L2 policies, pinned regression samples) and feedback / pin-sample actions on the run detail page. Schema: migrations/027_asset_evolution.sql (run manually).
A finding raised only by user feedback or low eval scores points at runs that succeeded, so proposal generation found no failing sample and stopped. Succeeded runs that carry such a signal now become diagnosis samples. Since run status cannot prove the feedback is resolved, such a proposal passes when no replay regresses and the verdict asks the reviewer to compare replay outputs.
…udging replays - Escape literal control characters inside JSON strings before giving up on the improver output. - A replay of a feedback-only sample that fails because the improved node itself submitted fail/rework is the behavior change under test, not a regression; it now counts as unchanged with a note to review the output. - Replays auto-approve human gates (approval nodes, upstream agents asking for confirmation) when the source run passed the same node. Gates raised by the improved node stay open and still block after the wait grace.
…ct delivery review reworks design
# Conflicts: # design.md # web/app.js # web/app/harness-motion.js # web/app/harness-ui.css # web/embed.go # web/index.html # web/knowledge.css # web/knowledge.js
# Conflicts: # AGENTS.md # internal/engine/node_execute.go # internal/httpapi/server.go # internal/repo/models.go # internal/repo/repo.go # migrations/seed/001_public_catalog.sql # web/app.js # web/embed.go # web/i18n-en.js # web/index.html
Co-authored-by: Cursor <cursoragent@cursor.com>
Robert0622
reviewed
Nov 24, 2026
Robert0622
left a comment
Collaborator
There was a problem hiding this comment.
Review:feat(evolution): 精简 RSI 工作台与回放验证(#1314)
结论:先不 Approve。 整体方向没问题,真实部署跑完整条链路也没有出现运行时错误。有 2 个 P2 建议合入前修掉:一个是本 PR 新引入的前端测试失败,一个是列表轮询会打断搜索框输入。另有几条 P3 可以顺手处理。
- Reviewed head:
d12cc463f7817bbc8cdf546b2eb80a34686d0197(basefeat/asset-evolution@9822011b) - 方式:代码审阅 + 本机真实部署(Go 1.26.11 编译 PR 和 base 两个平台实例,MySQL 8.4.7 全新库,CodeBuddy CLI 用
deepseek-v4.1-flash真跑 SOP 和改进器),再用 Chromium(Playwright)实际操作页面
实测链路(PR 实例,全部为真实运行)
- 新建项目、角色「摘要撰写员」和单节点 SOP「会议纪要摘要」。跑了 3 次真实运行,每次约 9–19 万 tokens,然后对其中 3 次提交「待办没单列、缺负责人」的反馈。
- 生成提案:改进器真实调用后回放 4 条(诊断 2 条、留出 2 条),结果
通过:修好 1,回归 0,持平 3。 - 开启 50% 试用,跑 8 次真实运行。试用版 5 次、当前版 1 次,都是一次成功。
- 发布 v2,再跑 2 次运行,然后回滚到 v1(生成 v3)。
- 在回滚后的详情页点「重新生成修改建议」,通过页面生成第二个提案:回放 6 条(含 2 条固定回归样本),结果
通过:修好 1,回归 0,持平 5。 - 点「发起诊断」:按钮先变成「诊断中…」,完成后提示「诊断完成:14 次运行,1 个问题…」,按钮恢复。
页面实测结果:
| 场景 | 结果 |
|---|---|
列表:统计条(待处理 / 迭代中 / 已发布)、问题短标题、SOP · 会议纪要摘要、改动摘要、阶段(试用中 → 已发布 v2 · 观察中 → 已回滚 → 待你确认)、更新时间 |
✅ 随真实状态变化 |
| 筛选:状态(待处理 / 迭代中 / 已发布 / 已回滚)、SOP、排序;搜索命中和不命中(显示「暂无匹配任务 / 清除筛选」) | ✅ |
| 「近期发布」「回滚记录」分组,从记录进入详情再返回,分组保持不变 | ✅ |
详情:六步进度(试用显示 50% · 1/3,发布后观察显示 0/5 次,回滚后显示 × 观察 已回滚),带行号的左右对比(+13 行新增 −1 行删除,可展开) |
✅ |
| 历史验证样例弹窗:原运行 → 回放结果、变化摘要;「运行输入与原始记录」「判定依据」可折叠 | ✅ |
| 弹窗焦点:打开后焦点在「关闭样例」,Esc 关闭后焦点回到触发的那一行 | ✅ |
深链接 #/evolution/proposals/<id>;返回列表后 hash 为 #/evolution,焦点回到原来那行 |
✅ |
| 深色主题(1440)和窄屏(390):弹窗宽度 680 / 356,页面没有横向溢出(详情页里的表格在自己的容器内横向滚动) | ✅ |
全过程 pageerror / console.error |
0 |
自动化测试:
go vet ./web ./internal/evolution ./internal/httpapi通过;go test ./web ./internal/evolution通过;go test ./internal/httpapi -run 'Evo|Evolution|Feedback'通过。- webtest 全量(
node --test tests/**/*.test.mjs):base 288 项里失败 49 项,PR 289 项里失败 45 项。逐项对比,PR 修好了 5 项,但新增了 1 项失败,见 P2-1。
P2
P2-1 本 PR 新增一个 webtest 失败(描述里写的「45 项为既有失败」不准确)
- 位置:
web/evolution.js:156把空项目提示从「请先在顶部选择一个项目,进化中心按项目诊断角色与规则」改成了「请先在顶部选择项目」,但webtest/tests/evolution-center.test.mjs:303仍然断言/请先在顶部选择一个项目/。 - 复现:
cd webtest && node --test tests/evolution-center.test.mjs。用例evolution center asks for a project and decorates run details在 base 上通过,在 PR 上失败:The input did not match the regular expression /请先在顶部选择一个项目/. Input: '请先在顶部选择项目' - 说明:PR 描述里「4 项恢复通过,45 项为既有失败」,实际是恢复 5 项、新增 1 项,净值才是 4。
- 建议:同步改这条断言。
P2-2 列表轮询会整体重建搜索框,光标跳到开头,中文输入法的组合输入被打断
- 位置:
web/evolution.js:175-181。有回放中或试用中的提案时,每 15 秒执行一次evoRefresh();evoRender()。evoRender在:257用root.innerHTML=evoUnifiedListHTML()重建整个列表,包括[data-evo-task-search]和几个 select;:260只把焦点找回来,没有恢复光标和选区。 - 实测(第 3 步试用进行中,真实浏览器):
- 在搜索框输入「摘要撰写」,选中第 1–3 个字,等 17 秒:input 元素已被替换,
selectionStart/End从1/3变成0/0,焦点还在搜索框里,但光标跳到了开头,接着输入的字会插到最前面。 - 通过 CDP 让输入法处于组合态(
huiyi),等一次轮询:组合中断,拼音huiyi被原样写进输入框,值变成摘要撰写huiyi。 - 同理,展开着的筛选下拉框也会被收起。
- 在搜索框输入「摘要撰写」,选中第 1–3 个字,等 17 秒:input 元素已被替换,
- 对比:base 的首页没有输入框,这是新加搜索框后才出现的。PR 自己的 input/change 事件走的是局部刷新
evoUpdateHomeResults(web/app/evolution-home.js:144),只有轮询这条路径还在整页重绘。 - 建议:列表视图下轮询只更新行和统计(复用
evoUpdateHomeResults/evoUpdateWorkspaceTasks);或者在搜索框、筛选框有焦点或正在组合输入时(compositionstart/compositionend)推迟重绘,重绘后再恢复selectionStart/End。
P3
- P3-1「退化」和「改善」用了同一个图标:
web/app/evolution-story.js:46-47里fixed和regressed都是arrow-up,筛选按钮和结果徽标只能靠颜色区分。建议regressed改成arrow-down或undo(旧首页用的是undo)。 - P3-2 回放案例名称有时取的是改动标题,不是样例本身:
evoStorySampleName(evolution-story.js:33-37)在没有issueTitle时用point.title。实测中诊断样本显示成「门禁不可用须如实上报」「明确三段式输出结构」,弹窗里的「变化摘要」又是「修改要点:门禁不可用须如实上报」,同一句话出现两次;而留出样本显示的是「会议记录:周三技术例会。」或「留出样本 3」。三种命名混在一列,不容易看出各行是哪次运行。建议优先用运行输入的摘要或运行时间命名,改动要点只放在变化摘要里。 - P3-3 历史记录的 SOP 筛选可能漏行:
web/app/evolution-home.js:93、:99-100。历史行在group.issues里找不到对应的r时,evoFindingWorkflows(undefined)返回[],只要选了任意 SOP,这条记录就会被筛掉。可以用 proposal 自带的样本运行或 workflow 信息兜底。 - P3-4 六步进度「诊断」可能点了没反应:直接打开一个没有关联 finding、问题文本又很短的提案时,
#evoProblemOverview和#evoProblemEvidenceDetails都不会渲染,按钮可点但 target 为空。本次实测数据下三个可点的步骤(诊断 / 生成修改 / 回放验证)都能正确定位。
与本 PR 无关、但实测中看到的
- 第一次运行因为本机缺 gate MCP 二进制,失败在启动阶段(基础设施错误)。改进器把这条当成「诊断样本 · 失败 → 回放一次成功 · 改善」,第二个提案还据此加了一条「门禁不可用须如实上报」。这和 #1135 评审里 P2-2(基础设施失败被当成资产缺陷)是同一个问题,不属于本 PR 的界面改动范围,只是记录一下。
added 2 commits
November 25, 2026 10:17
Limit historical validation to repository-free role and approval workflows, remove external credential and MCP bindings from replay execution, and disable replay browser provisioning. Scope canary assignment and observation to private project assets, and require deployment opt-in for L3 automation. Renumber evolution migrations after main, document the rollout and public API, and add regression coverage for admission, credentials, project isolation and UI controls. (cherry picked from commit 810bbe6)
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.
What changed
Scope
Compatibility
main为合并目标。合并包含既有资产进化能力及工作台体验更新。AGENTFLOW_EVOLUTION_AUTO_ENABLED启用。部署时按文档协调更新平台与 Runner。043_asset_evolution.sql和045_evolution_asset_queue.sql。044_product_delivery_review_rework.sql是独立的手工数据迁移。合并 PR 不会执行这些 SQL。Validation
main并解决冲突,git diff --check和python3 scripts/check-public.py通过。go vet通过。另行验证了 OpenAPI 和公开内容检查。main提交复现了既有失败。平台全量校验以 GitHub CI 为准。Safety