Repository navigation
docs(rfc): design subtree context reuse with automatic full fallback - #7166
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ontext-design-20261023 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
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Exact head: b2d0cba8fb65586a383bb5d8394d0032b986394b;accepted baseline: 62851ab1543c140337d46d8cd45b4e92d9b4ac7a。
动机
反复读取普通 quota 上下文的 benchmark solver,以及产品化 Codex App heartbeat/续跑调用方与维护者。
此前即使同包内的重复已减少,后续回合仍可能重读未变的完整要求;直接省略正文又可能在压缩或重启后丢失约束。
本次明确完整首包、受连续性证据约束的子树复用和自动全量回退,并将两个真实调用方都纳入一期;当前实际输入、模型 token 和执行结果没有因此改变。
不实现增量 runtime,不修改当前默认、预算、冻结实验或授权,也不要求本人额外确认。 两个 host 的模型输入连续性接入、温态采用、实际打包/安装读回及完整成本收益仍待验证;裸 CLI 自动保持全量。
改动思路
已有 typed interaction/work-context owner 负责投影、精确比较与完整重建;host 负责模型输入顺序与连续性观察;原执行 owner 保留权限与效果。磁盘文件、session ID、旧 hash 或 stdout 前的 release ACK 都不能证明活跃上下文仍保留基线。
本 PR 交付完整双语设计与反例矩阵;基础包缩减先进入既有集成测试,增量一期须同时验证 benchmark solver 和产品化 App,各自包含真实 host adapter 与完整回退。 benchmark 可以先落地,App 未资格时一期继续开放。缺少 host 接入点时自动全量,记录工程缺口;不能增加 owner 问询、第二次准入或扣额。基本缩减仍先进入既有实验,没有被新协议阻塞。这里评审的是设计内容;其“已接受”措辞不构成合并、运行、安装或发布授权。
具体改动
spec_ref: docs/architecture/rfcs/agent-loop-effect-interpreter-v0.md;spec_revision: 62851ab1543c140337d46d8cd45b4e92d9b4ac7a。以修改前的三个收敛验收流与原四项下一切片为依据,未用新增文案自证。
关键内容讲解
three-existing-streams:implemented,原三条验收流完整保留;设计不结算 runtime 或收益。ordinary-real-caller:implemented,优先实际 solver 的普通 quota 输入,并明确产品化 App 的独立一期验收。管理包、CLI fixture 或另一个 host 的证据均不能代替它。complete-current-requirements:implemented,正文、晚到停止条款与来源完整保留;稳定 source key 分离变化控制元数据,数组整段替换、删除显式表达,重建须等于完整目标。未知或混合来源保持全量。fresh-authority-and-recovery:implemented,每次完整给出身份、动作、准入、审批/停止、claim/lease、未完成读取和结算/scheduler。guard 后若压缩,在同一顺序边界内、模型提交前再次核对并换为同 capture 全量;只在精确展示完整进入活跃输入后才推进基线。来源/权限变化仍按原规则拒绝或 fresh guard。complete-cost-and-acceptance:implemented,首次及补读模型输入、上下文/cache、完整成本、后续动作和验收结果一起资格。App 还需实际打包/安装读回、温态增量、首次/恢复/压缩/丢基线及可见失败恢复;冻结 campaign 不改。
中英文完整 diff 已逐条核对,未发现这些条款的语义分歧。实际 quota emitter、capture handoff和原生 session 解析仍只提供前置释放/身份事实;文中明确要求尚未资格的模型输入组装 adapter,没有把此 seam 当作已交付。
对主干的风险
最强反例是 guard 后压缩,而旧 epoch 被误当作仍保留。设计要求提交前同边界重检、自动同 capture 全量恢复;这只恢复展示,不能重新授予过时执行权。丢失/截断/乱序 delta 不推进基线,delta 更贵时也发送全量。全 full 的 pilot 是正确性回退,不能证明增量节省。
当前标准 premerge 的4项直接检查及11项范围检查全部通过,含双语、完整语义扫描、8项风险 smoke 和公开边界;零 manual holds。旧 8d6714e 的32/30失败及当时基线归因保留在历史,不能套成新 head 的失败或称其由本 PR 修复。未查询 CI,未运行模型、连续性原型、安装或成本实验。
我的整体评价
APPROVE 这个双语设计增量,没有发现阻断设计内容的问题。原长程验收与完整要求保留,设计体验改进限于自动恢复和明确两个真实调用方的完成条件。采用随包经验中核对首个有用结果与实际采用的建议;没有要求设计 PR 先实现全部 runtime,也没有把经验投递、文档或绿色检查当作收益证明。
检查两个既有 RFC 的内部段落;未改变渲染组件、页面布局或首屏。 视觉未验证范围:none within this documentation-only presentation boundary。两个实际 host adapter、App 打包/安装采用和完整成本收益仍开放,批准不提供额外执行或合并权限。
English verdict: APPROVE — b2d0cba8fb65586a383bb5d8394d0032b986394b. The bilingual design preserves the three original acceptance streams, complete requirements, fresh authority and automatic same-capture recovery. Phase one explicitly requires both real benchmark and productized App consumers; actual adapters, installed adoption and benefit remain unqualified. All4 direct and11 selected premerge checks pass at this head. No runtime, token or merge authority is inferred.
Repeated complete quota context can dominate solver input even after same-packet deduplication. This accepted design makes exact subtree reuse a shared quota/Turn projection concern, with automatic full recovery whenever the host cannot establish that the baseline remains in the active model context.
The English and Chinese RFCs specify:
Delivery order remains basic packet reductions → existing integration test → reviewed incremental implementation. #7165 supplies an independently reviewable basic reduction; this design does not hold that experiment waiting for a new protocol. The design review is accepted; incremental runtime implementation is still pending. Phase one must qualify both the actual benchmark solver and the productized Codex App heartbeat/continuation/recovery path using the same owner. Benchmark success alone cannot close phase one. An all-full App fallback remains safe but does not prove incremental productization.
Phase-one acceptance now explicitly includes real packaged/installed App readback, warm incremental delivery, first use, restart/resume, compaction/pruning, lost baseline and same-capture recovery. Missing host integration is an engineering gap, not a runtime owner question or additional admission gate. Design acceptance does not grant merge, install, release or new experiment authority.
Validation: the phase-one clarification at
b2d0cba8fb65586a383bb5d8394d0032b986394btargets maincde8f0354ca1738f3b6ed8a175f01283cdb3e2db; paired RFC and public-boundary checks pass. Prior design validation at8d6714e6e13d4d6401fa7b3270f06d3a012285f4(base035a077767d1e9fb9b321e35181ff9ffd81f00ef): bilingual staged and committed checks passed; whitespace, maintainability and public-boundary checks passed. Quick premerge retains the target-main semantic-vocabulary failure (goal_boundary: 32 Python modules, budget 30), reproduced on the unmodified base. No budget was relaxed; no runtime or live-model qualification is claimed.中文:首包完整,温态发送变化子树;当前控制事实每轮完整给出。基线丢失、压缩或交付不完整时,从原 capture 自动恢复全量,不新增准入、扣额或人工问询。现有 CLI 的会话 ID/传输 ACK 不足以证明模型保留,需验证真正的模型输入组装边界。设计已 review 通过,一期须同时覆盖 benchmark solver 与产品化 Codex App,验收实际温态增量和压缩/恢复后的同 capture 全量回退;运行时实现仍待交付。