Repository navigation
Conversation
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent — gpt-6.1-sol (OpenAI); runtime_reported; reasoning_effort=max.
结论:APPROVE,这批加载边界没有发现阻塞缺陷;仓库仍有独立验证 hold,不能据此合并。
动机 / Motivation
运行 Turn 预览或只导入控制平面的调用者,需要在未使用进程能力时保持该依赖未加载。 此前仅导入 Turn 决策入口,就会经 Doctor、contract、validation 或 Host bridge 加载进程传输;本提案把这四个入口的绑定推迟到实际取用,保留真实进程调用的原实现。 当前源码的既有冷加载 oracle 已通过,四个模块的公开名称、star import、函数对象和签名与基线相同。 本次不交付拆包安装、完整 minimal preset、Host 升级、模型采用或性能净收益。 完整 V1/V3、R0/V10、M1、安装与长程收益资格仍由既有 RFC 路径继续;本次只交付四个在用调用方的加载边界。
改动思路 / Approach
四处局部 lazy reexport 复用既有 Python 模式,进程算法留在 extensions/process_runtime,决策和 deadline 留在原 owner;没有理由为四个绑定新增全局 loader 框架。 保留四个公开调用方、原函数对象和补丁点,仅推迟未选择依赖的加载;完整 preview 依赖闭包与安装采用另行资格化。 未改动进程执行算法,也未新增 capability、provider、持久状态或权限。真实调用从原函数对象进入原 OS transport,取消、deadline 和“未确认清理”的失败仍由既有调用者处理。这里的收益是修复可重现的依赖边界,不能用减少一个 import 推导性能或长程收益。
具体改动 / Changes
精确审阅 e32d4db3ceca9b4a8b7f3ea7a0dc7291e8edde48,比较基线 7f521ff4505fa916a98a7401032922189eef414a:7 个路径,生产代码四个 +150/−10,测试一个 +186,双语文档两个 +72。
关键代码讲解
- doctor_git.getattr / _export:未知属性仍抛 AttributeError;有效名字按首次实际访问绑定原函数。内部 probe 通过模块绑定查找,因此原调用方补丁点仍有效;预加载 owner 和 reload 也有对应检查。
- run_caller_validation:只改函数解析位置。timeout/KeyboardInterrupt 仍对整个 owned process tree 立即清理,原 argv、cwd、stdin、退出码与 receipt 保持;已退出 leader 的存活后代也经过真实进程测试。
- GuardedHostBridge.send / cancel:ready framing 后才写入,复用原 stdin deadline。发送前终止 bridge 不冒充 Host 清理,发送后缺少完成观测仍报 cleanup unconfirmed。
规格是 docs/architecture/rfcs/monorepo-distribution-split-v0.md,按提交 7f521ff4505fa916a98a7401032922189eef414a 的原要求判断:I3 在这四个已有公开入口 implemented;V1 的四个冷调用方增量已验证,完整 preset 范围 deferred;V3 的本次命令/进程路径已验证,完整 supported-command corpus deferred。新 checkpoint 不能自行关闭这些后续资格。
对主干的风险 / Risks
最重要的反例是“冷加载测试绿,但内部调用绕过 monkeypatch 或取消只杀 leader”。我运行的源码进程/兼容性集合为 178 PASS、2 平台 SKIP;基线原集合 145 PASS、1 FAIL、2 SKIP,失败正是既有 Turn import oracle 提前选择 process_runtime。另有原 CLI capture/source-change/retry 的 File/SQLite 8 对 8 PASS,Host 为确定性替身,Core、CLI、存储与原始 capture 是真实路径。完整公开名称、star import 和 callable signature JSON 相同;顶层、quota、turn help 与 unknown-command 的文本/退出码在仅归一化 checkout 前缀后相同。
语义与 CI 对齐
configured Mypy 的 17 个入口、TypeScript typecheck、改动 Ruff、双语/diff/compile 检查通过。standard premerge 六个 direct 检查通过,18 个 selected 中 17 个通过。first-connect-contract-smoke.py:146 的 KeyError: should_run 在基线和 head 的完整 traceback 相同;仓库必需 Ruff 仍有 test_goal_create_completion.py:184 的同一 F841,完整诊断及其文件/配置未变。它们均保留 FAIL 和 strict CQR hold;当前变更的独立通过证据支持 review approval,不把这些失败改记为 PASS。本轮遵守原生策略,未查询或等待远端 CI。
我的整体评价 / Verdict
这是可独立回滚的 justified_increment;long_horizon 和 user_experience 在已检验的源码路径上 preserved,无新增操作轮次。未修改渲染页面;检查了四个内部调用方与 CLI help/错误入口,未触及页面布局。 未验证范围:本次未独立重建 wheel,Windows、完整 preset、安装采用、真实模型及全成本收益均不作通过声明。四个局部绑定仍比新增 loader 框架更合适,export tuple 是 local compatibility metadata;required lint、Canary、CQR 和 maintainer merge authorization 继续各自约束合并。
English verdict: APPROVE the bounded source loading refactor; preserve the independent validation and merge holds.
Goal And Delivered Outcome
Pure Turn-decision imports selected process transport through four existing callers. This proposal defers those imports while preserving the original exported functions and caller patch points. It restores the existing unselected-module oracle without changing subprocess algorithms, decisions or deadlines.
纯 Turn-decision import 原来会经四个调用方加载进程传输。本提案仅调整加载时机,保留原函数对象和补丁点,使既有隔离 oracle 通过;进程算法、决策和 deadline 保持原 owner。
docs/architecture/rfcs/monorepo-distribution-split-v0.mdand its Chinese pair, at7f521ff4505fa916a98a7401032922189eef414a.loopx-project/loopx,main; independent of refactor(chat): move public status owner with identity-compatible imports #8011, refactor(turn): defer DSH builders and process helpers to selected paths #8185, perf(cli): load the existing version owner on demand #8203 and refactor(cli): load history reads on demand #8212.Author Declaration
extensions/process_runtime.pyScope And Continuation
Complete within this author-proposal scope. Python remains platform transport; no capability, provider, default, authority or persisted state is added. Local export-name sets describe existing compatibility, not a new shared vocabulary.
The full registered preview still selects transport. Its remaining dependency closure and full R0/V10/M1/R1/context/model/install acceptance, D2/D5/D6/I3/D3, and I3's minimum minor-release window remain open. Existing M1 work retains its #8011 dependency. Reverting this proposal restores eager bindings without migration.
该作者切片完整且可独立回滚;完整 preview 仍会加载 transport,完整内核、安装、采用和性能验收保持开放。Canary 的既有失败仍需独立修复,不能据此认定整体验收通过。Runtime 合入留给 maintainer。
Validation
e32d4db3ceca9b4a8b7f3ea7a0dc7291e8edde48; immutable baseline7f521ff4505fa916a98a7401032922189eef414a. Tests used the same final product/test file bytes; final bilingual/diff checks were rerun after the checkpoint's failure disclosure.tests/test_process_runtime_loading.py,tests/architecture/test_control_plane_import_boundaries.py, the existing doctor/contract Git tests, validation cleanup, Host process, stdin-deadline and process-runtime suites.examples/project/first-connect-contract-smoke.py:146raisesKeyError: should_runon both baseline and proposal because its helper assumes an inline field. This remains a validation hold.Coverage includes timeout/Ctrl-C cleanup, exited-leader descendants, Git unknown/error behavior, validation receipts and stdin restoration, bridge framing/backpressure, and refusal to certify unobserved cleanup. The transport implementation is reused. Windows cases were skipped on this host; no Windows qualification, performance uplift, host adoption or merge readiness is claimed.
Frontend / Visual Evidence
UI impact: none. Existing CLI contracts remain compatible; the RFC checkpoint adds evidence only. The unchanged Chat bundle was built solely to produce a complete wheel and is not part of this diff.
Change Type And Area
Boundary Checklist
Normal review proposal with the Canary hold disclosed. Maintainer review, required validation and explicit runtime merge authorization remain separate gates.