Skip to content

refactor(chat): colocate configuration APIs - #7891

Merged
huangruiteng merged 1 commit into
codex/small-kernel-m1-chat-slice2-20261102from
codex/small-kernel-m1-chat-slice3-20261102
Nov 2, 2026
Merged

huangruiteng merged 1 commit into
codex/small-kernel-m1-chat-slice2-20261102from
codex/small-kernel-m1-chat-slice3-20261102

Conversation

@cocolord

@cocolord cocolord commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • stack on refactor(chat): move internal APIs under chat namespace #7883 and relocate three internal-only Chat configuration APIs into loopx.chat
  • update the presentation aggregator and active test consumers, with no top-level compatibility shims
  • tighten the top-level Python module budget from 139 to 136 and extend the namespace layout ratchet

Goal and boundary

This is the next independently reviewable M1 slice of the accepted small-kernel composition RFC. It removes three Chat-owned assembly modules from the top-level kernel surface and gives configuration composition an explicit package boundary without changing HTTP behavior.

Review this PR against its stacked base branch. It depends on #7883 at 1ab4d610c2b3468f353584a4f68d0ac9c19aa0be.

This slice is an ownership and future demand-loading prerequisite; it does not claim a runtime performance improvement.

Validation

  • exact-head standard premerge against origin/codex/small-kernel-m1-chat-slice2-20261102: passed, including 10/10 selected canaries and no manual holds
  • focused architecture, Chat API, capability, and control-plane suite: 278 passed
  • diff-scoped semantic vocabulary advisory: no supported new vocabulary carriers detected
  • staged and exact-head bilingual RFC checks: passed (no RFC files changed)
  • changed-file Ruff, diff hygiene, and Python compile checks: passed
  • source Chat server smoke: passed
  • Chat bundle build and verification: passed
  • built and installed the wheel in a disposable environment; verified the three new loopx.chat modules were present, all former top-level modules were absent, loopx chat --help worked, and installed Chat HTTP delivery passed

The machine-configuration test now includes the already-shipped antigravity executor option; the stacked base's older expected list was stale, while production behavior is unchanged.

Generated frontend assets and local validation dependencies are not part of this diff. This runtime boundary requires normal maintainer review and merge authority; this PR is not self-merge eligible.

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

@loopx-agent loopx-agent 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.

1) 问题定义(为什么改、要解决什么)

  • 承接 #7878 与 #7883 的顶层模块收拢重构,将 chat_automation_cadence_api.py、chat_goal_configuration_api.py、chat_machine_configuration_api.py 三个内部配置 API 模块移入 loopx/chat/ 命名空间,并继续收紧顶层模块预算(139 -> 136)。

2) 改动摘要(按模块分组)

  • 配置 API 模块下沉 (loopx/chat/automation_cadence_api.py, loopx/chat/goal_configuration_api.py, loopx/chat/machine_configuration_api.py, loopx/presentation/configuration_api.py):移动三个模块至 loopx/chat/ 并更新所有内部引用,不留顶层兼容 shim。
  • 架构预算收紧与测试同步 (tests/architecture/top_level_module_budget.json, tests/test_chat_internal_module_layout.py, tests/**):将 max_top_level_modules 从 139 收紧至 136,同步更新测试导入与 Steward executor_provider 选项断言(包含 antigravity)。

3) 逐点审阅结论(架构、语义、正确性、测试、风险)

  • 架构与测试一致性:模块边界清晰,test_chat_internal_module_layout.py 明确校验旧顶层路径不可导入且新路径归属正确。

4) 建议修改项(分 P0/P1/P2,带文件路径和行号)

  • 无阻塞项。

5) 最终结论(Verdict)

Approved — ready to merge once CI completes (exact head 8adea3ae103327b80d0c531e1fb40acfa85a498a verified).

@huangruiteng
huangruiteng merged commit 5343587 into codex/small-kernel-m1-chat-slice2-20261102 Nov 2, 2026
8 of 31 checks passed
@huangruiteng
huangruiteng deleted the codex/small-kernel-m1-chat-slice3-20261102 branch November 2, 2026 11:11
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.

3 participants