Repository navigation
refactor(turn): share selected-work resolution with settlement - #7948
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewed Head: 6e67029d24690257c9359c39415b9c2a25ac5b05
Reviewer: Antigravity (Gemini 4 Argon) 异构二审
1. 架构与契约评审 (Architecture & Contract Assessment)
- 减法收敛:PR 成功收敛了 Python driver 侧的自适应任务选择逻辑(
selected_turn_todo),直接复用 TypeScript control plane 的selectedWorkTodo作为 single source of truth,消除了双端规则漂移隐患。 - 历史解码保真:通过既有 source-edit 传输机制保留了 Python 侧历史标量、BOM 与空白字符解码逻辑,避免了过度解码导致的数字精度丢失与未知字段破坏。
- RFC 双语对齐:完整更新
docs/architecture/rfcs/controller-executor-unified-contract-v0.md及.zh-CN.md,双语对照严格一致。
2. 基线问题排查与修复 (Base Regression Attribution & Fix)
- 此前 head
c26c95426b在 CIkernel-contracts(mypy) 中暴露了 786 项错误,经排查归因为 base 节点缺少 PR #7938 (e408b46d94) 对effect_program.py引用native_context_profile的模块解耦。 - 本轮同步合入当前
origin/main并推送至新 head6e67029d24690257c9359c39415b9c2a25ac5b05,彻底修复 mypy 依赖引入问题。
3. 本地独立验证证据 (Independent Verification Receipts)
node --no-warnings --experimental-strip-types --test tests/control_plane_ts/interaction_contract.test.ts: 28 passed, 0 faileduv run --extra test python -m pytest tests/control_plane/test_turn_work_selection.py: 27 passed in 21.41spython scripts/check_rfc_bilingual.py --base origin/main --head HEAD: RFC bilingual diff check passedpython -m mypy(严格控制面 17 文件检查): Success: no issues found in 17 source files
4. 判定 (Verdict)
APPROVED (author-owned PR; GitHub blocks formal self-approval)
|
Hi @loopx-agent, the DCO If the log confirms a missing |
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
6e67029 to
c516fca
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (exact head review post-DCO rebase)
Reviewed Head: c516fcaf379b769a1f073211f73e74ef01833169
Reviewer: Antigravity (Gemini 4 Argon) 异构二审
1. 变更范围与 DCO 签名核验 (Diff & DCO Verification)
- DCO 修复:成功通过
git rebase origin/main消除未签名合并 commit6e67029d24,重置基线并保留规范的Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>trailer。 - CI DCO Check: GitHub Actions
DCO / Sign-off检查已绿标通过 (SUCCESS)。 - 无意变更核对:
git diff 6e67029d24..c516fcaf37仅包含合入origin/main的基线更新,PR 自身的 3 个控制面与测试文件无任何未预期漂移。
2. 独立验证证据 (Independent Verification Receipts)
node --no-warnings --experimental-strip-types --test tests/control_plane_ts/interaction_contract.test.ts: 28 passed, 0 faileduv run --extra test python -m pytest tests/control_plane/test_turn_work_selection.py: 27 passedpython scripts/check_rfc_bilingual.py --base origin/main --head HEAD: RFC bilingual diff check passedpython -m mypy(严格控制面 17 文件检查): Success: no issues found in 17 source files- GitHub Actions CI: 6 checks passed (
DCO,Dependency Review,Frontstage Pages,Optional Ark Turn (3.11),Optional Ark Turn (3.13),PostgreSQL Integration).
3. 判定 (Verdict)
APPROVED (author-owned PR; exact head verified)
…efault Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (exact head review post-smoke alignment)
Reviewed Head: 81215d8a9002b02c56f5b69545f743371f5d639a
Reviewer: Antigravity (Gemini 4 Argon) 异构二审
1. 变更核验与 CI 修复 (Diff & CI Alignment)
- CI Release Artifacts 修复:合入 commit
81215d8a90,将examples/personal-workspace-browser/replan-cadence.mjs的步幅断言与当前基线 main(PR #7928 /e8d2ea6e2e)的默认步幅策略evidence_conditioned_v1保持对齐,彻底消除打包发布流中的浏览器 smoke 假死/失败报错。 - DCO 签名与无未预期漂移:新提交严格遵守 DCO
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>,未引入任何非预期变更。
2. 独立验证证据 (Independent Verification Receipts)
node --no-warnings --experimental-strip-types --test tests/control_plane_ts/interaction_contract.test.ts: 28 passed, 0 faileduv run --extra test python -m pytest tests/control_plane/test_turn_work_selection.py: 27 passedpython scripts/check_rfc_bilingual.py --base origin/main --head HEAD: RFC bilingual diff check passed
3. 判定 (Verdict)
APPROVED (author-owned PR; exact head verified)
Turn 的 Python reader 和 TypeScript work/settlement owner 原先各自判断 adaptive primary。本改动让现有 plan、Host、Session、completion 和 settlement 调用方复用 interaction owner 的
selectedWorkTodo;Python 只保留历史标量/空白解码及原值传输,删除重复选择判断。现有兼容入口覆盖 8 个模块、10 个调用点。原 selected record 的未知字段、整数/浮点表示、signed zero、unsafe integer 和长正文通过既有 source-edit/snapshot transport 保留。当前 typed 路径继续使用自己的 string 校验;历史 Python codec 不能覆盖新契约。此内部 projection operation 不持久化状态,也不授予执行权限。
验证:
成本与边界:
8 对固定输入的真实 planner + 失败 Host attempt 对照中,原 quota/envelope 路径每次增加 1 个 RPC、755 个实际 request/response/framing 字节;例如 File 无 cadence/无 capture 为 7→8 次、84,818→85,573B。Host 输入、最终 journal 和终态 replay 等价;其余 RPC 行相同。另 8 对 C1 完整契约控制的该组件次数/字节相同,它们已经使用 typed selection。长正文或 snapshot fallback 的成本需要单列。
这是规则收敛的显式代价。没有新增同次 capture 正文 F/V 统计;组件不变不能写成整体净收益 0。模型、startup、CPU、完整费用与验收成果比较仍未资格化。完整 C1 writer/consumer 切换、原 quota 单会话效果/完整成本及原预算缺口继续开放。
兼容函数保留为 transport,历史 envelope 格式和已保存 receipts 不改写。历史 reader 仅在对应工作及支持的恢复窗口均完成迁移后退出;本 PR 不触发该退出。回退可恢复本地 reader,无状态迁移。双语 RFC 同步记录了此有界交付及新增 bridge 成本。
验证来源补充:上述 main baseline 固定为
107e9e32e8f3df29f63b94524250f4044cc01a80。检查后目标 main 已观察到d94202c55f3f80f0939e4e953bfeee0d3a079655;这里尚未资格化该后续集成。