refactor(status): single-source shared projection carriers - #5285
Conversation
Signed-off-by: duanjialing.777 <duanjialing.777@bytedance.com>
Project assets kept differently named monitor defaults after the status carrier cleanup, so a later owner change could split attention routing from project-asset classification. Route every production builder through the monitor-display projection and keep the work-item builder dependency-explicit. The mutation test changes the owner values and proves the rendered project asset follows them. Signed-off-by: duanjialing.777 <duanjialing.777@bytedance.com>
|
Self-review follow-up is included in The review found that Red-green evidence: the new mutation test failed before the fix with |
huangruiteng
left a comment
There was a problem hiding this comment.
精确 head:8274afe2f7a9a46c1d456a7dc92e1f63da3f4413。已独立阅读完整 11 文件 diff、#4447 Track A 与 #5195 的剩余-carrier 记录;本评审只判断该 head,不以作者声明或远端 CI 代替验证。
动机
状态投影的消费者曾重复声明相同的 monitor signal、section heading pattern 和 status-contract signal limit;其中 project-asset 层还保留了不同名称但同义的默认值。未来只改一侧会让 attention 路由与展示分类分叉。此 PR 的有效目标是收敛既有共享词汇的 owner,而不是以计数下降充当产品结果。
改动思路
monitor_display_projection 继续拥有 monitor signal 和 stop condition,attention 与 registry-health 的构造路径从该 owner 取值;active_state_projection 和 contract_projection 分别提供 section regex 与 signal limit。work-item 构造器只接受显式依赖,不再私藏 monitor 默认值。没有新持久字段、调度决定或第二个 authority;已存在的 status.build_project_asset 入口参数保持不变。未来面向改动的窄幅重构已经体现在这次消除重复 owner,未见需要顺带拆出新层。
具体改动
关键路径是 goal_attention_projection.attention_item → monitor_display_projection.build_project_asset → work_items.project_asset.build_project_asset:等待原因与停止条件从同一个投影 owner 注入,所以 monitor signal 变更不会只更新 attention 而留下旧分类。state_projection 的 heading regex、diagnose 的 signal limit 改为导入现有 owner,语义预算按实际减少的重复声明收紧,测试把导入身份和原值都钉住。
正例:原有 monitor、status-contract 与 collection read-model smoke 均通过,状态外观保留。负例:定向 mutation 测试改变 monitor owner 的 signal 和 stop condition,project-asset 必须仍报告 read_only_observer 与新停止条件;本 head 的 8 项 ownership 测试及另 8 项 status/diagnose 测试通过。语义 drift smoke 在安装仓库 npm 开发依赖后通过,实测 same_runtime_forks=11/11、same_runtime_fork_definitions=25/25、same_runtime_forks_semantic=9/9。前一次 smoke 因测试工作树缺 TypeScript 包而未启动扫描,补依赖后的结果才计为通过。
对主干的风险
主要风险是模块导入边界和动态构造时默认值的漂移;已检查生产调用点,work-item builder 由投影 wrapper 注入,status 对外同名入口仍可调用。git diff --check、变更 Python 文件 Ruff、定向 pytest、三条真实 read-model smoke 与语义扫描通过;风险型 premerge 门禁通过 19/19(含 10 条 catalog、8 条 risk-profile smoke 和 public/private 边界检查),无失败、跳过或人工 hold,但它不授予合并权限。无 UI、Lark、权限或存储变化;没有把无关红 CI 归责于本 PR。此轮未查询或等待 GitHub CI,未在本机执行整个全量测试矩阵。
我的整体评价
APPROVE 这个有界的 Track A 收敛:它在当前调用路径消除了会产生分叉的默认值,而非只调低计数。AGENT_LANE_PROGRESS_SCOPE 与 LIFECYCLE_PRIORITY 仍在 #4447 的明确后续边界,不应要求本 PR 把有冲突的邻接工作混进来。评审不授权自合并;控制面改动仍由维护者按精确 head 决定。
English verdict: APPROVE — exact head 8274afe; focused ownership, status/read-model and semantic-drift validation support this bounded convergence, with no PR-attributable blocker found.
Goal And Delivered Outcome
MONITOR_SIGNAL_WAITING_ONhad three declarers, whileSECTION_HEADING_PATTERNandSTATUS_CONTRACT_SIGNAL_LIMITeach had two. Equal values did not prevent a later owner-only edit from making consumers disagree.mainatee1ea64b0.Scope And Continuation
monitor_display_projection.pyownsMONITOR_SIGNAL_WAITING_ON;active_state_projection.pyownsSECTION_HEADING_PATTERN;contract_projection.pyownsSTATUS_CONTRACT_SIGNAL_LIMIT. Four duplicate declarations are removed without changing their values. Self-review also removed the differently named monitor defaults fromproject_asset.py; every production builder now receives the signal and stop condition frommonitor_display_projection.py. The string inventory movessame_runtime_forks12 -> 11,same_runtime_fork_definitions28 -> 25, andsame_runtime_forks_semantic10 -> 9.AGENT_LANE_PROGRESS_SCOPEremains deferred because open PRs feat(explore): enforce scoped composition lineage and lifecycle evidence #5280 and fix: frame JSONL index reads on LF, not str.splitlines() #5117 touch two declarers.LIFECYCLE_PRIORITY, M3 field retirement, scanner changes, and TypeScript migration are not part of this PR.Validation
8274afe2f7a9a46c1d456a7dc92e1f63da3f4413unitpassedtests/control_plane/test_status_facade_vocabulary_owners.py: 8 passed, including a red-green mutation test for project-asset propagation. Relevant status, diagnosis, and active-state selection: 147 passed.integrationpassedstaticpassedgit diff --checkpassed.real_entrypointpassedregression_paritypassedsame_runtime_forks=11/11,same_runtime_fork_definitions=25/25, andsame_runtime_forks_semantic=9/9. The architecture semantic inventory/drift selection passed 139 tests.premergepassedFrontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
N/A. This PR does not claim progress against the shared Goal Authority or TypeScript migration RFCs.
Boundary Checklist
none.Signed-off-bytrailer (git commit -s).