Skip to content

refactor(status): single-source shared projection carriers - #5285

Merged
huangruiteng merged 2 commits into
mainfrom
codex/status-carrier-single-owner
Sep 29, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/status-carrier-single-owner

Conversation

@Duang777

@Duang777 Duang777 commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

Scope And Continuation

  • Completed scope and remaining work: monitor_display_projection.py owns MONITOR_SIGNAL_WAITING_ON; active_state_projection.py owns SECTION_HEADING_PATTERN; contract_projection.py owns STATUS_CONTRACT_SIGNAL_LIMIT. Four duplicate declarations are removed without changing their values. Self-review also removed the differently named monitor defaults from project_asset.py; every production builder now receives the signal and stop condition from monitor_display_projection.py. The string inventory moves same_runtime_forks 12 -> 11, same_runtime_fork_definitions 28 -> 25, and same_runtime_forks_semantic 10 -> 9.
  • Slice boundary / successor: complete within this scope. AGENT_LANE_PROGRESS_SCOPE remains 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

  • Tested revision: 8274afe2f7a9a46c1d456a7dc92e1f63da3f4413
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
unit passed tests/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.
integration passed Status/attention/diagnose/monitor/active-state control-plane selection: 599 passed, 5061 deselected. Control-plane import boundaries: 15 passed.
static passed Ruff passed on all changed Python files; configured Mypy passed for 19 source files; git diff --check passed.
real_entrypoint passed Project-asset, Todo boundary, goal-attention, monitor-display, active-state, and status read-model smokes passed.
regression_parity passed Semantic vocabulary smoke passed with same_runtime_forks=11/11, same_runtime_fork_definitions=25/25, and same_runtime_forks_semantic=9/9. The architecture semantic inventory/drift selection passed 139 tests.
premerge passed Standard risk-selected premerge completed 19 checks with zero failures, warnings, or manual holds against the exact 11-file diff.
  • Coverage and gaps: the full repository test suite was not run. The focused suites cover all changed import bindings, their real read-model entrypoints, import boundaries, and the semantic budget gate. No backend or persisted state changes.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A
  • After: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: Core control-plane hardening under the accepted Semantic Vocabulary Convergence RFC, Track A.

Shared-authority RFC fixture impact

N/A. This PR does not claim progress against the shared Goal Authority or TypeScript migration RFCs.

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths.
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

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>
@Duang777

Copy link
Copy Markdown
Collaborator Author

Self-review follow-up is included in 8274afe2f7a9a46c1d456a7dc92e1f63da3f4413.

The review found that project_asset.py still held differently named defaults for the monitor signal and stop condition. That meant a later change to the recorded owner could update attention routing while project-asset classification retained the old values. The fix removes those defaults from the work-item layer, makes its builder dependencies explicit, and routes all production callers through the monitor-display projection owner. The public status.build_project_asset signature is unchanged.

Red-green evidence: the new mutation test failed before the fix with selective_assist instead of read_only_observer, then passed after the owner values were threaded through. Current validation: 599 selected control-plane tests passed, 139 semantic architecture tests passed, four affected read-model smokes passed, Ruff and Mypy passed, and the standard premerge gate passed 19/19.

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

精确 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.

@huangruiteng
huangruiteng merged commit b9a34c3 into main Sep 29, 2026
27 of 32 checks passed
@huangruiteng
huangruiteng deleted the codex/status-carrier-single-owner branch September 29, 2026 13:10
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