Skip to content

refactor(turn): unify plan, host input and recovery on one source - #8211

Open
loopx-agent wants to merge 163 commits into
mainfrom
codex/turn-complete-source-20261107
Open

loopx-agent wants to merge 163 commits into
mainfrom
codex/turn-complete-source-20261107

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Generic CLI cutover and recovery follow-up

Head d9cedec1ee70aabd88b3edff21b3a8b8903ee941 integrates main@e2371c4768 and resolves the capture, native context and Turn source conflicts.

  • The generic CLI validates the adapter's declared request version before dispatch. A v1 invocation requires an adapter that supports loopx_turn_host_request_v1 and --host-adapter-request-schema. The refusal explains how to upgrade or select a compatible adapter.
  • The repository TraeX adapter renders the checked complete request with the shared Host renderer and accepts the typed evidence, outcome and path fields. The interruption fixture reads the capture from the recorded plan version. Recovery continues on the original capture and effect identity.
  • The milestone fixture reads the staged replan review and writeback from the original v1 request. The checks still exercise an independent artifact validator, one writeback and debit, and replay after optional dispatch failure or response loss.

Validation. The affected Python selection passed 656 tests with 4 skips. The generic CLI/DSH adapter selection passed 26 cases, including deterministic TraeX against real File and SQLite. The full process interruption suite passed 18 cases. Eight cross-version cases created real v0 journals with main@e2371c4768 and recovered or refused them on the candidate. The milestone replay suite passed all 12 cases after migrating its request reader. The 109 focused TypeScript checks, workflow-scope Ruff, Python mypy, control-plane typecheck, and bilingual diff passed. Local premerge quick passed all automated checks and returned a manual review hold. The Host fixtures are deterministic substitutes for the external model.

Open qualification. On the same crowded plan fixture the default v1 JSON is 54,210 characters without Vision and 61,609 with Vision, against 21,985 and 25,448 on main. The 26,000-character ceiling stays in force. The four plan budget/projection cases fail on both the previous PR head and this revision because they read the v0 envelope field. The measured v1 body also exceeds the ceiling. Independent review, installed adoption and full task cost still need evidence.

Turn planning, Host dispatch and journal recovery can read different work sources for the same Turn. This PR makes those stages consume one checked work contract, so an interrupted Turn resumes with its original source and identity and records its effects once. It extracts the complete Turn lifecycle from #7430. The ordinary quota producer and thin heartbeat migration stay in #7430.

New Turn plans and Host requests emit loopx_turn_plan_v1 and loopx_turn_host_request_v1 with a single work_contract and its source binding. Recorded v0 plans, requests and journals retain their versioned decoder and original identity. An invalid or mixed modern source cannot fall back to v0. The ordinary quota producer in this standalone slice still emits v0; tests exercise that path separately from the current Turn's own capture and original detail readers.

The native dispatch review and quota, audit and packaging review found gaps on the previous head. This revision fixes them together:

  • The native adapter prepares the selected Task's ordinary lease before delivery admission. It uses that proof for the original session's checks after the Host returns. File and SQLite cases now reach actual dispatch, then exercise valid, recorded-v0, missing, changed and null sources. Invalid sources stop before the independent check, and recovery neither replays the Host nor repeats effects. A conflicting lease stays with its owner.
  • Codex and structured Hosts read a declared Goal audit before judging acceptance or proposing closeout, including for an open Goal. A shared instruction preserves the existing rules for when to attempt delivery, when to wait, and which effects belong to Core. Notification does not grant execution authority.
  • The ordinary quota tests preserve their v0 capability, audit, settlement and delegation contracts. The installed example resolves the package root from the loaded Core, so it runs from source and from the wheel.

Current head: f016cb138b8d1063198c4891cdc6d82c9a35ba16, based on target main ac62962255322cd80a5b701a4187c6f47bc17d8c. The last commit only updates the paired RFC notes; the tested source ends at f6530786ea5c500f5e19ed93ec42a72f233c92c0.

  • The same 34 changed Python test modules ran to completion: 1,771 passed / 33 skipped. The skips were 31 tests requiring the optional DeepSeek harness and two live release tests. The isolated Core/provider wheels ran 299 tests across ten modules. Both selections include 61 native cases, ten of which check the source after model dispatch. Shared TypeScript tests: 109 passed. Control-plane typecheck, all 17 configured strict Mypy entries, changed Python Ruff and bilingual RFC checks passed. Isolated Ark SDK cases passed against a mocked HTTP service; MemT preflight and binding passed without live inference.
  • Six deterministic cases on the actual CLI and File/SQLite providers agree across main source, proposal source and the installed proposal. A checked artifact completes and spends once; a lost response recovers from the original journal; committed replay adds no effects; an incomplete artifact records neither completion nor debit. All 1,815 Core wheel sources and 24 provider sources match the tested revision.
  • Exact-head standard premerge ran six direct and 19 selected checks without failing commands. Overall it is held by quality_receipt_missing and a separate benchmark-sensitive maintainer review. Remote CI, live App/provider adoption, and relative model or complete-cost performance were not evaluated.

The prior head's wider run had 1,694 passes, 63 failures and 33 skips: 39 quota-contract expectations, two installed examples, and 22 native cases. The earlier 1,141 passes, ten failures and 15 skips also remain recorded against their own revision. The repaired runs above have their own scopes; they do not erase those results or represent a full repository run.

The split changes 102 paths (+7,586/−1,028). 89 of those paths, including 43 under Core, match #7430 at c4ea4c31cbcbc6a5e22665796dda01876a0a6d2b byte for byte. This is a measure of the potential reduction in the parent after main adoption and integration; the parent diff has not shrunk yet. The current head is ready for independent review. Merge readiness and authorization remain separate.

中文:本提案把规划、Host 调用、原会话恢复和结算统一到一份已校验的 Turn 来源。此次修复让原生适配器实际走到模型返回后的来源校验,并保留普通 quota v0、已声明的验收审计及隔离安装路径。在相同 File/SQLite fixture 上,主干、候选源码和安装包的六项可观察结果一致。完整 C1 的真实采用与成本验收仍留在 #7430。

cocolord and others added 10 commits November 6, 2026 19:54
…idence

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

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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 Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

REQUEST_CHANGES — 有一项当前必要验证缺口:新增原生模型后校验的十个用例均在 Host 启动前失败。 它们尚未执行要保护的校验分支;这不等于已经证明本 PR 引入新的生产回归。

动机 / Motivation

使用原生 Chat 托管任务和 turn run-once 的操作者。

同一次任务恢复时,旧实现继续解释精简执行信封;新实现拟让规划、Host 输入、journal 和结算读取同一份完整决定,避免原始任务、读取义务和恢复身份在不同投影之间漂移。

已验证通用 CLI 的独立产物验证、File/SQLite 丢失响应恢复与不重复结算;原生 Chat 新增的十个模型后校验用例在 Host 启动前失败,尚未证明该入口的完整迁移。

不宣告整个 C1 cutover、已安装 App/真实模型采用或净成本收益完成,也不引入新的执行或合并权限。

这里的 journal 是保存原始决定和已完成阶段的恢复记录。保持原始记录,才能在执行结果返回丢失后继续结算,而不是重新运行模型、选择另一个任务或再次扣减。这个问题有实际调用者,单独增加一个序列化函数无法交付恢复能力;当前提案选择完整 Turn 生命周期作为阶段边界,方向可以成立,但需要证明原生调用者也真正经过了被修改的路径。

改动思路 / Approach

当前入口由 FreshTurnDecisionOwner 读取原生决定,TypeScript 的 composeCompleteTurnDecision 在保存前组成 work_contract。规划、最终 Host 输入、会话身份、journal 和结算通过既有的 task/action/source owners 读取该来源。Python 继续承担进程、文件、会话和精确数字传输;它没有增加一个独立的策略决定者。Host 只执行获准工作,独立验证、Todo 写回、quota 与 scheduler 仍由外层 Core 承担。

单一当前输入与历史读取的分界有实际调用者和持久恢复依据;阻塞在原生校验资格,不能用新增兼容层或删除断言解决。

本次边界只应是能够独立执行和恢复的 Turn 生命周期;普通 quota、thin heartbeat、整体成本与全入口迁移仍由父 PR #7430 承担。

兼容分支应围绕已有记录保留:历史 v0 journal 使用原来的 action/Turn identity 和数字编码;显式传入无效现代来源必须拒绝,不能退回历史解码。当前计划删除第二份可执行信封是有价值的简化。Ark/MemT 文档也明确要求插件与 Core 来自同一集成 checkout,因此这里不把最低版本号当作任意旧版 wheel 的 API 兼容保证,也不要求为了尚未支持的旧组合增加适配层。

具体改动 / Changes

审查对象是整个 22b0f6c25a0450a66bd93f05954808dc0a5800ed → bff3b29b60b3b16bdfd7fe7ecc005bbf63bfdedf,共 100 个路径、+7365/-1014:生产与适配 52 个路径 +2077/-709,测试和 fixture 43 个路径 +5224/-292,文档 5 个路径 +64/-13。与父 PR 当前 head 有 91 个路径的内容相同,这只是定位差异的事实,不继承父 PR 的批准结论。

关键代码讲解

  1. composeCompleteTurnDecision 先验证可执行语义,再绑定原始内容、scheduler 参数及数字编码。它复用 selected-work、读取顺序和同一 capture 内的引用规则;未知证据字段保留,未知可执行 action/order 拒绝。摘要引用不应变成第二个事实来源,更不能把摘要中未出现的事项解释为不存在。
  2. build_loopx_turn_plan 从完整来源规划 route/session/transaction,当前计划保存一份 work_contract。executor 在启动和恢复边界重查来源,decision_capture 保存原始观察,journal 保留原来的结算身份。匹配的 File/SQLite CLI 用例验证了完成后丢失响应与 quota receipt 修复,恢复不再调用 Host,也不重复提交原始效果。
  3. ManagedSessionTurn.validator 是当前缺口所在的生产边界:模型返回后,现代计划应重新检查完整来源,再执行原任务声明的独立 argv。新增测试打算在这个位置移除、置空或替换来源,但当前 fixture 在此前就被普通 managed claim 的准备要求拦住。

规格依据为 docs/architecture/rfcs/controller-executor-unified-contract-v0/contract-and-context.md,不可变 spec_revision 为 22b0f6c25a0450a66bd93f05954808dc0a5800ed。其中 C1 原文要求首个 C1 PR 同时包含普通 quota 与 Turn 两个生产 composition 调用点,以及完整 producer → 最终输入旅程。本 head 把它改成“首个 cross-entrypoint cutover”,并提出可独立审查的 Turn extraction。这是本 PR 提出的阶段调整,不能拿修改后的文字证明自身已经满足原规格。

本次对 C1 的映射为 deferred:普通 quota/thin heartbeat、全入口替换及成本验收继续由 #7430 承担;完整 Turn 生命周期可以作为有调用者、可逆、可独立验证的增量来审查。当前原生模型后验证仍未取得合格证据。修复这个缺口后,可以再次判断该阶段是否成立,无需要求本 PR 同时吞并所有父项。

对主干的风险 / Risks

[P2] 让新增模型后校验用例真正进入原生 Host 路径

位置:tests/test_native_steward_turn_host.py:319–323。运行新增的 test_managed_postcondition_checks_complete_source_before_argv,File/SQLite 下 valid、historical、missing_complete、changed_complete、null_complete 共十个用例,均在 turn/start == 1 的断言处观察到 0。因此 after_model 的来源变更和真实 argv validator 都还没有被执行。

独立观察规划结果显示 execution_preparation.state=claim_required、reason_code=task_lease_missing,route 为 blocked。不可变 base 上原有成功场景也在同一准备边界停住。整个模块 base 为 12 failed / 37 passed,head 为 22 failed / 37 passed;失败身份包含相同的原有十二项及新增十项。原有 retargeted 用例也保留 DID NOT RAISE ValueError,其完整原因未在本次重新归结。不能仅由失败数把它们算成十个新生产缺陷,也不能把新测试整体算作已完成原生资格。

最小修复是让当前 fixture/既有 native admission owner 在模型工作前满足真实准备契约,再在模型后注入这些来源故障。保留 guard、原始会话、独立 argv、拒绝后无写回/无扣减和原始记录恢复断言。不要删除 turn/start 断言、绕过 lease 检查或把问题扩大成新的调度层。复核命令:uv run --extra test python -m pytest -q tests/test_native_steward_turn_host.py。

语义与 CI 对齐

验证 本次独立结果
完整来源、计划、请求、journal、数字、会话与任务正文的 7 个 Python 模块 PASS,210 passed
4 个完整 TypeScript 合同测试文件 PASS,109 passed
普通 quota、staged replan、旧信封与 controller 的相同 4 模块 PASS,base 168 / head 169
相同 CLI 完成、伪造产物拒绝、两种丢失响应恢复场景 PASS,base/head 各 6;File/SQLite 恢复保留原效果且不重复执行
新增原生模型后来源检查 FAIL,十个用例均未启动 Host;必要变更路径仍 UNVERIFIED
配置的 17 个 Mypy 根、TS typecheck、changed-Python Ruff、双语 RFC diff PASS

相同 CLI fixture、Host/独立 validator 脚本、argv helper 和丢失响应测试正文经过不可变 base/head 内容核对;其中正常完成测试对新输入结构的断言有明确版本变化。完整 source/prompt 的所有可选 hook 关闭/开启反事实没有在本轮穷尽,不能把普通投影比较当作每个可选 Host 的隔离证明。现代 Turn 输入是本 PR 明示的默认迁移;reward-memory、native child、context delta 的可用性也不会自动启用其能力。

没有查询或等待远端 CI。CQR cqr_43f92f74a80bd23d3e67 已记录 FAIL,verify 为 invalid_receipt。premerge 的 6 项直接检查和 19 项选中检查均通过,最终因质量回执与 1 项 manual hold 保持阻塞;必要审查证据与 benchmark/merge holds 分别报告;绿色机械检查不能替代尚未执行的原生校验。协议名称仍限于一次 Turn、原始来源和恢复记录,没有给 Host 扩展为独立 peer 的权限。提示中的读取、写域和停止条件是义务;导航、证据、hash 和已保存文件不授予执行、状态写回或合并权。

我的整体评价 / Verdict

这个阶段的机制成本与“同一 Turn 的完整来源及持久恢复”问题相称,复用既有 owner 比另建一套决定器合适。当前 v1 路径统一输入、历史 v0 只保留原记录读取,是可以保留的兼容边界。现有入口无需新增用户填写的配置或确认轮次;但 long_horizon 与 user_experience 仍为 not_yet_proven:通用 CLI 恢复已验证,原生模型后的来源变更与独立验证尚未真正到达。

检查 CLI、原生 Chat Host 和提示构造;本 PR 没有修改渲染页面或布局。已安装 App 的实际模型表现与采用情况未验证。

本次扩展既有 Turn schema/read contract,保留原 action vocabulary 和历史 identity,未建立新的业务决定 owner。应先修复上述必要验证缺口,并对本次尚未完成的可选 hook 反事实给出受影响范围证据,再复审完整 head。没有因为父 PR 的所有将来目标尚未完成而额外设门,也没有把来源/hash 存在、通过测试数量或修改后的 RFC 当成产品采用和长程收益。

English verdict: REQUEST_CHANGES at bff3b29. Ten new native post-model source-validation cases never reach Host dispatch; baseline failures are retained without claiming a new production regression. Generic CLI recovery and ordinary projections pass; native changed-path qualification remains required.

operation_id="complete-postcondition", todo_id=todo_id)
completed = finish(runtime, accepted)
calls = [json.loads(row) for row in capture.read_bytes()[len(before):].splitlines()]
assert sum(row["method"] == "turn/start" for row in calls) == 1

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 新增的五种 fault × File/SQLite 共十个用例在这里全部得到 0 次 turn/start,尚未执行 after_model 的来源故障或独立 argv。当前规划在 claim_required/task_lease_missing 时已 blocked。base 本身有十二个原有失败,不能据此断言新生产回归;但新增模型后校验仍缺必要的实际调用证据。请通过既有 owner 满足当前 admission,再保留有效/历史输入、三种无效现代来源及拒绝后无写回/无扣减断言,重跑本模块;不要绕过 guard 或删除这条断言。

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

REQUEST_CHANGES — 三项新增问题:普通 quota 的测试越过提案边界;结构化 Host 提示收窄 audit 义务;新增测试 argv 引用不存在的 PACKAGE_ROOT。 本次使用当前契约的 fresh audit,依据是新复现的反例,不是重复已有原生校验结论。

动机 / Motivation

使用 CLI Turn、原生 Chat 托管任务及其 Host 适配器的操作者。

一次已验证完成的任务在返回途中中断时,旧流程可能重新解释精简信封;本提案让规划、最终 Host 输入和原 journal 读取同一份完整决定,并保留原始效果身份。

真实 File/SQLite 的独立产物、拒绝和原 journal 恢复对照通过;普通 quota 测试回归与结构化 Host 提示的审计顺序变化仍需修复。

不宣告整个 C1、已安装 App 或真实模型采用、完整成本净益完成,也不新增执行或合并权限。

这里的 journal 是保存原始决定和已完成阶段的恢复记录。操作者需要在结果返回丢失后继续原任务结算,而不是重新启动模型、切换任务或再次扣减。只增加一种序列化格式不能完成这个目标;必须把实际规划、最终输入、保存和恢复的消费者连接起来。当前提案的方向有真实调用者,仍需对失败的既有与新增边界分别给出证据。

改动思路 / Approach

来源完整性由 TypeScript 既有 owner 校验;Python 承担文件、精确数字及进程 I/O,Core 保留独立验证和结算。

仅完整 Turn 生命周期与历史恢复;普通 quota/heartbeat、全入口采用和完整成本仍由 #7430 承担。

当前 v1 路径先检查完整决定和同一 capture 的引用,再构造 route、会话及原始结算身份。Host 返回后仍须独立验证;Todo、quota 和 scheduler 效果属于外层 Core。已记录 v0 只走明确版本的历史 reader,非法现代输入不能借它绕过检查。这是保留真实持久消费者所需的兼容分支,而不是新增当前事实来源。

下面是本 head 的源码路径对照,属于解释;执行证据见验证表。

路径 本次变化
当前 Turn 完整决定 → 单一 work_contract → 最终 Host 输入 → 原 capture/journal → 独立验证和结算
历史恢复 原 v0 journal → 版本化 reader → 同一效果身份;不重新启动 Host
普通 quota 保持既有 producer;其 v1 cutover 留在父提案

具体改动 / Changes

审查范围是完整 22b0f6c25a0450a66bd93f05954808dc0a5800ed → bff3b29b60b3b16bdfd7fe7ecc005bbf63bfdedf,100 路径、+7365/-1014;52 个生产/适配路径、43 个测试/helper 路径、5 个文档路径均已读完。三项提交均有 DCO sign-off。没有继承父提案或另一份同 head 评审的批准。

关键代码讲解

  1. composeCompleteTurnDecision 复用既有 TypeScript action、selected-work、required-read 与 source owner,保留未知证据及精确数字拼写,拒绝未知可执行语义。引用只有在同一完整来源中精确相等时才能替代重复副本。
  2. build_loopx_turn_plan 将当前 plan/request 迁至一份 work_contract;capture、journal、session 和 completion 消费相同原始身份。真实基线 v0 journal 经当前 head 恢复后保留原完成 receipt 和 capture,证明此兼容边界确有消费者。
  3. render_prompt 是 DSH、Ark 与原生 Chat 共用的最终结构化提示。它仍保留读取原 capture、不重新 admission、Core 拥有效果等约束,但现代分支把 audit 的触发缩小为 closeout,见第二项问题。

规格依据:docs/architecture/rfcs/controller-executor-unified-contract-v0/contract-and-context.md;不可变 spec_revision:22b0f6c25a0450a66bd93f05954808dc0a5800ed。原 C1 要求首个 C1 PR 同时包含 quota 与 Turn 两处 composition 以及完整 producer 到最终输入旅程。本 head 提出的“首个 cross-entrypoint cutover”阶段调整需要按原目标判断,不能用改写后的 RFC 自证满足。这里将 C1 记为 deferred:Turn 生命周期可作为有实际消费者、可逆的前置增量审查,普通 quota/heartbeat、全 Host 采用和完整成本继续留在 #7430;不声称完整 C1 已交付。

对主干的风险 / Risks

[P2] 让普通 quota 测试保持历史 producer 边界

tests/control_plane/test_turn_envelope_capability_facts.py:62 新增 envelope == full 与 v1 断言,但该测试调用的是普通 quota should-run --turn-envelope。未修改的 quota_presentation.py:102 仍调用历史 build_turn_envelope,这也符合本 PR 明示的 extraction 边界。相同命令在不可变 base 20 passed,当前 head 20 failed;这些用例在 capability/audit 断言前就终止了。这是本 PR 引入的测试回归,不能说已证明 ordinary quota 生产格式发生回归。

最小修复是保留普通 quota 的历史预期,通过真正的 Turn producer 单独验证 v1;不要为了让这些测试通过而把父提案的普通 quota 迁移塞进本 PR。同类预期还使 settlement 的3项、Host context 的8项与 delegation context 的8项失败,共39项。另跑 settlement、Host context、delegation context 与 research-team 四模块,base 的相同选择为49项通过。复核:uv run --extra test pytest -q tests/control_plane/test_turn_envelope_capability_facts.py,并运行上述三个相邻模块,保留原 capability、refusal、audit 和 delegation 断言。

[P2] 保留验收判断前的 audit 读取义务

host_candidate.py:325–326 的现代提示只要求在 Goal closeout 前处理 audit。基线要求在 判断 Goal acceptance 或提出 closeout 前读取它。用相同完整 source 调用两个实际 renderer:旧提示包含前者的完整时序,当前提示只剩 closeout。若 Host 正在评估某项验收但保持 Goal 开放,新措辞没有保留这一读取前置条件。完整 JSON 字段仍存在,不能证明行为指令的触发、顺序和义务等价;这里没有声称观察到真实模型违规。

请在现代共用 renderer 恢复“验收判断或 closeout 之前”的原义,保留单一来源设计。增加不关闭 Goal 的 acceptance-judgment 反事实,并核对通知不决定执行权、execution_policy/orchestration、原证据和 Core 效果归属等条款。实际双版本提示对照还确认,原 capture/no-readmission 与外层效果 owner 条款仍保留;不把所有重写都归为错误。

[P2] 移除测试中不存在的 PACKAGE_ROOT 引用

tests/test_managed_research_team.py:196 的新 argv 读取 demo.PACKAGE_ROOT,但被导入的 examples/managed-research-team/research_team.py 没有定义它。File/SQLite 两个用例都直接 AttributeError,尚未启动 Node,更没有到达新增加的 EEXIST 断言;base 的这两个用例通过。请复用实际 bootstrap 的 directory/provider 两参数调用,删除未定义的第三参数,保留重复初始化必须拒绝且 canonical state 不变的检查。复核:uv run --extra test pytest -q tests/test_managed_research_team.py::test_bootstrap_refuses_existing_state。

语义与 CI 对齐

验证 本轮独立结果
34 个当前改动的根 Python 测试模块 63 failed, 1694 passed, 33 skipped in 2001.85s (0:33:21);完整失败和 skip 保留
相同 ordinary quota capability/audit 模块 base 20 PASS / head 20 FAIL,新增测试预期回归
4 个改动的 TS 测试文件 PASS,109 项
真实 CLI、File/SQLite 与独立 20 行产物 PASS,完成/缺尾项拒绝/原 v0 回复丢失恢复/重放,18 个记录阶段
实际 Ark SDK HTTP fixture / MemT source preflight PASS,55 /25;MemT 其余34项未运行,不代表原生 memory 已合格
TS typecheck、17 个 mypy 根、语义 inventory PASS
标准 premerge 6 direct +19 selected PASS;整体仍 manual_review_required
workflow 的 kernel Ruff argv FAIL,仅未改动的 base F841;不要求本提案顺手修无关文件

另一个当前 head 的 review 已指出原生 Chat 新增模型后校验尚未到达 Host 的缺口;本轮不重复认领该发现,也不以新通用 CLI 证据替代原生资格。本轮原生模块基线12失败/37通过;当前head保留相同12个失败身份并增加10个模型后资格用例失败,这10项均观察到0次 Host 启动。63项失败由39项 quota 相关预期、2项未定义符号和上述22项原生失败构成;不把它们统称63个新生产缺陷。没有查询或等待远端 CI;缺远端 CI 结果不是本次阻塞理由。质量 receipt、benchmark-sensitive maintainer hold、审查结论与合并授权分别处理。

我的整体评价 / Verdict

“同一 Turn 的完整来源及持久恢复”需要这些现有消费者一起迁移,机制成本与问题相称;保留实际 v0 持久记录、删除第二份当前 carrier 是合理的边界。来源完整性由 TypeScript 既有 owner 校验;Python 承担文件、精确数字及进程 I/O,Core 保留独立验证和结算。 仅完整 Turn 生命周期与历史恢复;普通 quota/heartbeat、全入口采用和完整成本仍由 #7430 承担。

long_horizon 与 user_experience 仍为 not_yet_proven:通用 CLI 的一次完成、错误产物拒绝及原会话恢复已有独立证据,但当前 quota 测试、结构化指令和原生变更路径仍有缺口。可选 hook、真实模型表现和完整成本净益没有由字段、hash 或测试数量证明。v1 扩展既有 Turn schema/read vocabulary,不新建业务决定 owner;未知执行语义拒绝,未知证据保留,功能可用也不等于已获授权或自动启用。

检查 CLI、原生 Chat Host 与提示构造;本 PR 没有修改渲染页面或布局。 已安装 App 的模型表现、采用和实际视觉旅程未验证。

English verdict: REQUEST_CHANGES at bff3b29. Repair the quota expectations, acceptance-audit ordering and undefined bootstrap test symbol. Deterministic CLI recovery passes; native and live optional-provider qualification remain explicit gaps.

# Both admission and refusal carry the same complete source. Keep the
# historical decoder checks below without choosing a second producer path.
from loopx.control_plane.quota.turn_envelope import build_turn_envelope
assert envelope == full and full["schema_version"] == "loopx_turn_envelope_v1"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 保持普通 quota 的历史 producer 边界。该测试仍调用 quota should-run --turn-envelope,未改动的 quota_presentation.py:102 返回历史 build_turn_envelope;这里新增的 source equality/v1 预期使同一模块从 base 20 passed 变为当前 head 20 failed,实际 capability/audit 断言未到达。本提案明示把 ordinary quota cutover 留在 #7430,请保留其历史预期,通过实际 Turn producer 单独验证 v1,并回跑相邻 settlement/Host/delegation context 用例。

"Read agent_context before planning; unavailable_context is a failed read, "
"not empty context: discard affected cached context and hold dependent work "
"until recovery. Independent work retains its existing authority.\n"
"Before Goal closeout, preserve vision_continuation_audit's ordered "

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 保留验收判断前的 audit 义务。相同完整 source 通过两个实际 structured Host renderer:基线要求在 judging Goal acceptance or proposing closeout 之前读取 audit,现代分支仅保留 Before Goal closeout。Host 可以评估验收而保持 Goal 开放,因此这缩小了原来的触发条件;完整 JSON 字段保留不能证明指令时序等价。请恢复 acceptance judgment 或 closeout 前读取的原义,并覆盖不关闭 Goal 的反事实;此处未声称真实模型已违规。

before = canonical_tasks(root)
repeated = subprocess.run(["node", "--no-warnings", "--experimental-sqlite", "--experimental-strip-types",
str(demo.HERE / "bootstrap.ts"), str(root)], capture_output=True)
str(demo.HERE / "bootstrap.ts"), str(root), "file", str(demo.PACKAGE_ROOT)], capture_output=True)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 删除不存在的 PACKAGE_ROOT 参数。导入的 examples/managed-research-team/research_team.py 未定义 PACKAGE_ROOT;当前 File/SQLite 两例都在构造 argv 时 AttributeError,尚未启动 Node 或到达新 EEXIST 断言,base 两例通过。实际 bootstrap.ts 只接收 directory/provider,请复用现有 prepare 的调用,保留重复状态必须拒绝与 canonical state 不变的检查。

cocolord and others added 14 commits November 7, 2026 06:08
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
)

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…#8245)

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

[P2] 通用 CLI 的 v1 切换使仓库自带 TraeX 适配器无法完成新一轮工作。 同一条 turn run-once --host generic-cli、同一份适配器脚本和同一验证器,在 File 和 SQLite 的基线都提交成功。当前提交启动了适配器,但它收到 loopx_turn_host_request_v1 后退出,TraeX 和独立校验均未运行。 请求发送位置 参考适配器的版本检查

[P2] 迁移既有进程中断验证的捕获引用。 当前提交生成 v1 journal,原测试仍从旧的 plan.turn_envelope 读取捕获,四项均在 SIGKILL 或恢复前报错。 原中断测试

动机 / Motivation

运行 LoopX 托管任务的开发者和自动化需要在一次执行中保留同一份任务、权限和结算依据。一个 Turn 的结果返回途中中断时,后续调用应该从原记录继续,沿用原任务与扣额身份。当前提案把规划、宿主输入和恢复接到同一份经过校验的来源。已写下的旧记录可以继续重放,但已发布的 TraeX 路径无法启动一次新工作。

本次是 Turn 生命周期迁移。普通 quota、薄 heartbeat、所有宿主的安装采用与完整成本属于更宽的 C1 验收。#7430 的原合入已回滚,整体验收仍待交付。 回滚记录

改动思路 / Approach

现有 TypeScript owner 从已准入决定构成单一来源,绑定任务、宿主上下文和原结算身份。Python 把它交给宿主,并保存原始读取引用。Core 仍负责独立验证及效果结算。保留实际历史记录的版本化 reader 有必要。当前交付边界是完整 Turn 生命周期及已记录 v0 的继续执行。

共享来源能减少规划和恢复之间的解释分歧。宿主选择器也需要知道当前适配器能消费哪一版本。DSH、Ark 和 MemT 接入了共享版本检查,通用 CLI 仍可选择只读 v0 的适配器,现有的版本迁移因此超出了已验证的消费端。

具体改动 / Changes

关键代码讲解

  • composeCompleteTurnDecision 复用 action、required-read 和 settlement 的 owner,把原始决定绑定进完整来源。规划 build_loopx_turn_plan 从这一来源构造 v1 plan,区分历史解码与当前输入。 TypeScript 构成 规划入口

  • build_loopx_turn_host_request 用同一来源组织 Host 输入。_run_host 把已捕获的 v1 输入送进通用进程 stdin,参数检查只验证适配器 argv 的形状。 Host 请求 通用适配器参数

  • prepare_turn_decision_capture 和 load_loopx_turn_plan_from_journal 让恢复继续读取原记录。用基线写成的真实 v0 终态 journal 交给当前提交,在 File、SQLite 上均读回同一 Turn,Host 调用、写回和扣额均未重复。 捕获入口 journal 读取

依据 docs/architecture/rfcs/controller-executor-unified-contract-v0/contract-and-context.md 的修订 ac62962255322cd80a5b701a4187c6f47bc17d8c。Historical receipts and readers 已在真实旧记录重放中验证。C1 caller replacement and cutover unit 对不兼容消费者要求在派发前给出可操作的拒绝,这一条未满足。完整 C1 留待普通 quota、heartbeat 和其余宿主旅程共同验收。 原规格

对主干的风险 / Risks

[P2] 先迁移 TraeX 消费端,再切换其新请求

触发条件是按现有 Quick Start,通过 --host-adapter-command-json 选择 scripts/traex_turn_host_adapter.py。基线和当前提交的脚本字节相同。对照运行用真实 CLI、真实进程 stdin 和实际 File/SQLite provider,只有外部模型替换为确定性 TraeX fixture。基线产生并独立验证标记,两种 provider 各写回、扣额一次。当前提交送出 v1,适配器以 2 退出,CLI 记录 host_failure,没有生成标记、写回或扣额。用户只看到宿主命令非零退出。 现有 Quick Start

请复用现有版本校验和完整来源 renderer,让随库 TraeX 适配器理解 v1 并更新对应文档。对尚未兼容的外部绑定,应在派发前给出可执行的升级提示。用同一条 CLI 命令在 File 和 SQLite 上重跑,断言已兼容绑定的独立校验和一次结算,以及不兼容绑定的派发前拒绝。继续覆盖实际 v0 journal 重放。

[P2] 让原中断与撤销测试真正跑到恢复

现有中断测试在宿主停在检查点后,从 plan.turn_envelope.detail_ref 读取原 capture。当前计划把引用移到 plan.detail_ref。相同命令选择 File 和 SQLite 的 writeback、revoked 四项,基线 4 项通过,当前 4 项在原路径报 KeyError,都未执行 SIGKILL 后的恢复。仅在独立测试副本换成 v1 捕获路径后,四项均通过,保留了原始捕获、原身份、撤销后拒绝和一次扣额的断言。请按记录版本迁移测试读取并重跑完整中断套件。复核命令为 uv run --extra test python -m pytest -q --no-cov tests/control_plane/test_turn_interruption_recovery.py -k 'writeback or revoked'。 新 plan 构造 旧测试引用

语义与 CI 对齐

当前源码上,上一轮的原生派发、lease、开放 Goal 的 audit、普通 quota 和重复 bootstrap 选择共 42 项通过。完整来源的请求、journal 和相关生命周期选择 66 项通过,TypeScript 合同 109 项通过。改动文件 Ruff、17 个配置内 mypy 目标、控制面 typecheck 及双语 RFC 检查通过。新旧 TraeX 请求对照和中断测试的失败仍成立。当前 Turn 的 v1 默认切换已明示,普通 quota 仍使用 v0;本次扩展既有 Turn 版本词表,未改变 Goal 权限或 Core 对写回、扣额和调度的责任。

当前主干 94b91e48aa4a2cdafe9d4d31d918fe84d0112b41 与此提交在 quota capture、progressive context、Turn envelope 和 Codex context 四处冲突。这是独立的合并门禁。必需的本地工作流 Ruff 在基线和候选均对同一未改文件报 F841。托管 CI 未查询。 基线诊断位置

我的整体评价 / Verdict

统一来源和恢复原结算的设计有用,真实历史重放保住了连续性。对于仍在使用仓库推荐 TraeX 入口的操作者,当前版本迁移会让新任务在产出前停止。这个回归影响日常使用和持续执行,需先补齐消费端及不兼容绑定的拒绝。现有的 Turn 版本合约应扩展到已验证的绑定。旧记录原样解码。审查覆盖 CLI、原生 Chat 调用与结构化提示,改动集中在输入与恢复流程。已安装 App、真实模型与完整成本仍待独立验证。

English verdict: REQUEST_CHANGES for f016cb138b8d1063198c4891cdc6d82c9a35ba16. Fresh generic CLI turns send v1 to the documented v0-only TraeX adapter and fail on File and SQLite. Historical v0 replay retains the original effects. Migrate the interruption oracle to the v1 capture reference.

argv,
project=project,
input_text=json.dumps(request, ensure_ascii=False, separators=(",", ":")),
input_text=json.dumps(host_input, ensure_ascii=False, separators=(",", ":")),

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 这条通用 CLI 路径把 v1 送给了尚未迁移的 TraeX 参考适配器。同一脚本在 File/SQLite 基线均产生并校验了产物,各结算一次。当前两种 provider 均在适配器的 v0 检查处退出,未执行 TraeX 或结算。请迁移随库适配器与 Quick Start,并在派发前对尚未兼容的绑定给出明确拒绝。

),
}
if current:
payload["work_contract"] = work_contract

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 现有进程中断验证仍读 plan.turn_envelope.detail_ref,切到 v1 后 File/SQLite 的 writeback、revoked 四项在 SIGKILL/恢复前 KeyError。基线 4 项通过;本地测试副本只改用 plan.detail_ref 后也 4 项通过。请迁移原验证对已记录版本的读取,保留中断、撤销与原结算断言。

Jiaqiiii523 and others added 22 commits November 8, 2026 00:42
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…-tokens-20261107

Fix Dashboard and Windows release qualification
…y-grouped-records-20261107

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ouped-records-20261107

Group linked Explore records in research history
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…goal-times-20261107

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…pture-20261107

Stage saved replans in stateless progressive recovery
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…-replay-20261107

Reuse the original Codex claim when readiness is interrupted
…-times-20261107

Show sourced times on child Goal research cards
Keep main's stateless first-read, capture-bound claim recovery, and settlement presentation. Validate the complete source before using the shared projection and preserve its original reader.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Declare the adapter's supported wire version before a new invocation. Use the shared complete request renderer and result fields for TraeX. Keep v0 journal recovery and the original capture identity in the process interruption tests.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 7, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

[P2] 默认 Turn 计划超过现有字符预算。 同一 36 Todo、1 Agent、12 条 run fixture,未带 Vision 21,985 → 54,210,带 Vision 25,448 → 61,609。两组都是默认实际 stdout,现行门槛 26,000。 让默认只读计划继续使用现有有界投影或同一来源的可核验详情入口,保留版本、完整写回义务、准确路由及无执行副作用,再按现行预算重跑原 fixture。 默认输出 现行门槛

[P2] 候选的 v1 参数让基线比较提前退出。 原生 CLI 差分用候选的 preview 参数跑两个版本。基线不识别 v1 声明选项,退出 2。只去掉基线的该选项后,基线 preview 恢复,候选仍带声明通过,两侧都无执行效果。 给基线和候选各用其支持的 preview 参数和已记录版本的字段读取器,保留相同场景、语义断言和预算。 共同 preview 参数

[P2] 执行器越过现有结构上限。 同一维护性 ratchet 在基线通过,在候选因 run_loopx_turn_once 的语句计数 90 → 92 失败。上限 90,决策点 58 → 59,未越 60。 将适配器版本兼容性及拒绝结果移到已有 Host 请求校验边界,保留派发、capture 和自动准入前的拒绝顺序,并重跑 ratchet 及 File/SQLite 用例。 新增版本门禁

本次评审提交 d9cedec1ee70aabd88b3edff21b3a8b8903ee941。实际比较基线 e2371c476805f67903dd3c338a7e2712f577c9cc,当前主干 e58ba30bc949c29ec90c570a8362fb1e7ec9f3be。本地合并树无冲突,净改动 116 路径。

动机 / Motivation

运行 LoopX 托管任务的开发者和自动化,需要先读取执行计划,再用同一份任务、权限和结算依据调用宿主。 TraeX 收到不兼容版本时,新提交会在启动前给出可操作的拒绝。支持新版本的宿主可完成工作,结果回传中断后可按原记录继续。 上轮两项已修复。默认计划仍从约 2.2 万或 2.5 万字符增到约 5.4 万或 6.2 万,已超过该入口的 2.6 万字符门槛。 本轮验收的是当前 Turn 的计划、宿主输入及恢复。普通 quota、已安装产品和整条 C1 路径的采用另行验收。

改动思路 / Approach

保留一份已校验的执行来源,并在公开只读入口恢复有界投影。兼容性判断应在派发前沿同一个版本 owner 执行。 本次边界包含普通 Turn 的计划、合格宿主的实际输入和已记录 v0 的恢复。 TypeScript 保留同一工作来源的绑定,Python 负责输送和按记录版本恢复。新绑定显式声明支持版本。普通 quota 和已有 journal 沿各自的读法,现有验证器与结算 owner 保留原身份。 上轮评审

具体改动 / Changes

关键代码讲解

  • composeCompleteTurnDecision 结合本轮决策和任务绑定。build_loopx_turn_plan 构造 v1 计划,当前默认输出携带完整 work_contract。 构成 规划
  • run_loopx_turn_once 在派发前检查新通用适配器声明。stage_turn_decision_capture 保持原捕获和恢复身份。 执行 捕获

依据 docs/architecture/rfcs/controller-executor-unified-contract-v0/contract-and-context.md 的 e2371c476805f67903dd3c338a7e2712f577c9cc。Historical receipts and readers 已验证,File 与 SQLite 的原 v0 终态均未重复效果。C1 caller replacement and cutover unit 的参考 TraeX 兼容与派发前拒绝已验证。C1 wire-layout recommendation 的有界计划输出仍未满足。完整 C1 的普通 quota、薄 heartbeat 与已安装消费者采用另行验收。 现有合同

对主干的风险 / Risks

File 和 SQLite 的两个真实 CLI 用例走到参考 TraeX 和独立校验。缺少声明及声明 v0 的新调用均在派发前拒绝,兼容版只结算一次。18 项中断和撤权测试通过。用基线实际生成的两个 v0 journal 在候选重放,原键、原请求和扣额数均保持,四类新增效果皆为零。 兼容用例 原捕获中断验证

语义与 CI 对齐

按记录版本读取写回路径后,三项 Vision 条款及实际 registry/runtime 参数均保留,默认计划仍超限。原有两项测试在旧字段提前失败。仓库原生命令差分另在基线解析新版 flag 时提前退出。请同时修复真实输出和测量路径。复核用 uv run --extra test python -m pytest -q --no-cov tests/control_plane/test_cli_output_budget.py -k crowded_turn_plan_budget 与 uv run --extra test python examples/control_plane/cli-output-budget-regression-smoke.py。 预算用例 当前 CLI 渲染

当前生命周期选择 560 项通过,109 项 TypeScript、工作流 Ruff、17 个 mypy 目标、控制面类型检查、双语 RFC 与 9 次 DCO 签署通过。标准 premerge 的 6 个直接检查通过,19 个选中检查有 1 项维护性失败,另有独立手动门禁。相同 ratchet 在基线通过。源码和真实 provider 验证使用确定性宿主替身,托管 CI 未读取。

我的整体评价 / Verdict

参考适配器和历史恢复已提供可复验结果。现有预算、基线比较和执行器结构仍阻碍日常使用与后续可靠验收。保留一份已校验的执行来源,并在公开只读入口恢复有界投影。兼容性判断应在派发前沿同一个版本 owner 执行。 实际合入差异无 apps 路径。受影响入口为 CLI 和宿主输入,评审覆盖文本及结构化读回。 已安装宿主、真实模型采纳和整体使用成本仍待验证。

English verdict: REQUEST_CHANGES. The two prior findings are resolved. Default plan output exceeds the existing budget, the differential sends a v1-only flag to the baseline, and the executor fails the maintainability ratchet.

# The current plan has one source, so inspection retains it.
# Execution still requires its explicit surface, even if a
# caller restores omitted session/transaction metadata.
payload = dict(payload)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 同一 36 Todo、1 Agent、12 条 run fixture,未带 Vision 21,985 → 54,210,带 Vision 25,448 → 61,609。两组都是默认实际 stdout,现行门槛 26,000。 让默认只读计划继续使用现有有界投影或同一来源的可核验详情入口,保留版本、完整写回义务、准确路由及无执行副作用,再按现行预算重跑原 fixture。

@@ -620,6 +620,7 @@ def _mode_variant_commands(
AGENT_IDS[0],
"--project",
str(project),
"--host-adapter-request-schema", "loopx_turn_host_request_v1",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 原生 CLI 差分用候选的 preview 参数跑两个版本。基线不识别 v1 声明选项,退出 2。只去掉基线的该选项后,基线 preview 恢复,候选仍带声明通过,两侧都无执行效果。 给基线和候选各用其支持的 preview 参数和已记录版本的字段读取器,保留相同场景、语义断言和预算。

@@ -1617,10 +1649,37 @@ def persist_source_journal(source_admission: Mapping[str, Any]) -> None:
)
if needs_host and goal_admission is not None:
goal_admission.require_current()
if needs_host and argv is not None:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 同一维护性 ratchet 在基线通过,在候选因 run_loopx_turn_once 的语句计数 90 → 92 失败。上限 90,决策点 58 → 59,未越 60。 将适配器版本兼容性及拒绝结果移到已有 Host 请求校验边界,保留派发、capture 和自动准入前的拒绝顺序,并重跑 ratchet 及 File/SQLite 用例。

@mergify

mergify Bot commented Nov 7, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

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 HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants