Skip to content

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

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

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

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

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。

…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>

@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 不变的检查。

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>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant