Skip to content

feat(evolution): member-scoped attribution, clusters and patches (#814) - #823

Merged
Shadow-Azure merged 5 commits into
mainfrom
agent/issue-814-member-scope/issue-patch-target-mismatch-b069f4c352b6
Dec 5, 2026
Merged

Shadow-Azure merged 5 commits into
mainfrom
agent/issue-814-member-scope/issue-patch-target-mismatch-b069f4c352b6

Conversation

@ZTGolem

@ZTGolem ZTGolem commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

变更

实现 issue #814:归因、聚类与 edit patch 共享成员身份。

  • 归因 fan-out:多成员对象的发现型候选按“case 自身成员 ∪ Session 命中成员”逐成员产出 probe_reports;self case 只归上报成员。新增 evolution_run_candidate_probes run 级关联记录全部报告(唯一键 run+case+member),evolution_run_candidates.probe_id 只保留首个指针。对象级报告只在候选集合为空时兜底;单成员/历史缓存键与路径不变。
  • 聚类成员键:draft/簇携带 member_id;LLM 审查校验禁止跨成员合并,超限分批与降级桶都按 (type, member);probe_clusters.member_id 持久化(migration 0044)。
  • 成员 patch:CandidateTrace.member 由簇成员解析;allowed_paths 只含该成员 sub_dir,prompt/commit 写该成员;对象级保留并集兜底。
  • 前端:第 4 步按 case rowspan 展示多份成员报告;第 5 步按成员分组、每簇单成员;第 6 步显示成员、改动范围与成员级 commit;信息面板报告/案例口径修正。
  • 历史:member_id=null 的历史报告/簇/轮次只读兼容,不重写;评测仍是 run 级一个分数。

检视修复

已按 检视记录 修复:

  • 0044 对 bad_cases/probe_reports 的外部表外键按 0006/0020 约定加 has_table 守卫,运行期 bootstrap_external_tables=False 不再依赖外部表;补 run+case+member 唯一键,cache key 变化时原地更新关联而不是留两行。
  • self case 只归上报成员,不再把“成员自身 case”写成其它成员的 attributed 报告。
  • 混合历史 run 的 pointer-only case 视为已完成,不再被 run 级 junction 回退重新归因/重写。
  • job 面板按报告单位计数,fan-out 后不再显示“完成 4/2”。
  • 单成员 run 的簇/轮次显示成员回退;第 4 步“恢复”只对冻结的 case 级 revision 显示,避免次要报告 409。
  • 删除未接入的 _source_sub_dir,更新 repair 注释。

设计/原型对齐

实现按 plans/fullstack-design/18 §5.2/§5.4、07 §5.5.2/§5.5.4 与 plans/ui-prototype-v2/design-v2.md §7.1.1 落地;UI 行为与 plans/ui-prototype-v2/harness-evolution.html 的 member-scope 原型一致。

真实应用冒烟

本地启动真实 API + Web(demo fixture + SQLite),种子数据为 2 个成员、2 个 bad case、3 份归因报告(1 个 discovery case 产生 2 份成员报告)、2 个成员簇、0 个跨成员簇;1440×1000,浅色主题。截图只含 demo 数据,不含生产凭据。

步骤 Before(真实应用,main da40229d) After(真实应用,本 PR head e850df5b) 原型对照(改动后)
第 4 步 before step4 after step4 prototype step4
第 5 步 before step5 after step5 prototype step5

冒烟断言:Before 为 main 真实应用,2 条报告(discovery 对象级 + self 成员)、1 个混合簇;After 为 PR head 真实应用,2 个成员、2 个 bad case、3 份报告(discovery 产生 2 份成员报告)、1 个多成员 case、2 个成员簇、0 跨成员簇。第 4 步 discovery case 显示 2 份成员报告,成员分别为 code-generator 与 codespec-subagent-driven-development;第 5 步按成员分组、每簇单成员 chip。两者同为 1440×1000、浅色主题、同一 demo run/工作区。

验证

  • CI:api-static、build-lane、db-sqlite、mysql (5.7)、mysql (8.4)、unit-tests-api 3/3、unit-tests-web、e2e 4/4、e2e-integration、flow-online、docs-flow、web-static、deploy-contract 全部通过(head e850df5b)
  • 本地另跑:pnpm test:web -- src/pages/evolution 929 passed / 1 skipped;pnpm test:api 全量 2784 passed;pnpm test:db 27 passed
  • 定向复跑:pnpm test:e2e -- --pattern "783"、--pattern "m10-06" 通过;pnpm typecheck、typecheck:api、contract:check、lint:api、verify:flow-online、verify:docs 通过
  • 真实应用冒烟:第 4/5 步截图如上

已知限制

  • review 冻结输入仍为 case 级:二次成员报告随 case 纳入/移出,不能单独排除(逐报告 review 留后续)。
  • 历史混合簇无成员,仍走对象级并集,不自动拆分;历史 member_id=null 不重写。
  • 评测仍是 run 级一个分数,不按成员单独出分。

This pull request was produced by dsh-superagent under the ZTGolem account.

@ZTGolem ZTGolem added this to the Bugfix 问题修复 milestone Dec 5, 2026

@Shadow-Azure Shadow-Azure left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@Shadow-Azure
Shadow-Azure merged commit ce5a674 into main Dec 5, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants