Skip to content

refactor(quota): reference duplicate fallback diagnostics - #6909

Merged
huangruiteng merged 2 commits into
mainfrom
codex/quota-turn-convergence-20261020
Oct 20, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/quota-turn-convergence-20261020

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem And Result

An Agent reading ordinary quota should-run JSON receives the complete blocked-priority fallback twice: at the root and inside heartbeat_recommendation. This change replaces only an exactly identical nested mirror with blocked_priority_fallback_ref="$.blocked_priority_fallback". The complete root fact stays in the same response. Different diagnostics, including JSON Boolean/number differences, remain inline; raw captures and the existing --include-detail agent-todos view preserve their original shape.

The compatibility projection stays in the existing packet owner. The CLI delegates after the decision and original capture have been produced. There is no second guard, configuration, authority store or settlement operation.

Author And Specification

Criterion Disposition Evidence / boundary
Preserve complete execution facts and original observation implemented for this rendering slice Full root facts; unchanged capture bytes; matching same-capture action and settlement dimensions
Reuse existing owners and compatibility path implemented Existing packet/CLI projection, explicit detailed view and native capture/settlement owners
Disclose ordinary output changes implemented Protocol and English/Chinese RFC name the new reference and distinguish raw-source hashes from action equivalence
Full/thin/Turn caller convergence and complete costs deferred in the existing convergence stream Full caller-family migration, model outcomes, required-detail costs and installed App/Lark adoption remain open

Integration Repair

The signed merge integrates current main into the original branch. The only conflict was in test_quota_decision_capture.py; both complete, independently meaningful tests are retained. Every pre-existing current-main function and the original PR regression function were checked against their immutable source. The final PR delta is still seven files, +168/-4.

The previous CI merge 359e37434018134b82567a2dbff2db3949d23d68 used base 260fc9bd4ee76c8b2cfc82e4723473b2d207976f and source 4e8e9c27b347210b90ac7f3982647df10157e1ab. Its four failed cases also fail on that immutable base. Current main already contains the owning repairs: explicit eligible-selection expectations (d9be811d5), the accepted private-owner configuration contract (4c88ac15b), and native history-injection expectations (be39ba5f9). This PR reuses those repairs. It does not weaken permission checks or remove reason assertions to manufacture a pass. Previously cancelled shards remain cancelled.

Validation

Run state: finished. Inputs: synthetic/public fixtures with isolated backends. Validation uses the source checkout at the exact tested head.

Check Result
Focused pytest across quota projection/capture, TurnEnvelope, settlement CLI, heartbeat transport, boundary selection, machine configuration and native steward 277 passed; includes actual isolated File/SQLite CLI capture, replay, denial and recovery paths
Immutable-base rendering counterexample Same five-case oracle: target main has the two expected exact-mirror failures and three passing preservation cases; this head passes all five
Ruff / configured mypy Passed; declared Python roots / 17 configured sources
Semantic advisory, bilingual RFC pair, changed-Python compile, diff and public-boundary checks Passed; no added supported vocabulary carriers; seven public paths clean
Exact-scope change quality cqr_2e3eb27944c542e1ede0, verified; fingerprint 2e3eb27944c542e1ede0a75433bc6149ef294f523f85939f52f49b7a5878a4d1
Standard risk-based premerge All 6 direct and 17 selected checks passed; zero failures, warnings or manual validation holds

The original head had separate source and wheel qualification. That historical evidence is retained in its published review; it is not relabeled as a fresh wheel run for this integration head. Current CI was not queried or awaited under the resolved no-CI-wait policy. Exact-head review and merge readiness remain separate gates.

The first author placement failed the legacy-reader migration ratchet (14 versus 13). It was refined into the existing packet owner and passed with unchanged budgets. Earlier package attempts exposed fixture-layout and missing qualified Chat-asset prerequisites; corrected source/package runs belong to the original-head history. Raw-hash comparison across rendered views was rejected as an oracle because source identity intentionally distinguishes them. Those observations are preserved rather than rewritten as current-head failures or silent passes.

Current Merge Hold

The exact-head review is published and read back, and native merge-readiness returns ready=true with no unresolved review threads. GitHub still reports REVIEW_REQUIRED / BLOCKED: an ordinary protected merge was rejected by base-branch policy. A protected auto-merge request was also rejected because this repository disables auto merge. The PR remains open with no merge commit or enabled auto-merge request. No administrator bypass was enabled. Required branch review/merge conditions must be satisfied before the normal protected path can finish.

Compatibility And Remaining Acceptance

The ordinary JSON layout intentionally changes. External parsers depending on the nested mirror must use the preserved root or detailed view; ecosystem-wide installed compatibility is unqualified. Comparing distinct equal objects adds serialization work, so fewer output bytes do not establish a latency, model-quality or complete-cost improvement.

The paired RFC checkpoint retains the merged requirement/closeout/Host-capture work and the existing remaining acceptance. Next, map retained clauses and actual consumers across representative authorized shapes, migrate a complete caller family and compare the same captured decisions through full/thin heartbeat and Turn, including required reads, tokens, IO, latency and resource growth. Retire a replaced projection after the final real caller passes recovery and compatibility acceptance. M7.4/R5 and the parent convergence work remain open.

UI impact: none; existing CLI JSON rendering, tests and protocol/RFC text only. This does not qualify installed App/Lark adoption or launch benchmark/model jobs. The public diff and this description contain no private state, raw captures, credentials, local paths or internal links. Both existing RFC translations change, and author commits retain DCO sign-off.

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; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval): APPROVE 6909@4e8e9c27b347210b90ac7f3982647df10157e1ab.

动机

通过普通 CLI 决定下一轮工作的 Agent,需要同时看到高优先级阻塞原因和当前可执行的替代任务。 例如一个高优先级任务仍在等待依赖,另一个任务可以推进:旧输出在顶层和建议对象中重复放整份阻塞详情,读取两遍并不会提供更多决策信息。 本次只在两份 JSON 内容和类型完全相同时把内层副本换成同一响应的顶层引用;完整原因和恢复条件仍可直接读到,差异副本和显式详情读取保留原形。

本次不缩短阻塞原因,不改变通知、执行义务、配额或任务优先级,也不把输出字节减少当作模型效果或延迟提升。 完整任务提示的收敛、真实模型采用、完整成本和安装后 App/Lark 验收仍归现有 M7.4/R5;本 PR 只收敛这一处确实可推导的重复表示。

改动思路

重复诊断的引用放在既有 packet owner 中,仅作用于已计算决策的 CLI 展示;任务、调度、通知和结算仍由原控制面决定。 当前 PR 只去掉普通 CLI 中一份已验证相同的副本,保留完整原始捕获、显式详情和差异副本;不增加读取、准入或持久化状态。 reference_duplicate_fallback_guidance 先要求顶层和内层都存在字典,再按排序后的 JSON 比较类型和值;共享对象可直接确认相同,False 与 0 则不能混同。它复制建议对象,不改原输入,只把已证明重复的内层内容改为 $.blocked_priority_fallback。普通 CLI 投影在显式 agent-todos 详情分支之外调用它;所有原有诊断正文、原始捕获和结算模板继续归原 owner。

输入仍来自当前完整决策,原始捕获先于展示投影;执行、重试和结算继续走既有 owner。这里没有新的用户配置、人工确认或取证轮次,既有上下文与授权可以直接使用。新增表示与失败分支的价值来自真实调用链和反例,不能只用字段或签名一致性证明。

具体改动

评审依据是在读取差异之前确认的既有协议,版本 d4bb60c98c01ab840c5f971e3ca06e778b94a129,并核对同版本 M7.4/R5 RFC。complete-facts、projection-only、history-no-effects 已实现;convergence-open 保留延期。协议明确披露普通 JSON 的布局变化;不能把原始捕获与渲染后的 raw hash 混称相同,比较的是完整行动维度。

验收项 此头结论 义务
complete-facts implemented Agent-consumed diagnostics retain full obligations, causes, recovery and continuation/stop semantics.
projection-only implemented Derivable repeated presentation may reference the existing same-packet owner without another decision or authority store.
history-no-effects implemented Raw captures and explicit detail remain complete; no additional admission, receipt or spend on read/replay.
convergence-open deferred Qualify full/thin/Turn convergence, model adoption, latency/token/complete-cost and installed journeys.

关键代码讲解

  • reference_duplicate_fallback_guidance:Require actual root/mirror dictionaries and exact JSON type/value equality, then copy only the recommendation and replace its identical mirror. Aliased/equal mirrors reference same-packet root; unequal, False/0 and root-less cases remain inline; input is not mutated.
  • compact_quota_should_run_cli_payload:Invoke reference only after existing default compact projections and outside the explicit agent-todos detail route. Ordinary JSON layout changes intentionally; detailed compatibility and original decision capture are preserved.
  • test_real_cli_fallback_reference_keeps_capture_and_turn_effects:Exercise actual quota CLI with isolated File/SQLite authority and an independent blocked task. Verifies full captured source, same-packet reference, matching action/settlement facts and original receipt/spend replay semantics.

全部 7 个文件的差异已读,包括匹配的中英文 RFC、协议说明和实际 CLI 回归;这些测试保护具体的源事实、拒绝及重放边界,不冻结某次运行日志或临时私有样本。

对主干的风险

这是普通 JSON 的可见默认布局变化,严格依赖旧内层字段的仓外读取器需要采用顶层或既有详情方式。仓内 Markdown、Lark、attention 与 interaction-contract 消费者均读取保留的顶层对象,未发现活跃的内层依赖。JSON 序列化比较有 CPU 成本;本轮不把节省字节扩张为延迟或整体效率结论。 Immutable base real File/SQLite CLI each lacks blocked_priority_fallback_ref; fixed head passes the same fixture. Different values, boolean/number differences and missing root retain the full nested object.

独立执行结果:350 passed in 964.90s (0:16:04); changed-Python Ruff passed. 标准 loopx canary premerge --from-git-diff --git-diff-base origin/main 通过,17 个选定检查无失败、无 manual hold;中英文 RFC、源码编译、模块边界、公开/私有扫描以及 DCO 通过。没有查询或等待 CI,遵循当前 wait_for_ci=false。旧版本对照使用未修改的实际生产源码和同一回归用例,失败点是目标行为;评审脚本的路径/选择器错误单独保留,不算产品失败。

语义与 CI 对齐

复用现有 packet owner 和 JSON 引用约定,未引入新决策状态、权限或第二个策略 owner。协议与中英文 RFC 一起纠正旧的全量输出不变表述;普通投影改变,原始捕获和显式详情保持完整。回归预算没有上调。 测试使用隔离的 File/SQLite 后端及当前 CLI;不触碰活跃 Goal。回归预算、冻结标准和历史失败没有被改写。未运行的父级验收保持未验证,不通过增加批准或等待要求来遮盖这个边界。

我的整体评价

APPROVE 当前完整头 4e8e9c27b347210b90ac7f3982647df10157e1ab,未发现可验证的阻塞问题。长程持续执行的判断是 preserved:原身份、准入、后续恢复、记录和配额语义保持;用户使用路径判断是 improved:原任务中可直接消费的事实更完整或去除了确实重复的表示,不增加准备或确认负担。完整任务提示的收敛、真实模型采用、完整成本和安装后 App/Lark 验收仍归现有 M7.4/R5;本 PR 只收敛这一处确实可推导的重复表示。

这是有用且可逆的 justified_increment;已在既有 owner 内完成局部简化,架构与实际问题相称。评审批准不替代 GitHub 正式批准、独立维护者合并授权或合并就绪检查,也不宣称真实模型已采用这些事实。Ordinary JSON consumers outside the repository that require the old nested layout must use the preserved root/detail path; no universal mixed-client guarantee. Actual model adoption, latency/net efficiency and installed App/Lark acceptance remain unqualified.

English verdict: APPROVE this exact head for the verified projection/Host transport boundary. Real local caller and isolated-backend regressions pass; immutable-base counterexamples identify the intended change. Original capture, authority and settlement remain owned by the existing control plane. Full model, complete-cost and installed App/Lark acceptance remain open.

@mergify

mergify Bot commented Oct 20, 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 Oct 20, 2026

@songoow songoow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewer: model_agent; OpenAI GPT-6 Astra; provider OpenAI; self_reported.

动机

这项改动面向读取普通 quota should-run JSON 的执行端和诊断调用方。当高优先级事项暂时受阻、当前回合选择可执行的后备事项时,同一份受阻原因和恢复信息会同时出现在根字段及 heartbeat_recommendation 内。内容较长时,调用方会收到两份完全相同的解释。当前改动把确实相同的嵌套副本换成本包根字段引用,完整信息仍在同一次响应内,不需要为了补读再执行一次 guard。

可由源码直接确认的收益是消除这一处重复表示,同时保留不同的诊断、通知和执行义务。它不证明模型质量、总体延迟或完整成本已经改善,也不完成整个 heartbeat/Turn 投影统一。本 PR 只修改普通 CLI 的展示切片及协议说明;真实调用方的一族完整迁移、安装态采用和端到端成本/任务效果仍是后续边界。

改动思路

我追踪的实际路径是:原有 quota owner 生成完整决策,_emit_quota_result 先保存原始 capture,再由 _project_quota_cli_payload 选择普通 CLI 或显式 Turn Envelope,最后才进行展示压缩。新增函数只在普通 should-run、未请求 agent-todos 详细视图的分支中被调用。它没有进入准入、Todo 选择、receipt、spend 或结算状态转换,也没有增加磁盘读取或第二次 guard。

这里复用已有 packet owner 处理旧字段,再让既有 CLI projection 委托调用,避免增加一个需要独立迁移的旧协议消费者。该函数的职责是比较和表示,不重新推导“受阻”“可执行”或“需要通知”的业务事实。当前 PR 的边界是消除一个完全相同的诊断副本;保留根事实、差异副本、原始 capture 和既有详细视图,不退役仍有调用方的其他投影。

正向路径中,共用同一对象或者 JSON 值完全相同的两个字典会生成 blocked_priority_fallback_ref="$.blocked_priority_fallback"。反向路径中,只要根字段缺失、字段不是字典、原因有差异,或者值存在 False 与 0 这样的 JSON 类型差异,原嵌套诊断就保留。这个拒绝合并的分支很关键:不能用“看起来相似”来丢弃另一份可能影响执行的信息。

具体改动

本次源码检查覆盖全部七个变化路径(+168/-4):两个生产 Python 文件、两个测试文件,以及协议和英中 RFC 文档。还追踪了实际 CLI 调用点、capture 顺序、fallback 的生产函数、通知/执行消费者和结算重放路径。已阅读本 head 的作者自审说明;下述结论来自独立的源码检查,没有把作者报告的测试次数当成本次执行记录。

关键代码讲解

  1. reference_duplicate_fallback_guidance:先检查根字段、recommendation 和镜像的类型,再比较 JSON 序列化结果。sort_keys=True 消除对象键顺序的干扰,同时保留数组顺序、字段值和 JSON 类型差异,因此不会把 Python 中相等的 False/0 当作可删除副本。匹配后只复制外层 payload 和 recommendation,删除嵌套镜像并写入同包引用;没有修改传入决策或根字段的内容。共用对象的快路径也只是免去重复比较,不会原地修改该对象。

  2. compact_quota_should_run_cli_payload:新增调用位于既有 if not include_todo_summary_detail 内,其他已有压缩和交互契约提升顺序继续保留。--include-detail agent-todos 会跳过本次新增转换;这表示该详细路径保留 fallback 的旧形状,并不意味着这个选项会禁止所有既有字段压缩。

  3. _project_quota_cli_payload / _emit_quota_result:普通 should-run 的确进入上述函数,而显式 Turn Envelope 直接走自己的 projector。capture_decision 在 CLI 投影之前执行,所以新增展示函数不会重写已保存的原始观察。显示内容的原始 hash 可以与完整决策不同;动作维度等价不能成为替换原 capture hash 的理由。新协议文字明确保留了这一区别。

消费者方面,根字段仍由既有 _blocked_priority_fallback / packet 流程生成;当前 head 的 manager context、Lark notice/runtime、Markdown renderer 以及 interaction contract 的相关读取均使用根 blocked_priority_fallback。例如 Markdown 和 interaction contract 都不依赖被删除的镜像。已结算回合原有的 settled_replay_fields 会生成不授予后续工作权限的 recommendation,新增函数没有改变这份状态或创建一个新的回合。

规格对照使用改动前的 docs/reference/protocols/turn-envelope-v0.md 及 effect-interpreter convergence RFC,版本均为 d4bb60c98c01ab840c5f971e3ca06e778b94a129。以下编号仅用于本次 review 对照:

对照项 当前 head 的处理与证据边界
F-1:保留完整执行事实和原始观察 根诊断未删减,capture 先于展示,通知和执行义务未改写;源码满足这一局部边界,新增测试进一步规定其断言。
F-2:复用既有 owner 和兼容路径 旧字段访问留在 packet owner,CLI 委托调用,详细视图保留原镜像;源码已实现。
F-3:默认/表示变化应明确披露 这是普通 JSON 默认形状的有意变化,协议和英中 RFC 明确记录根字段引用、不同镜像保留和详细视图;不再笼统声称所有默认输出逐字不变。
F-4:完整调用方迁移、成本和效果验收 本 PR 没有宣称完成;仍由既有收敛工作继续承担,当前 source review 不关闭这些父目标。

对主干的风险

最直接的兼容风险在依赖 heartbeat_recommendation.blocked_priority_fallback 固定嵌套路径的外部 JSON 解析器。对当前仓库生产消费者的搜索未找到这类依赖;上述内部读取使用完整根字段。协议已经明确披露形状变化,并提供既有详细视图作为兼容途径,但这次没有调查所有外部或已安装调用方,因此不能宣称全生态无影响。

另一个风险是误把不同信息合并,或者通过引用让读者缺少通知/恢复条件。当前条件按完整 JSON 值比较,不按文本长度、布尔真值或部分字段匹配;根内容直接保留,notify、agent_must_attempt 和其他 recommendation 字段继续存在。它不新增 ready/blocked 的状态分类器,不按自然语言判断业务状态,也不将诊断引用变成权限或执行指令。默认普通 CLI 确实会采用新表示;本次不是一个声称默认关闭的功能。

我阅读了新增五种投影案例:共享对象、同值副本、不同原因、Boolean/number 差异和缺失根字段。断言同时覆盖完整长原因、通知/执行字段、输入不变及详细视图。另两个新增 File/SQLite 场景通过真实 CLI 保存/replay,检查原始 capture、receipt、settlement plan、动作签名维度、重放数量和无 spend;这些测试的边界设计与本次改动相符。

本次独立审查没有执行上述测试,也没有重跑作者声明的 350 项 source/package 验证。 因此本意见以完整源码检查和测试设计检查为依据,不作“已验证实际 backend/安装包/端到端相等”的执行声明。字节减少能解释局部冗余被删除,不能单独证明延迟改善;对于不同但等值的对象,比较还会增加两次 JSON 序列化工作,这项成本没有在本 review 中测量。

语义与 CI 对齐

本次沿用既有 packet、capture 和动作契约词汇,只增加表示层的同包引用字段。该字段指向当前响应的完整根事实,既不是新的外部存储引用,也不要求补读命令或 fresh admission。代码条件、测试断言与英中说明一致。按本次 review 委托,CI 不作为发表评论的前置,也不以未跑广测或 CI 状态制造代码 blocker;本次没有评价合并资格。

我的整体评价

当前 head 的源码和已知生产调用链中,未发现需要请求修改的新增代码问题。删除重复数据的条件保守,完整根事实保留,原始 capture 的持久化边界清楚,已有详细视图的兼容分支也不引入新的配置或状态所有者。生产机制的规模与这一处冗余相称,没有为了缩短输出而退役未经迁移的执行路径。

用户体验方面,源码能支持“相同解释只保留一份、同次响应内可直接定位”的局部改善;实际模型使用和外部解析器适配尚未独立验证。长程执行方面,这次没有改变准入、通知义务和结算 owner,源码检查支持职责保留,真实恢复/重放验证仍应以实际执行结果为准。我以 COMMENT 发表本次源码 review,明确记录无阻塞代码发现以及执行验证的边界,不把作者自审或未执行测试提升为自己的完整验证结论。意见绑定 6909@4e8e9c27b347210b90ac7f3982647df10157e1ab;后续若更改严格相同比较、根字段保留、capture 顺序或详细视图开关,应重新审查这些边界。

English verdict: COMMENT — source review completed for #6909 at 4e8e9c2, with no blocking code findings identified. All seven changed paths and the relevant production callers were inspected. This review did not independently execute the added tests or reproduce the author's source/package qualification. CI is excluded as a prerequisite by the review request. External/installed parser compatibility, backend execution parity and complete-cost/model benefits remain outside this review's verified scope.

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 Oct 20, 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; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval): APPROVE 6909@70c3145372ef1ab36c995337dfc74ab26da96734.

动机

读取普通 CLI 决策并继续当前工作的 Agent,会遇到同一份阻塞原因在一条响应中重复出现。例如高优先级任务等待依赖、另一项工作可以执行时,旧输出重复整份原因和恢复条件;新输出只把完全相同的内层副本改为本包根字段引用。完整事实仍在同一响应内,差异副本继续保留,读取引用不需要补跑 guard。

本批不缩短执行义务,不改变通知、权限或结算,也不宣称模型质量、总体延迟和安装态采用已改善。完整调用方迁移、full/thin/Turn 对照、真实模型结果、完整成本和安装后的 App/Lark 验收仍归现有收敛工作。

改动思路

比较与表示归既有 packet owner,CLI 只投影已计算的决定;不增加策略、配置、持久化状态或第二次准入。本 PR 只移除已验证相同的普通 CLI 诊断副本,保留完整根事实、原始捕获、差异副本与既有详细视图。

重复诊断的引用放在既有 packet owner 中,仅作用于已计算决策的 CLI 展示;任务、调度、通知和结算仍由原控制面决定。 当前 PR 只去掉普通 CLI 中一份已验证相同的副本,保留完整原始捕获、显式详情和差异副本;不增加读取、准入或持久化状态。 reference_duplicate_fallback_guidance 先要求顶层和内层都存在字典,再按排序后的 JSON 比较类型和值;共享对象可直接确认相同,False 与 0 则不能混同。它复制建议对象,不改原输入,只把已证明重复的内层内容改为 $.blocked_priority_fallback。普通 CLI 投影在显式 agent-todos 详情分支之外调用它;所有原有诊断正文、原始捕获和结算模板继续归原 owner。

输入仍来自当前完整决策,原始捕获先于展示投影;执行、重试和结算继续走既有 owner。这里没有新的用户配置、人工确认或取证轮次,既有上下文与授权可以直接使用。新增表示与失败分支的价值来自真实调用链和反例,不能只用字段或签名一致性证明。

具体改动

评审对照的是变更前已接受的既有协议,版本 f72b67113ff42ccf385519222a530a11ce22659c,并核对同版本 docs/architecture/rfcs/agent-loop-effect-interpreter-v0.md(M7.4/R5)。complete-facts、projection-only 在本渲染切片已实现;convergence-open 保留延期。协议明确披露普通 JSON 的布局变化;不能把原始捕获与渲染后的 raw hash 混称相同,比较的是完整行动维度。

验收项 此头结论 边界
complete-facts implemented 完整根事实、通知与执行义务保留;真实 File/SQLite CLI 及结算回归
projection-only implemented 展示复用既有 owner;原始捕获、详细视图及无新准入/扣费重放保留
convergence-open deferred 既有收敛表继续承担真实调用方迁移、模型、完整成本和安装态验收

关键代码讲解

  • reference_duplicate_fallback_guidance:Require actual root/mirror dictionaries and exact JSON type/value equality, then copy only the recommendation and replace its identical mirror. Aliased/equal mirrors reference same-packet root; unequal, False/0 and root-less cases remain inline; input is not mutated.
  • compact_quota_should_run_cli_payload:Invoke reference only after existing default compact projections and outside the explicit agent-todos detail route. Ordinary JSON layout changes intentionally; detailed compatibility and original decision capture are preserved.
  • test_real_cli_fallback_reference_keeps_capture_and_turn_effects:Exercise actual quota CLI with isolated File/SQLite authority and an independent blocked task. Verifies full captured source, same-packet reference, matching action/settlement facts and original receipt/spend replay semantics.

全部 7 个文件的差异已读,包括匹配的中英文 RFC、协议说明和实际 CLI 回归;这些测试保护具体的源事实、拒绝及重放边界,不冻结某次运行日志或临时私有样本。

对主干的风险

本轮签名整合当前主干,唯一冲突在 capture 测试。完整保留主干已有测试及原 PR 回归,全部七文件差异仍为 +168/-4;未删除原因或权限断言。旧 CI merge/base/source 的四个失败已实际对照,当前主干已有选择、配置与原生历史注入的 owner 修复,整合后对应完整模块通过。取消项仍保留取消,不把旧 source/wheel 验收冒充本头的新 wheel 运行。

这是普通 JSON 的可见默认布局变化,严格依赖旧内层字段的仓外读取器需要采用顶层或既有详情方式。仓内 Markdown、Lark、attention 与 interaction-contract 消费者均读取保留的顶层对象,未发现活跃的内层依赖。JSON 序列化比较有 CPU 成本;本轮不把节省字节扩张为延迟或整体效率结论。 不可变目标主干 f72b671 上,相同完整 CLI 回归在 File/SQLite 均因缺少新引用而失败,当前头两项全过;相同五值 oracle 在主干为两个预期失败/三个保留案例通过,当前头五项全过。 Different values, boolean/number differences and missing root retain the full nested object.

本整合头执行结果:277 passed in 267.68s;Ruff 检查声明的 Python roots 通过,配置内 mypy 的17个源文件通过。 标准 loopx canary premerge --from-git-diff --git-diff-base f72b67113ff42ccf385519222a530a11ce22659c 通过,6 个直接及17 个选定检查无失败、警告或 manual validation hold;中英文 RFC、源码编译、模块边界、公开/私有扫描检查通过;分支作者提交的 DCO 已核对。质量凭证 cqr_2e3eb27944c542e1ede0 绑定当前精确范围并验证有效。没有查询或等待 CI,遵循当前 wait_for_ci=false。旧版本对照使用未修改的实际生产源码和同一回归用例,失败点是目标行为;实际原始捕获与新展示的 source hash 没有混为相同。

语义与 CI 对齐

复用现有 packet owner 和 JSON 引用约定,未引入新决策状态、权限或第二个策略 owner。协议与中英文 RFC 一起纠正旧的全量输出不变表述;普通投影改变,原始捕获和显式详情保持完整。回归预算没有上调。 测试使用隔离的 File/SQLite 后端及当前 CLI;不触碰活跃 Goal。回归预算、冻结标准和历史失败没有被改写。未运行的父级验收保持未验证,不通过增加批准或等待要求来遮盖这个边界。

我的整体评价

比较与表示归既有 packet owner,CLI 只投影已计算的决定;不增加策略、配置、持久化状态或第二次准入。本 PR 只移除已验证相同的普通 CLI 诊断副本,保留完整根事实、原始捕获、差异副本与既有详细视图。

APPROVE 当前完整头 70c3145372ef1ab36c995337dfc74ab26da96734,未发现可验证的阻塞问题。长程持续执行的判断是 preserved:原身份、准入、后续恢复、记录和配额语义保持;用户使用路径判断是 improved:原任务中可直接消费的事实更完整或去除了确实重复的表示,不增加准备或确认负担。完整任务提示的收敛、真实模型采用、完整成本和安装后 App/Lark 验收仍归现有 M7.4/R5;本 PR 只收敛这一处确实可推导的重复表示。

这是有用且可逆的 justified_increment;已在既有 owner 内完成局部简化,架构与实际问题相称。评审批准不替代 GitHub 正式批准、所需的维护者合并授权或合并就绪检查,也不宣称真实模型已采用这些事实。Ordinary JSON consumers outside the repository that require the old nested layout must use the preserved root/detail path; no universal mixed-client guarantee. Actual model adoption, latency/net efficiency and installed App/Lark acceptance remain unqualified.

English verdict: APPROVE 70c3145 for the verified projection/Host transport boundary. Real local caller and isolated-backend regressions pass; immutable-base counterexamples identify the intended change. Original capture, authority and settlement remain owned by the existing control plane. Full model, complete-cost and installed App/Lark acceptance remain open.

@huangruiteng
huangruiteng merged commit df585d3 into main Oct 20, 2026
32 of 61 checks passed
@huangruiteng
huangruiteng deleted the codex/quota-turn-convergence-20261020 branch October 20, 2026 14:11
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.

3 participants