Repository navigation
refactor(chat): colocate leaf chat helpers under loopx.chat and ratchet module budget (#5072) - #9179
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewer: model_agent · Antigravity · Google Deepmind · self_reported
动机 / Motivation
在 loopx/ 顶层目录中,面向个人工作区与受管 chat 通道的内部叶子模块(loopx/chat_operator_provider_api.py、loopx/chat_attachments.py、loopx/chat_dsh.py)此前仍平铺在包根目录下,使 loopx/*.py 顶层模块总数停留在 124 个。对于需要按目录划定 CODEOWNERS 与推进 loopx-core / loopx-workspace 拆分(#5072)的贡献者和维护者而言,这种平铺结构让私有/内部 chat 辅助模块与 quota.py、todos.py 等核心内核入口混在一起,阻碍模块归属清晰化并使顶层模块预算停滞。
迁移前后的核心变化如下:迁移前 loopx/ 顶层包含 124 个 .py 模块且 3 个内部 chat 叶子模块平铺在包根目录,而迁移后 3 个模块归位到 loopx/chat/ 且零永久顶层 shim,顶层模块数降至 121 个。可验证的结果是:loopx/*.py 数量从 124 降为 121,test_top_level_module_budget.py 与 test_chat_internal_module_layout.py 通过且所有调用方保持原有行为不变。本 PR 不修改任何公开 API 语义、协议 schema、运行期权限边界或默认行为。作为 #5072 M1 的一个独立可回滚批次,其余尚未迁移的顶层 chat_* 与 *_goal_mode 模块仍待后续 M1/M2 PR 推进。
改动思路 / Approach
| 变更维度 | 迁移前(64353773dc) |
迁移后(149a7ed12b) |
约束 / 收益 |
|---|---|---|---|
| 模块落点 | loopx/chat_{operator_provider_api,attachments,dsh}.py |
loopx/chat/{operator_provider_api,attachments,dsh}.py |
复用 loopx/chat.py 的 __path__ 命名空间包,无 __init__.py |
| 相对导入深度 | 同级 .control_plane / .chat / .chat_agent |
子包内 ..control_plane / ..chat / ..chat_agent |
保持原有导入图与延迟加载时机不变 |
| 兼容桥接 | 顶层文件直接存在 | 无永久顶层 shim(I3 内部迁移直接删除旧入口) | importlib.util.find_spec 确认旧模块不再解析 |
| 预算棘轮 | max_top_level_modules: 124 |
max_top_level_modules: 121(baseline 更新至 64353773dc) |
由 test_top_level_module_budget.py 强制锁定只降不升 |
整体架构复用既有模式:入口与调用边界维持在 loopx/presentation/configuration_api.py、loopx/presentation/codex_attached_api.py、loopx/chat_server.py、loopx/chat_runtime.py、loopx/chat_ingress.py、loopx/chat_agent.py、loopx/extensions/lark/ 与 loopx/capabilities/native_chat/,没有任何第二份配置或重复状态。在架构归属与职责边界上,本次迁移纯属既有 loopx.chat 命名空间下的目录归位且零新增运行期机制,完整保留了原有 provider IO 与策略边界的归属不变。当前 PR 的边界严格限定为迁入这 3 个内部 chat 叶子模块、同步全部调用方与测试和 smoke 及成对 RFC 引用、补充无 shim 断言并把顶层预算从 124 收紧至 121,其余顶层模块留待后续切片。
正向走读:ChatConfigurationRequestMixin 通过 from ..chat import operator_provider_api 挂载 /api/chat/operator-credential;ChatRuntimeController 与 builtin_chat_endpoints 从 loopx/chat/dsh.py 读取 DshChatAdapter 与 STEWARD_SEGMENT_ENV;HTTP、Lark、Codex/Antigravity adapter 从 loopx/chat/attachments.py 导入附件大小与格式校验函数。反向与架构守卫:tests/test_chat_internal_module_layout.py 显式验证三个新模块 __module__ 均位于 loopx.chat.* 下,且旧顶层模块 importlib.util.find_spec("loopx.chat_*") 返回 None。
具体改动 / Changes
依据规范 docs/architecture/rfcs/monorepo-distribution-split-v0.md(基线修订 64353773dc8b1ca82ff531cc7653dec6c3d41c0b),各条验收准则在本 exact head(149a7ed12ba92bf7737004263abba17e8ff029bc)的核对映射如下:
| Criterion ID | 规范条款 | Disposition | 验证路径 / 命令 |
|---|---|---|---|
M1-LEAF-MOVE |
M1 将内部 loopx/chat_* 迁入 loopx/chat/ 并更新内部相对导入与调用方 |
implemented |
loopx/chat/{operator_provider_api,attachments,dsh}.py;pytest -q tests/test_chat_internal_module_layout.py |
I3-NO-SHIM |
纯内部迁移同步更新所有活跃调用方并删除旧顶层入口,不保留永久兼容 shim | implemented |
全仓 rg -n 零残留引用;tests/test_chat_internal_module_layout.py 校验 find_spec 为 None |
SEC9-BUDGET |
同 PR 下调 tests/architecture/top_level_module_budget.json 的 max_top_level_modules |
implemented |
tests/architecture/top_level_module_budget.json(124 → 121);pytest -q tests/architecture/test_top_level_module_budget.py |
RFC-BILINGUAL-SYNC |
同步更新受影响的中英文成对 RFC 文档路径并保持双语一致性 | implemented |
docs/architecture/rfcs/harness-selection-dsh-pi-v0.{md,zh-CN.md};scripts/check_rfc_bilingual.py --base origin/main --head HEAD |
全量 diff 共 32 个文件(+48 / -39 行):3 个 git mv 重命名及内部相对导入深度调整(from .foo → from ..foo)、21 个内部代码/测试/smoke 调用路径更新、1 组对称中英文 RFC 路径更新(loopx/chat_dsh.py → loopx/chat/dsh.py)、1 个布局测试新增 3 项校验与无 shim 断言,以及 tests/architecture/top_level_module_budget.json 预算下调。
关键代码讲解
loopx/chat/operator_provider_api.py(OperatorProviderRequestMixin):原顶层模块通过from .control_plane.operator_provider import ...读取凭据投影与写入方法;迁入loopx/chat/后改为from ..control_plane.operator_provider import ...,而loopx/presentation/configuration_api.py改为from ..chat import operator_provider_api as operator_api。实际路由/api/chat/operator-credential、只写不回显的密钥约束与异常错误码(400 invalid_operator_credential、500 operator_credential_write_failed)均原样保留。loopx/chat/dsh.py(DshChatAdapter、STEWARD_SEGMENT_ENV):迁入子包后将 4 处顶层相对导入(.chat、.chat_agent、.control_plane.turn_driver.host_binding、.dsh_goal_mode.turn_host_adapter)全部调整为..父级包导入,确保在loopx/chat.py通过__path__暴露的子包结构中正确绑定parse_agent_response、CodexChatAgentError、dsh_output_token_budget与run_dsh_turn;单 executor 槽位锁与DSH_PERMISSION_MODE="read-only"沙箱固定逻辑保持一致。loopx/chat/attachments.py(normalize_chat_attachments、require_text_document_route):纯标准库实现,无内部相对导入;迁入loopx/chat/后由loopx/chat_server.py、loopx/chat_ingress.py、loopx/chat_runtime.py、loopx/chat_agent.py、loopx/chat/result_files_api.py(同级改为from .attachments import ...)、loopx/presentation/codex_attached_api.py、loopx/extensions/lark/与loopx/capabilities/native_chat/统一导入,继续执行图片 4 张 / 单张 5MB / 总计 12MB 与本地受管 Codex 文本文档路由限制。loopx/chat/endpoint_catalog.py(managed_host_capability):将from ..chat_dsh import STEWARD_SEGMENT_ENV调整为同级导入from .dsh import STEWARD_SEGMENT_ENV,使内置端点目录返回的sandbox_mode与实际执行片段环境变量保持单一事实源。
对主干的风险 / Risks
- 未发现阻断性回归风险(No blocking findings):全仓通过
rg -n "chat_operator_provider_api|chat_attachments|chat_dsh"扫描loopx/、tests/、examples/、apps/、packages/、scripts/、docs/,除tests/test_chat_internal_module_layout.py中有意检查importlib.util.find_spec返回None的负向断言外,零残留旧模块引用;ls -1 loopx/*.py | wc -l实测精确等于121。 - 调用方与负向边界验证:
- 架构与核心单元测试:
uv run --extra test python -m pytest -q tests/architecture/test_top_level_module_budget.py tests/architecture/test_control_plane_import_boundaries.py tests/architecture/test_package_kernel_import_ratchet.py tests/test_chat_image_attachments.py tests/test_chat_image_http.py tests/test_chat_dsh_adapter.py tests/test_chat_endpoint_readiness.py tests/test_chat_executor_profile.py tests/test_atomic_write_modes.py tests/test_chat_reasoning_selection.py tests/control_plane/test_goal_activation.py tests/test_chat_internal_module_layout.py tests/test_audit_cli_and_runtime_fixes.py tests/test_manager_context_roundtrip.py→ PASS(340 passed in 127.91s),覆盖预算棘轮、无 shim 负向断言、附件超限拒绝、DSH 并发执行器拒绝与超时错误路径。 - 下游调用方测试:
uv run --extra test python -m pytest -q tests/test_lark_private_images.py tests/test_lark_app_image_projection.py tests/test_lark_post_images.py tests/test_chat_file_discovery.py tests/test_chat_machine_configuration_api.py tests/test_chat_transport_composition.py tests/test_chat_agent.py tests/test_chat_server_cors.py tests/test_chat_startup_isolation.py tests/test_lark_private_conversations.py→ PASS(1288 passed in 823.36s)。 - 静态与双语校验:
ruff check(All checks passed!)、mypy(Success: no issues found in 17 source files)、scripts/check_rfc_bilingual.py --base origin/main --head HEAD(RFC bilingual diff check passed.)、loopx check(errors=0)与 Goal 绑定loopx canary premerge --from-git-diff --git-diff-base origin/main --goal-id personal-loopx-maintenance --format json(ok: true,selected=11 failures=0,change_qualityreceiptcqr_c5dce6287469e9a502b9valid)全部 PASS。 - Smoke 与残余风险(Residual risk):
examples/loopx-managed-turn-operator-flow-smoke.py在64353773dc基线与149a7ed12b当前 head 均输出完全一致的 5 项检查 PASS;examples/loopx-steward-managed-chat-smoke.py在当前环境因未安装可选包deepseek-harness-sdk打印skip: deepseek-harness-sdk is not installed并退出0(UNVERIFIED 真实 SDK 链路;DshChatAdapter行为本身已由test_chat_dsh_adapter.py与loopx-managed-turn-operator-flow-smoke.py覆盖)。此外未运行全仓全部 pytest,未咨询远端 CI(wait_for_ci: false)。
- 架构与核心单元测试:
我的整体评价 / Verdict
本次 PR 为 justified_increment:在不引入任何兼容债务与行为漂移的前提下,将 3 个内部 chat 叶子模块干净迁入 loopx/chat/ 并将顶层模块预算从 124 棘轮收紧至 121。
- Long-horizon (
improved):降低平铺模块规模并巩固loopx/chat/目录边界与单向预算棘轮,利于后续 #5072 M1/M2 分包交付与维护边界清晰化。 - User experience (
preserved) / Visual review (not_applicable):纯内部 Python 模块搬迁与 RFC 路径同步,未修改任何渲染界面或前端展示逻辑;已核对loopx/presentation/configuration_api.py与loopx/presentation/codex_attached_api.py仅更新 import 路径(unverified_scope:none)。 - 语义词表与兼容评估:未新增或修改任何状态枚举、协议字面量或配置语义词表(
semantic_alignment:not_applicable);observable_semantics在不可变基线64353773dc与当前 head149a7ed12b的同命令对比下保持完全等价(equivalent)。 - Exact-head freshness:复核远端 head 仍为
149a7ed12ba92bf7737004263abba17e8ff029bc,已通过本地 premerge 与 change-quality 验证。
English verdict: APPROVE at exact head 149a7ed (published as COMMENTED review because PR #9179 is author-owned; 3 M1 internal leaf modules moved to loopx/chat/, all callers/tests/bilingual RFC refs updated with zero permanent shims, top_level_module_budget ratcheted 124 -> 121, 340 + 1288 pytest cases + ruff + mypy + canary premerge PASS; optional deepseek-harness-sdk live step in loopx-steward-managed-chat-smoke.py skipped in local env).
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
149a7ed to
01bd56d
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
LoopX Chat 运行时(ChatRuntimeController、chat_server、chat_agent、chat_ingress)、Lark 私有图片与会话交付扩展、前端配置 API(presentation/configuration_api、codex_attached_api)以及 loopx-core 与 loopx-workspace 分包维护者。
迁移前(含 149a7ed12b 基线旧提交):loopx/chat_attachments.py、loopx/chat_dsh.py 与 loopx/chat_operator_provider_api.py 仍位于 loopx/ 顶层,且原 PR 分支因主干已先合并 #9056/#8905/#9190 而发生冲突与预算错位;变基到 db76a91f0c 后(精确 head 01bd56d3be):三个内部模块直接迁入 loopx/chat/{attachments,dsh,operator_provider_api}.py,dsh.py 同步对齐主干 #8905 的 _turn_prompt 导入,全仓 32 个文件(含双语 RFC)同步更新并删除旧顶层入口,预算从 122 精确棘轮收紧至 119。
loopx/*.py 顶层模块数实测为 119 且与 top_level_module_budget.json(119)吻合;importlib.util.find_spec 对 loopx.chat_attachments、loopx.chat_dsh 与 loopx.chat_operator_provider_api 均返回 None;附件校验拒收、DSH 沙箱只读环境变量与并发互斥拒绝、Operator 凭据读写及 1630 项定向单元测试均与迁移前等价。
本 PR 不改动附件校验阈值、DSH 单段只读执行契约、Operator 凭据脱敏逻辑或并发 PR #9196 的搬迁文件,也不要求本地环境安装可选 deepseek-harness-sdk。
剩余顶层 chat_*.py 与 *_goal_mode 模块迁移仍在 #5072 后续批次推进;可选依赖 deepseek-harness-sdk 未在本地安装故实跑链路跳过;另主干已推进至 PR #9193(202d7bdb05),本分支处于 BEHIND(无文件冲突)。
改动思路 / Approach
本轮是对 PR #9179 在变基至 db76a91f0cc1afb8b10505a94b0a44cf017aaa69 后的全量精确 head 复审(较此前旧提交 149a7ed12ba92bf7737004263abba17e8ff029bc 的关键更新包括:清除变基冲突、在 loopx/chat/dsh.py 对齐主干 #8905 引入的 from ..chat import _turn_prompt 相对导入、以及将 top_level_module_budget.json 的基线与上限从旧提交的 124→121 更新为当前主干基线 122→119)。依据 docs/architecture/rfcs/monorepo-distribution-split-v0.md @ 16f418837c87ab40f04ff303962598f5bd71a034,PR 采用“纯内部搬迁删除旧模块 + 全仓同步导入 + 英文/中文 RFC 成对更新 + 预算单向收紧”的零债方案。
将仅在内部消费的附件大小与格式校验、DSH 托管片段适配器和 Operator 凭据路由 Mixin 直接归位到 loopx/chat/ 并取消全部顶层兼容 shim,不引入新抽象、开关或兼容桥,同时同步修复双语 RFC 路径并把顶层预算按实际净减少量从 122 降至 119,是符合 M1 与 I3 的最小可逆切分。
当前 PR 边界(current_pr_boundary):本 PR 仅处理 chat_attachments、chat_dsh 与 chat_operator_provider_api 三个已清点叶子模块及其全仓调用方与双语 RFC 引用,保持与并行 PR #9196 搬迁目标完全正交,其余顶层模块留待后续批次。
变基与导入流向对比:
旧 head 149a7ed12b (pre-rebase, budget 124->121) ──[rebase onto db76a91f0c + #8905 _turn_prompt]──▶ 新 head 01bd56d3be528a2b50f8c901fe9407b0681af8c2
loopx/chat_{attachments,dsh,operator_provider_api}.py ──[git mv, 零 shim]──▶ loopx/chat/{attachments,dsh,operator_provider_api}.py (122->119)
具体改动 / Changes
依据规范 docs/architecture/rfcs/monorepo-distribution-split-v0.md(修订 16f418837c87ab40f04ff303962598f5bd71a034)逐条核验:
M1(implemented):loopx/chat_attachments.py、loopx/chat_dsh.py、loopx/chat_operator_provider_api.py通过git mv迁入loopx/chat/,由tests/test_chat_internal_module_layout.py断言其__module__均位于loopx.chat.*。I3(implemented):经核查loopx/__init__.py与loopx/chat.py均未对外重导出这 3 个内部模块;PR 同步更新全部 23 处内部调用方、测试与示例 smoke(含loopx/presentation/、loopx/extensions/lark/、loopx/capabilities/native_chat/与loopx/chat_*.py),且不保留任何顶层兼容 shim;同时成对同步了docs/architecture/rfcs/harness-selection-dsh-pi-v0.md与.zh-CN.md中对loopx/chat/dsh.py的路径引用。Section 9 row 1(implemented):tests/architecture/top_level_module_budget.json将baseline_commit固定为db76a91f0cc1afb8b10505a94b0a44cf017aaa69并将max_top_level_modules从122精确下调至119(实测ls -1 loopx/*.py | wc -l为119)。
关键代码讲解
DshChatAdapter(loopx/chat/dsh.py#L87-L309):负责管家通道的受控单段 DSH 只读执行(固定STEWARD_SEGMENT_ENV = {"DSH_PERMISSION_MODE": "read-only"}与单槽位并发拒绝MANAGED_HOST_CHAT_SEGMENT_IN_FLIGHT)。搬迁与变基后,相对导入精确更新为from ..chat import _turn_prompt, parse_agent_response、from ..chat_agent import ...、from ..control_plane.turn_driver.host_binding import dsh_output_token_budget与from ..dsh_goal_mode.turn_host_adapter import ...,同目录loopx/chat/endpoint_catalog.py#L20改为from .dsh import STEWARD_SEGMENT_ENV,上游loopx/chat_runtime.py#L47改为from .chat.dsh import DshChatAdapter。normalize_chat_image_attachments(loopx/chat/attachments.py#L49-L100):负责对 Chat 图片附件的 base64 编码、MIME 白名单、5MB/12MB大小上限及bool非法整数类型执行严格校验。搬迁后全部内部消费者——包含loopx/chat_agent.py#L1545、loopx/chat_ingress.py#L455、loopx/chat_runtime.py#L423、loopx/chat_server.py#L27、loopx/chat/result_files_api.py#L9、loopx/capabilities/native_chat/*、loopx/extensions/lark/*与loopx/presentation/codex_attached_api.py#L15——均已切换至loopx.chat.attachments。OperatorProviderRequestMixin(loopx/chat/operator_provider_api.py#L35-L110):为个人工作台提供/api/chat/operator-credential的只写凭据更新与脱敏状态读取。搬迁后顶部导入更新为from ..control_plane.operator_provider import ...,消费方loopx/presentation/configuration_api.py#L20改为from ..chat import operator_provider_api as operator_api。ChatRuntimeController.submit_turn(loopx/chat_runtime.py#L405-L426):在入队或提交回合前懒导入from .chat.attachments import require_text_document_route校验文本附件通道授权边界,确保无兼容 shim 情况下入口校验路径保持不变。
对主干的风险 / Risks
- 全仓残留扫描与负向/反事实检查(PASS):在独立干净工作树(重装可编辑
loopx验证loopx.__file__与loopx.chat.__path__指向当前 PR 检出目录后)执行全仓rg -n "\bchat_(attachments|dsh|operator_provider_api)\b",确认除tests/test_chat_internal_module_layout.py负向断言与tests/test_chat_dsh_adapter.py别名外零残留旧引用;Python 负向检查验证importlib.util.find_spec对loopx.chat_attachments、loopx.chat_dsh、loopx.chat_operator_provider_api均返回None,且normalize_chat_image_attachments拒收size: True、normalize_chat_attachments拒收未知kind。 - 验证矩阵与范围说明(PASS):
- 24 个架构、Chat 与 Lark 定向 pytest 套件:
1630 passed(tests/architecture/*、test_chat_*、test_lark_*、test_audit_cli_and_runtime_fixes.py、test_manager_context_roundtrip.py、test_goal_activation.py全部通过)。 - 真实入口 smoke:
examples/loopx-managed-turn-operator-flow-smoke.py输出 5 项检查ok: true;examples/loopx-steward-managed-chat-smoke.py因本地未安装可选包deepseek-harness-sdk退出0并输出skip: deepseek-harness-sdk is not installed(UNVERIFIED 真实外部 SDK 调用,已由test_chat_dsh_adapter.py与loopx-managed-turn-operator-flow-smoke.py覆盖适配器逻辑)。 - 静态与门禁检查:
ruff check(29 个修改.py文件全通过)、mypy(17 个 strict 文件全通过)、scripts/check_rfc_bilingual.py --base origin/main --head HEAD通过(成对验证harness-selection-dsh-pi-v0EN/ZH)、git diff --check通过、loopx check(32 个文件errors=0)通过、canary premerge在隔离HOME下 6/6 直接检查 + 2/2 目录 canary + 8/8 风险 smoke + 1/1 边界检查全部 PASS(11/11 selected checks, 0 failures)。
- 24 个架构、Chat 与 Lark 定向 pytest 套件:
- 并发与主干推进说明(非阻断):审查期间
origin/main已合入 PR#9193推进至202d7bdb05(零文件重叠,GitHub 状态为MERGEABLE、BEHIND),故canary premerge在最新origin/main下的scope_fingerprint未命中作者先前在db76a91f0c记录的 CQR(cqr_a97ef1e293d78a18e0b2)。另本 PR 与并行 M1 PR#9196均为122 -> 119棘轮,先合入一方后,另一方只需按119 -> 116重演预算与test_chat_internal_module_layout.py/chat_runtime.py的单行 rebase 即可。
我的整体评价 / Verdict
本 PR 为 justified_increment:干净完成对 db76a91f0c 的变基并补齐了 #8905 带来的相对导入对齐与双语 RFC 同步,将 3 个内部 Chat 叶子模块无 shim 归位至 loopx/chat/ 且把顶层预算从 122 准确压低至 119。
- Long-horizon(
improved):loopx/顶层模块降至 119 且由布局测试锁死无 shim 约束,清晰划分内部 Chat 模块边界。 - User experience(
preserved)与 Visual review(not_applicable):本次仅迁移内部 Python 模块与同步 RFC 路径文字,未改动任何 UI 渲染视图(已核对loopx/presentation/configuration_api.py与loopx/presentation/codex_attached_api.py仅修改 import 路径,unverified_scope:none)。 - 语义词表与兼容决策:未新增或改动任何枚举、协议 schema 或行为默认值(
semantic_alignment:not_applicable、compatibility_assessment:not_applicable、observable_semantics:equivalent、default_off_isolation:not_applicable)。 - Exact-head freshness:复核远端
HEAD仍为01bd56d3be528a2b50f8c901fe9407b0681af8c2(OPEN、MERGEABLE、wait_for_ci: false),全部本地定向测试、smoke 与静态校验均已在该精确 head 独立通过。
English verdict: APPROVE at exact head 01bd56d (published as COMMENTED review because PR #9179 is author-owned; cleanly rebased onto db76a91 with dsh._turn_prompt aligned, 3 internal Chat leaf modules moved to loopx/chat/{attachments,dsh,operator_provider_api}.py with zero shims, bilingual RFC refs updated symmetrically, budget ratcheted 122 -> 119, 1630 pytest cases + operator-flow smoke + ruff + mypy + canary premerge 11/11 PASS; optional deepseek-harness-sdk smoke skipped due to uninstalled optional package).
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI (runtime_reported, xhigh)
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
评审固定提交 01bd56d3be528a2b50f8c901fe9407b0681af8c2,merge base db76a91f0cc1afb8b10505a94b0a44cf017aaa69。与核对时 main a6ffb3be6e7bdb48e02311ec58d618200fe0501c 的三方整合在预算清单处有冲突。
[P2 · Blocking] 合并后预算必须钉在 118,当前两个冲突版本均不满足
三方整合只在 top_level_module_budget.json 产生冲突。组合树实测 118 个顶层 Python 文件;采用 main 的 121 或 PR 的 119 均被同一预算测试拒绝。临时仅将组合树的清单重算为 118 后,两份树各 108 项定向测试通过。 在当前 main 上同步或变基,保留 #8934 已有净减后的 121 下限并再减本 PR 的三项,将组合预算钉为 118,保留原 allowlist 和实际测量的基准,提交新精确头。 候选位置 已有 Gemini 评审
动机 / Motivation
M1 将附件、DSH 和 Operator Provider 三个内部 Chat leaf 移至 loopx/chat,保留原调用、HTTP 与运行时,按实际净减少量同步收紧顶层模块预算。 原 PR merge base 还有 122 个顶层模块;当前 main 已因 #8934 去除另一个顶层模块,实测 121、预算 121。 PR 将三个 leaf 无 shim 迁移并把自己分支的预算调为 119。双语 RFC 与调用方同步,现有行为仍由相同的实现提供。
用 Git 三方合成源码枚举包顶层文件,在相同树上逐一将原 main、PR 及修正的精确清单交给现有 ratchet 测试。另在确切源码与临时组合树行使附件、DSH、Operator 凭据和 Lark 消费入口。 组合反例仅在快速本地候选上把一个清单值从冲突改成 118。实际 PR 分支仍有冲突,需作者新 head。真实可选 DSH SDK、生产 Lark 和托管 CI 未验收。环境最初从共享 editable venv 读到了旧文件;排除其导入钩子后重新验证精确树和临时组合树。 现有交付规则
改动思路 / Approach
普通运行和受管入口保持既有语义。没有新默认开关或迁移流程,仍由原 settings、HTTP 和队列入口触发。 三处 owner 的附件验证、DSH 只读片段和 Operator Provider 配置保持现有入口。私有路径的导入调整不改公开 API 或能力权限。 组合需要保留第三方先行落地的净减,并使本轮迁移的三项预算净减持续可回读。
具体改动 / Changes
完整 diff 共 32 个文件,新增 48 行、删除 39 行。32 个文件中只有三处 leaf 重定位、对应 import 与双语文档路径、预算和布局测试。附件文件的源码对象直接复用,另两处实际逻辑未变。
-
M1 归位和 I3 内部边界。迁移三个内部 owner、维护原入口且不留已判定无公共消费者的旧 shim。
-
同 PR 收紧预算。当前主干的 121 再净减三项,组合预算必须等于 118。
-
双语和真实入口核验。同步两份 RFC,原附件、DSH 与控制路由在实际包中可用。
-
max_top_level_modules。固定应与支撑树的实测顶层 Python 文件数相等。 精确代码 -
test_top_level_module_count_stays_at_the_pinned_budget。拒绝大于预算和绕过应有的预算净减。 精确代码 -
normalize_chat_attachments。原附件校验 owner 下移。 精确代码 -
DshChatAdapter。受管 DSH 原单段只读入口。 精确代码 -
OperatorProviderRequestMixin。原设置 API 的凭据读写入口。 精确代码
对主干的风险 / Risks
隔离解释器的精确头与仅调整清单的组合树各 108 项测试通过。原 DSH managed-turn operator flow 各通过五项,双语差异通过。标准 Chat bundle 和 wheel 构建通过,独立环境能导入三个新所有者,旧路径不可导入。
PR merge base 的 122 与当前 main 的 121 均各自在自己的源码树正确;PR head 的 119 也与本分支源一致。合成源码的元素集合与两侧都不同,实际数目为 118。 当前 GitHub 显示 CONFLICTING。现有 Gemini 结论对应同一代码树在旧主干的判断,保留其证据;新的组合条件明确阻塞。
我的整体评价 / Verdict
REQUEST_CHANGES。 请按 118 修复预算清单后回读新精确头。三个 leaf 的代码、隔离运行和安装导入已验证。当前分支与主干合成仍阻塞。
English verdict: REQUEST_CHANGES. The relocation and installed imports pass. Current main yields 118 top-level modules with the three moves, so neither side's conflicting 121 or 119 manifest can pass the exact-count gate.
…odule budget Implements the next monorepo-distribution-split-v0 (#5072) M1 internal leaf migration without permanent top-level compatibility shims: - Move loopx/chat_operator_provider_api.py -> loopx/chat/operator_provider_api.py - Move loopx/chat_attachments.py -> loopx/chat/attachments.py - Move loopx/chat_dsh.py -> loopx/chat/dsh.py - Update internal relative imports, callers, tests, smokes, layout guards, and symmetrical RFC references - Ratchet tests/architecture/top_level_module_budget.json from 121 to 118 at baseline 06fd6fe Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
01bd56d to
8c1d8fe
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewer: model_agent · Gemini · Google · self_reported
动机 / Motivation
本次改动直接面向需要按包目录划分所有权并拆分 loopx-core 与 loopx-workspace 分发包的维护者,以及调用内部 Chat 附件校验、管家 DSH 分段执行与运维凭据路由的运行时和扩展模块(覆盖 chat_server、chat_runtime、chat_ingress、chat_agent、presentation、extensions/lark 与 capabilities/native_chat)。
迁移前(06fd6feeab 主干基线),loopx/ 顶层仍平铺 121 个 .py 模块,三个内部叶子模块loopx/chat_attachments.py、loopx/chat_dsh.py 与 loopx/chat_operator_provider_api.py 与核心内核模块混排;早期分支修订 01bd56d3be 曾因基于旧主干 122 -> 119 变基而与已由 #8934 减至 121 的当前主干在 top_level_module_budget.json 上冲突。迁移后(精确 head 8c1d8fe1ff),三份模块无兼容 shim 地归位到 loopx/chat/ 并同步 20 处内部生产调用方、测试、smoke 与双语 RFC 引用,预算基线同步重算并棘轮收紧至 118,消除了三方合并冲突。
可验证的结果是:loopx/*.py 顶层模块实测从 121 净减至 118,tests/architecture/top_level_module_budget.json 锁定 118(基线 06fd6feeab08dc8c9d75ccf6050a16126fbc606d)且无冲突;importlib.util.find_spec 对三处旧顶层模块路径均返回 None;附件校验拒收、DSH 只读分段隔离、Operator 凭据只写脱敏和定向 pytest 与 canary premerge 均与基线完全等价。
本 PR 不改动附件大小/类型阈值、文本附件路由授权、DSH 单段只读沙箱策略或 /api/chat/operator-credential 接口协议,不保留永久顶层兼容 shim,也不负责完成 #5072 后续批次的其余 chat_* 与 *_goal_mode 目录迁移。
#5072 M1/M2 下其余顶层 chat_* 与 *_goal_mode 模块迁移及 M3 分包发布仍待后续批次推进;本地环境未安装可选包 deepseek-harness-sdk,因此 examples/loopx-steward-managed-chat-smoke.py 跳过真实 SDK 调用,且未运行全仓全部 pytest 套件及远端托管 CI(wait_for_ci: false)。
不做此次迁移会让平铺的内部 Chat 辅助文件继续阻塞 loopx-core 与 loopx-workspace 的目录边界收口,也会让 PR #9179 停留在旧预算 119 无法干净并入已降至 121 的主干。本 PR 把三个内部叶子一次性归位并把预算精确压到 118,形成一个独立可测、可直接回滚且不留兼容债的增量交付。
改动思路 / Approach
| 维度 | 基线 06fd6feeab |
当前 HEAD 8c1d8fe1ff |
架构约束 |
|---|---|---|---|
| 模块落点 | loopx/chat_{attachments,dsh,operator_provider_api}.py |
loopx/chat/{attachments,dsh,operator_provider_api}.py |
复用 loopx/chat.py 的 __path__ 命名空间包,无 __init__.py |
| 兼容桥接 | 顶层文件直接存在 | 零永久 shim,删除旧入口 | 依据 I3 仅更新内部调用方,由 find_spec 确认不可解析 |
| 相对导入 | 同级 .chat / .control_plane |
子包内 ..chat / ..control_plane / 同级 .attachments |
导入图与延迟加载时机保持等价 |
| 预算棘轮 | max_top_level_modules: 121 |
max_top_level_modules: 118 |
baseline_commit 对齐当前主干 06fd6feeab,净减 3 |
三个被迁移模块均为纯内部实现组件:附件校验与文本路由限制属于无状态策略与校验规则,DSH 分段适配器和 Operator 凭据 Mixin 分别承担单一 provider IO 与 HTTP 凭据投影职责;将三者直接收归 loopx/chat/ 命名空间包(由 loopx/chat.py 保留 __path__ 入口且不新建 __init__.py),同时删除无公开消费者的顶层旧入口并保持既有默认开关与失败语义不变,符合最小单向收紧与不重复引入兼容胶水的架构原则。
本 PR 的边界严格限定为重定位 attachments.py、dsh.py 与 operator_provider_api.py 三个内部叶子模块、同步全仓 20 个生产模块/7 个测试/2 个 smoke/1 组成对中英文 RFC 中的引用、扩展无 shim 布局断言并将顶层预算从 121 精准下调至 118,不顺带重构周边业务逻辑或触碰并行迁移目标。
在正向调用路径上,ChatConfigurationRequestMixin 通过 from ..chat import operator_provider_api 挂载 /api/chat/operator-credential;ChatRuntimeController 与 builtin_chat_endpoints 从 loopx/chat/dsh.py 加载 DshChatAdapter 与 STEWARD_SEGMENT_ENV;HTTP、Lark 扩展、原生 Chat adapter 与结果文件 API 统一从 loopx/chat/attachments.py 导入图片与文本文档校验函数。反向对比表明:loopx/__init__.py 与 loopx/chat.py 均未对外重导出这三个模块,因此不保留兼容桥接也不会破坏公开契约,且后续目录包拆分不必再维护两份入口。
具体改动 / Changes
依据规范 docs/architecture/rfcs/monorepo-distribution-split-v0.md(基线修订 16f418837c87ab40f04ff303962598f5bd71a034)及当前精确提交 8c1d8fe1ff2659eef6461a5bb4a52e274c020561,逐项验收准则映射如下:
| Criterion ID | 规范要求 | Disposition | 验证符号与证据 |
|---|---|---|---|
M1-LEAF |
M1 将内部 loopx/chat_* 叶子模块迁入 loopx/chat/ 并同步相对导入 |
implemented |
loopx/chat/attachments.py、loopx/chat/dsh.py、loopx/chat/operator_provider_api.py;tests/test_chat_internal_module_layout.py |
I3-NO-SHIM |
I3 纯内部搬迁同步更新全部活跃调用方并删除旧顶层入口 | implemented |
全仓 rg 零残留引用;tests/test_chat_internal_module_layout.py 校验 importlib.util.find_spec 返回 None |
SEC9-BUDGET |
Section 9 同 PR 下调 top_level_module_budget.json 并锁定实际净减 |
implemented |
tests/architecture/top_level_module_budget.json(121 → 118);tests/architecture/test_top_level_module_budget.py |
RFC-BILINGUAL |
同步更新引用路径的双语成对 RFC 文档 | implemented |
docs/architecture/rfcs/harness-selection-dsh-pi-v0.md、.zh-CN.md;scripts/check_rfc_bilingual.py --base origin/main --head HEAD |
全量 diff 共 32 个文件(+48 / -39 行):3 个 git mv 迁移(attachments.py 零行改动,dsh.py +4/-4 行相对导入调整,operator_provider_api.py +1/-1 行相对导入调整)、17 个生产调用方模块 import 路径更新、7 个测试文件与 2 个 example smoke 更新、1 组成对中英文 RFC 路径更新(loopx/chat_dsh.py → loopx/chat/dsh.py),以及 tests/architecture/top_level_module_budget.json 预算从 121 更新至 118。
关键代码讲解
- DshChatAdapter(
loopx/chat/dsh.py#L35-L43,L87-L309):管家通道的受控单段 DSH 只读传输,内部将.chat、.chat_agent、.control_plane.turn_driver.host_binding与.dsh_goal_mode.turn_host_adapter调整为..父包导入。在_run_segment中通过segment_env.update(STEWARD_SEGMENT_ENV)强制覆盖DSH_PERMISSION_MODE="read-only",并通过_claim_segment_slot单线程槽位锁拒绝并发第二段(错误码MANAGED_HOST_CHAT_SEGMENT_IN_FLIGHT)。上游消费者 ChatRuntimeController.submit_turn 与 managed_host_capability 已分别切至from .chat.dsh import DshChatAdapter与from .dsh import STEWARD_SEGMENT_ENV。 - normalize_chat_attachments 与 require_text_document_route(
loopx/chat/attachments.py#L1-L190):纯标准库附件与通道边界校验,继续限制单次最多4个附件、单图5MB、总图12MB、总信封64KB、拒绝bool型size与未知字段,并将文本附件限制在本地web来源的codexmanaged_runtime会话。全仓调用方(含loopx/chat_server.py、loopx/chat_ingress.py、loopx/chat_runtime.py#L423、loopx/chat_agent.py、loopx/chat/result_files_api.py、loopx/presentation/codex_attached_api.py、loopx/extensions/lark/*与loopx/capabilities/native_chat/*)全部同步更新,且保留normalize_local_chat_attachments等既有符号名。 - OperatorProviderRequestMixin(
loopx/chat/operator_provider_api.py#L21-L110):提供个人工作台/api/chat/operator-credential的只写写入与脱敏读回,迁入子包后仅将顶层导入改为from ..control_plane.operator_provider import ...,由 ChatConfigurationRequestMixin 通过from ..chat import operator_provider_api as operator_api继承挂载,异常码invalid_operator_credential(400)与operator_credential_write_failed(500)保持不变。 - top_level_module_budget.json 与 test_chat_internal_module_layout.py:在当前主干
06fd6feeab(121 个顶层模块)之上将max_top_level_modules准确下调至118,保留allowlist三项不动;布局测试同时验证三处新模块__module__归属及旧顶层模块find_spec为None。
对主干的风险 / Risks
- 上次阻塞项已验证清除:此前在旧提交
01bd56d3be上提出的[P2 · Blocking]合并预算冲突(当时 PR 预算119、主干121、合成118)已随着变基到06fd6feeab08dc8c9d75ccf6050a16126fbc606d彻底解决。当前独立工作树实测ls -1 loopx/*.py | wc -l精确等于118(仅移除了chat_attachments.py、chat_dsh.py与chat_operator_provider_api.py),GitHub 合并状态为MERGEABLE,不再存在结构冲突。 - 全仓残留与负向边界探针(PASS):全仓
rg扫描确认除tests/test_chat_internal_module_layout.py中有意断言find_spec返回None的三条测试列表外,零残留loopx.chat_attachments、loopx.chat_dsh、loopx.chat_operator_provider_api或对应.py引用。在精确 head 隔离环境中实测:importlib.util.find_spec对三处旧路径均返回None;normalize_chat_image_attachments拒绝size: True;normalize_chat_attachments拒绝未知字段;require_text_document_route拒绝steward_context会话上传文本附件;DshChatAdapter在credential试图注入DSH_PERMISSION_MODE="full-access"时仍强制覆盖为"read-only";OperatorProviderRequestMixin验证合法密钥只写不回显及非法参数返回400 invalid_operator_credential。 - 与基线的对照测试与验证矩阵:
- 基线
06fd6feeab08dc8c9d75ccf6050a16126fbc606d与精确 head8c1d8fe1ff2659eef6461a5bb4a52e274c020561在独立可编辑安装(分别核对loopx.__file__指向各自隔离检出目录)上执行同一组 5 个架构与核心 Chat 单元测试(test_top_level_module_budget.py、test_chat_internal_module_layout.py、test_chat_image_attachments.py、test_chat_dsh_adapter.py、test_chat_endpoint_readiness.py):基线 PASS(36 passed in 0.82s),当前 head PASS(36 passed in 0.64s);examples/loopx-managed-turn-operator-flow-smoke.py在双端均输出完全一致的5/5检查 PASS。 - 核心与扩展测试套件:10 个架构/Chat/审计/roundtrip 文件串行运行 PASS(
254 passed in 84.30s);tests/test_operator_provider.py+tests/test_chat_executor_profile.py+tests/test_chat_runtime_activation.pyPASS(73 passed in 2.09s);tests/test_chat_machine_configuration_api.pyPASS(20 passed in 5.86s)。 tests/test_lark_private_conversations.py:首次以-n auto并发执行 11 个文件合并套件时,test_recovery_waits_for_inflight_capture_without_readmitting[True]在高并发文件锁争用下出现1次LockAcquireTimeoutError(843 passed, 1 failed);随后单独复测该用例 PASS(2 passed in 2.64s),并以有界并发-n 2完整运行tests/test_lark_private_conversations.py全集 PASS(590 passed, 1 warning in 343.55s;1条既有线程超时告警来自test_group_control_does_not_require_display_service)。该锁超时属于高并发压测下的既有测试时序敏感问题,不构成由import路径搬迁引入的回归。- 静态与门禁检查:
ruff check(29 个修改.py文件)PASS;python -m mypy(17 个配置严格检查文件)PASS;scripts/check_rfc_bilingual.py --base origin/main --head HEADPASS;git diff --check origin/main...HEADPASS;loopx check --scan-path ...(32 个变更文件)PASS(errors: 0, warnings: 0);隔离HOME下loopx canary premerge --from-git-diff --git-diff-base origin/mainPASS(direct_checks: 6/6,selected_checks: 11/11,catalog_run: 2/2,risk_profile_run: 8/8,boundary_run: 1/1,failure_count: 0)。 - 真实外部依赖与跳过项:
examples/loopx-steward-managed-chat-smoke.py退出0并打印skip: deepseek-harness-sdk is not installed,真实deepseek-harness-sdk调用在本机处于 UNVERIFIED;全仓全部 pytest 及远端 CI(wait_for_ci: false)未执行。
- 基线
我的整体评价 / Verdict
本 PR 为 justified_increment:在不改变任何公开契约、权限边界或默认行为的前提下,干净地将 3 个内部 Chat 叶子模块迁入 loopx/chat/,消除了前一版与主干的预算冲突并把 max_top_level_modules 精确棘轮压低至 118。
- Long-horizon(
improved):loopx/顶层模块从121降至118,并通过无 shim 布局断言与预算棘轮固化目录边界,使#5072的 M1 分包与 CODEOWNERS 收敛可持续推进。 - User experience(
preserved)与 Visual review(not_applicable):本次仅调整内部 Python 模块位置、import 路径与文档引用,未修改任何前端页面或渲染模板;已核对loopx/presentation/configuration_api.py与loopx/presentation/codex_attached_api.py仅更改单行导入语句,UI 视觉检查不适用(unverified_scope:none)。 - 语义词表与兼容评估:未新增、扩展或变更任何状态枚举、schema 字段、协议字面量或配置开关(
semantic_alignment:not_applicable;compatibility_assessment:not_applicable;default_off_isolation:not_applicable;authority_semantics:not_applicable);observable_semantics在不变基线06fd6feeab08dc8c9d75ccf6050a16126fbc606d与当前 head8c1d8fe1ff2659eef6461a5bb4a52e274c020561的同命令、同探针对比下保持完全等价(equivalent)。 - 代码体量与残余风险:全量 32 个文件变更均为机械性路径重定位、import 更新及必须的布局/预算守卫(
code_volume:necessary,change_proportionality:proportionate),无冗余抽象;唯一环境未覆盖项为可选外部包deepseek-harness-sdk实跑步骤跳过与全仓全量测试。复核远端 PR#9179最新 head 仍为8c1d8fe1ff2659eef6461a5bb4a52e274c020561(OPEN、MERGEABLE、wait_for_ci: false)。
English verdict: APPROVE at exact head 8c1d8fe (published as COMMENTED review because PR #9179 is author-owned; resolved prior budget conflict at baseline 06fd6fe with top_level_module_budget ratcheted 121 -> 118, zero stale imports, 254 + 590 + 73 + 20 targeted pytest cases, ruff, mypy, bilingual RFC diff check, loopx check, and canary premerge 11/11 PASS; optional live deepseek-harness-sdk smoke skipped due to uninstalled SDK).
Goal And Delivered Outcome
docs/architecture/rfcs/monorepo-distribution-split-v0.md(Milestone M1, Invariant I3, and Section 9 top-level module budget ratchet; related to RFC: split LoopX distributions inside the monorepo (loopx-core / loopx-workspace / capability packages) and pin top-level module growth #5072).loopx/chat_operator_provider_api.py,loopx/chat_attachments.py,loopx/chat_dsh.py) still sat at the package top level (121top-level modules onmain), instead of co-locating underloopx/chat/.loopx/held121top-level*.pymodules (tests/architecture/top_level_module_budget.jsonpinned121on06fd6feeab08dc8c9d75ccf6050a16126fbc606d).loopx/chat/(operator_provider_api.py,attachments.py,dsh.py) viagit mvwith zero top-level compatibility shims, updated all internal callers/tests/smokes/RFC references, kept no-shim assertions intests/test_chat_internal_module_layout.py, and loweredmax_top_level_modulesto118(baseline_commit06fd6feeab08dc8c9d75ccf6050a16126fbc606d). Proven on exactHEAD8c1d8fe1ff2659eef6461a5bb4a52e274c020561bytests/architecture/test_top_level_module_budget.py,tests/test_chat_internal_module_layout.py, targeted architecture/Chat/Lark pytest (1608 passed),canary premerge(11/11selected checks passed), and Goal-bound CQRcqr_462398dfbcbf242ef31e.main(rebased onto06fd6feeab08dc8c9d75ccf6050a16126fbc606d).Author Declaration
Implemented against
docs/architecture/rfcs/monorepo-distribution-split-v0.md(M1,I3, Section 9) at06fd6feeab08dc8c9d75ccf6050a16126fbc606dloopx/chat/loopx/chat/operator_provider_api.py,loopx/chat/attachments.py,loopx/chat/dsh.pypytest -q --no-cov tests/test_chat_internal_module_layout.pyloopx/presentation/*,loopx/chat/*,loopx/chat_*.py,loopx/extensions/lark/*,loopx/capabilities/native_chat/*,tests/*,examples/*rg -n "loopx\\.chat_(operator_provider_api|attachments|dsh)|chat_(operator_provider_api|attachments|dsh)\\.py" loopx tests examples docs+tests/test_chat_internal_module_layout.pydocs/architecture/rfcs/harness-selection-dsh-pi-v0.md,docs/architecture/rfcs/harness-selection-dsh-pi-v0.zh-CN.mdpython scripts/check_rfc_bilingual.py --base origin/main --head HEADtests/architecture/top_level_module_budget.json(121→118)pytest -q --no-cov tests/architecture/test_top_level_module_budget.pyls -1 loopx/*.py | wc -l==118, confirmed zero stale old-module imports acrossloopx,tests,examples, anddocsviarg, checked bilingual RFC diff, ran targeted architecture/Chat/Lark pytest (1608 passed), ranruff, configured strictmypy(17files),loopx check(0errors on32files), Goal-bound CQR (cqr_462398dfbcbf242ef31e), andloopx canary premerge --from-git-diff --git-diff-base origin/main.Scope And Continuation
121→118), addressing the previoustop_level_module_budget.jsonrebase/count blocker on06fd6feeab08dc8c9d75ccf6050a16126fbc606d. Broader M1–M5 distribution split and remaining top-level modules stay open under RFC: split LoopX distributions inside the monorepo (loopx-core / loopx-workspace / capability packages) and pin top-level module growth #5072 (next batch refactor(chat): move ACP, endpoint, and provider leaves under loopx.chat and ratchet module budget (#5072) #9196 lowers118→115).Validation
8c1d8fe1ff2659eef6461a5bb4a52e274c020561(rebased onto06fd6feeab08dc8c9d75ccf6050a16126fbc606d; all checks below ran directly on exactHEAD8c1d8fe1ff2659eef6461a5bb4a52e274c020561)finishedsynthetic,public_fixtureunitpassedpytest -q --no-cov -n auto tests/architecture/test_top_level_module_budget.py tests/architecture/test_control_plane_import_boundaries.py tests/architecture/test_package_kernel_import_ratchet.py tests/test_chat_internal_module_layout.py tests/test_chat_image_attachments.py tests/test_chat_image_http.py tests/test_chat_dsh_adapter.py tests/test_chat_endpoint_readiness.py tests/test_chat_executor_profile.py tests/test_atomic_write_modes.py tests/test_chat_reasoning_selection.py tests/control_plane/test_goal_activation.py tests/test_audit_cli_and_runtime_fixes.py tests/test_manager_context_roundtrip.py tests/test_lark_private_conversations.py tests/test_lark_private_images.py tests/test_chat_file_discovery.py tests/test_chat_machine_configuration_api.py tests/test_chat_agent.py tests/test_chat_server_cors.py tests/test_chat_startup_isolation.py→1608 passed in 175.35sreal_entrypointpassedpython examples/loopx-managed-turn-operator-flow-smoke.py(ok: true, 5/5 checks passed);examples/loopx-steward-managed-chat-smoke.pyexited0(printedskip: deepseek-harness-sdk is not installedbecause optional SDK is absent in this environment)staticpassedruff checkon 29 touched Python files (All checks passed!);python -m mypy(Success: no issues found in 17 source files);scripts/check_rfc_bilingual.py --base origin/main --head HEAD(RFC bilingual diff check passed.);loopx check --scan-path ...(ok: true,errors: 0,32files)regression_paritypassedloopx canary premerge --from-git-diff --git-diff-base origin/main --goal-id personal-loopx-maintenance→ok: true,direct_checks: 6/6,selected_checks: 11/11(catalog_run: 2/2,risk_profile_run: 8/8,boundary_run: 1/1),failure_count: 0, CQRcqr_462398dfbcbf242ef31e(valid)examples/loopx-steward-managed-chat-smoke.pyskipped live SDK execution (deepseek-harness-sdknot installed), whiletests/test_chat_dsh_adapter.pyandexamples/loopx-managed-turn-operator-flow-smoke.pyexercisedloopx.chat.dsh.DshChatAdapterdirectly.Frontend / Visual Evidence
nonenoneType of Change
LoopX Area
Technical Direction
docs/architecture/rfcs/monorepo-distribution-split-v0.md(M1,I3, Section 9)Shared-authority RFC fixture impact
N/A
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).python3 scripts/check_rfc_bilingual.py --base origin/main --head HEADpasses, or no paired RFC changed.none.Signed-off-bytrailer (git commit -s).