Repository navigation
Use the complete work contract for Trae App heartbeats - #8785
huangruiteng merged 2 commits into
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.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
评审提交 8651972ec554a4a98ddf28795913c9dba907b50e,对照堆叠目标 2c099be41e6878298ae273de28b983fc2c205700(#8266 分支)。
动机 / Motivation
用 Trae App 或 Antigravity App 接续已绑定 Turn 的操作者。 自动唤醒时要拿到原任务和验收上下文。恢复原 Turn 还要沿用用户选择的交付模式,以及原写回和一次用量结算。 目标分支的实际 Trae 启动命令仍返回无 contract_binding 的旧决策。自动模式仍能读到原验收文本,显式关闭仍给出同一文件的读指令。 候选为两种模式都提供可校验的完整来源。自动模式从原 capture 读完整验收内容,显式关闭时完整决策随 guard 返回,必读文件仍可用。File 和 SQLite 都保留同一 Turn 和 agent 结算。 验证覆盖生成的启动器、真实源码 CLI 和隔离的 File/SQLite。已安装的 Trae App、Windows 原生运行、真实模型采用、同预算效果与总成本仍待验收。托管 CI 未查询。
改动思路 / Approach
Quota CLI 解析已注册 scheduler profile。既有 TypeScript composer、stateless reader 和 agent 结算分别持有完整来源、交付与扣额。 将带 Turn 的 Trae 加入 Antigravity 已有分支,沿用同一选择和恢复入口,并保留显式 complete-turn 的不同结算路径。
具体改动 / Changes
关键代码讲解
stateless_app_work_turn同时要求已解析的 App profile 和实际 Turn。没有 Turn 的观察保留原路由。来源选择preserve_app_delivery把原模式带入 selection/recovery。_prepare_quota_result_context复用现有完整来源、reader 和原结算方案。传递交付模式 捕获和结算入口- 6 个文件(+155/−61),其中生产代码 +7/−6。现有类型和结算 owner 复用。无 Turn 的 Trae scheduler 观察没有完整来源绑定或新回执。显式关闭走 inline,实测执行原必读命令能读全验收内容,定向测试确认无 capture 目录。丢失原写回响应后,恢复只保留原扣额且重放总计一次;缺语义 delta 的重规划在 durable write 前拒绝。 File 和 SQLite 双后端用例
按 docs/architecture/rfcs/controller-executor-unified-contract-v0/contract-and-context.md 核验,bound-app-complete-source、same-turn-recovery 和 turnless-observation 均已通过。原结算与历史恢复约束 Trae 启动和恢复合同
对主干的风险 / Risks
本 PR 的实际目标是 #8266 分支。父分支已有评审阻塞,合并前仍需处理父分支和现有校验。 本次比较限定在该堆叠目标与候选。验证覆盖生成的启动器、真实源码 CLI 和隔离的 File/SQLite。已安装的 Trae App、Windows 原生运行、真实模型采用、同预算效果与总成本仍待验收。托管 CI 未查询。
语义与 CI 对齐
20 个定向用例和 4 个独立 File/SQLite 组合通过。与基线匹配的四个 Trae 启动用例均缺完整来源绑定。预合并 19 项中通过 18 项。相同语义词汇检查在堆叠基线与此提交均因 work_lane_contract 有 4 个 TS 模块、上限为 3 而失败。另一个旧启动提示逐字断言也在两版同样失败。 托管 CI 未查询。
我的整体评价 / Verdict
通过此提交的独立评审。原 Turn 的连续性已验证,Trae 用户可以通过保存的交付模式拿到完整可核验的来源。合并仍受 #8266 及该分支既有校验影响。
English verdict: APPROVE at 8651972. The generated Trae bootstrap delivers the checked source on File and SQLite, preserving the original Turn and one agent-owned spend. Turnless observation is unchanged. Parent integration and inherited validations remain open.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
71ccd34
into
codex/c1-work-contract-review-20261107
Goal And Delivered Outcome
offdelivers the full contract inline, with declared file reads available for materials that still live at their source. The original agent still performs durable writeback and one quota spend. Turnless probes keep their scheduler observation path.b8ac1ec5443b. The Trae-only diff is unchanged. It can be reviewed independently and retargeted after that dependency is integrated.Author Declaration
b8ac1ec5443b.loopx/cli_commands/quota.py::_publish_quota_resulttest_stateless_app_wake_defaults_to_complete_source_and_recovers_agent_spendandtest_guided_start_begins_one_turn_and_executes_returned_selectiontest_original_turn_can_resume_and_settle_without_mutating_todoand the generated heartbeat testScope And Continuation
Trae App’s bound heartbeat and guided-start callers move off the ordinary writer. The scheduler, quota receipts and storage providers keep their current owners. The ordinary packet remains the current route for other ordinary callers. Recorded unsigned captures stay on their original recovery route. This slice can be reverted as one commit while preserving receipts. Run the supported recovery reader for any capture produced before rollback.
Validation
6fe2ec767ee636b1ad22c0c4ced541165a0ef566, againstb8ac1ec5443b.finished.synthetic.Frontend / Visual Evidence
none. The existing App uses its generated CLI bootstrap and reader.Type of Change
LoopX Area
Shared-authority RFC fixture impact
Existing File and SQLite providers exercise the caller migration. Authority storage and provider routing are outside this diff.
Boundary Checklist