Skip to content

Commit d5bd985

Browse files
committed
docs(runtime): ground context-cost qualification in current CLI evidence
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
1 parent fc411c8 commit d5bd985

2 files changed

Lines changed: 71 additions & 8 deletions

File tree

‎docs/architecture/rfcs/agent-loop-effect-interpreter-v0.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,41 @@ Remaining implementation Todos, in dependency order:
517517
| Adopt one typed projection in real host renderers | Heartbeat full/thin and Turn host consume the same execution facts and per-Turn capture/detail route. Keep host-specific notification and scheduler transport explicit. Real File/SQLite CLI plus packaged Codex App tests cover reentry, source loss, refusal before required reads, late results, backoff and exactly-once settlement; no second admission from a detail read. Retire the replaced projection only after its last caller moves. |
518518
| Qualify the context shape and migration default | Compare the same normal, replan, wait/recovery and optional-capability workloads against both current full and compact paths. Measure payload/model tokens, detail IO, latency, resource growth, omissions and decision/outcome quality. Keep data loss, duplicate effects, identity and settlement errors as hard constraints. Preserve supported saved prompts/receipts and reversible rollout; change budgets or defaults only with that evidence. |
519519

520+
The next cost slice has a reproduced regression-budget gap, rather than a
521+
missing fixture alias or permission to remove required context. Comparing
522+
`aa87cc019` with `fc411c878` on the unchanged public CLI fixture, identical
523+
temporary aliases and command arguments produced these JSON stdout costs:
524+
525+
| Public fixture / surface | Base characters | Candidate characters | Base compact JSON | Candidate compact JSON |
526+
|---|---:|---:|---:|---:|
527+
| 36 Todos / 1 Agent / 12 runs, `turn plan` | 16,115 | 17,403 | 12,112 | 13,145 |
528+
| 1 Todo / 1 Agent / 1 run, enabled multi-subagent `quota should-run --turn-envelope` | 10,990 | 11,661 | 8,892 | 9,464 |
529+
| 36 Todos / 1 Agent / 12 runs, `heartbeat-prompt --thin` | 3,122 | 3,122 | 3,069 | 3,069 |
530+
531+
The crowded Turn increase includes 484 compact characters in the envelope and
532+
510 in the newly returned hook-dispatch diagnostic. The envelope now states
533+
which hooks observed empty context, discards cached content for them, and
534+
distinguishes fulfilled pre-work reads from later action-specific freshness.
535+
Those instructions and signed observations carry useful decision semantics.
536+
The hook diagnostic has a separate effect-disclosure role; audit its actual
537+
consumers before moving or removing it. Pretty-print overhead is measured
538+
separately and is not a token, latency or model-quality result.
539+
540+
The original runner tests still fail: crowded `turn plan` exceeds its 16,000
541+
character ceiling, and the enabled multi-subagent runner exceeds its 9,000
542+
character envelope ceiling. Its nested fixture paths emit 11,291 characters
543+
on the base and 11,961 on the candidate; that is a different path workload
544+
from the table. The historical base was already red. These are regression
545+
budgets, not execution quota or frozen promotion limits. The next bounded
546+
implementation must characterize diagnostic consumers, compare lossless
547+
compaction with justified headroom, and update the existing budget owner and
548+
its runner tests together. Preserve the fixture populations, full routes,
549+
required-source content, hook coordinates, freshness clauses and real stdout
550+
growth rejection. Follow the
551+
[budget decision guide](../../development/testing-and-quality.md#budget-failure-decisions).
552+
Until that slice passes the original workload, this measurement is not a
553+
budget pass, a transport-default decision or installed host qualification.
554+
520555
Do not add a generic executor or lower an acceptance threshold to make a short
521556
packet pass. Preserve unsatisfied requirements and distinguish transport parity,
522557
installed host adoption and useful model outcomes. See the

‎docs/architecture/rfcs/agent-loop-effect-interpreter-v0.zh-CN.md‎

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ envelope 投影,Codex CLI 保持关闭隔离;这不代表安装态 heartbeat
325325
| 执行事实 | 既有 owner/投影 | 保留的边界 |
326326
|---|---|---|
327327
| Goal/Agent/Todo 身份 | quota 选择及回执;envelope actor、selected Todo 和签名结算身份 | 捕获身份与写入时校验仍必要;展示身份不授予执行权 |
328-
| 完整要求 | Agent channel 权威必读;quota 与短包原样保留命令、顺序及 hook/capability 身份 | 共同提议完整 Goal/验收/所选工作读取与一份精确 Todo 正文;摘要或源 hash 不证明采用 |
328+
| 完整要求 | Agent channel 权威 work context 与剩余必读;有效 Todo、验收及 scoped User 义务,完整 Goal 保留渐进式全文读取 | 注册 reader 在两种传输中满足当前任务读取;来源失败会阻止依赖它的交付,真实模型采用和打包宿主旅程仍待验收 |
329329
| 能力拒绝 | 既有 capability_gate_v0;短包保留原样 required/missing 与源中历史字段 | 修复事实遗漏,不改变就绪策略或能力开启 |
330330
| 选择/claim/lease | selected Todo、action portfolio 及当前所属事务 | 短包归属不是新鲜 lease;保留捕获源并在所属写入入口复核 |
331331
| replan/Goal 收尾 | replan action packet、contract capsule 和 vision audit | 完整证据仍走有权限的详情;Todo 完成不证明 Goal 完成 |
@@ -338,13 +338,15 @@ envelope 投影,Codex CLI 保持关闭隔离;这不代表安装态 heartbeat
338338
结算另有覆盖,仍不证明安装态 App 收敛或模型成本。以下三项继续按各自验收保持
339339
未完成;这份核对不授权批量删除剩余 Python IO adapter。
340340

341-
统一工作上下文提案在最终准入后生成完整 Goal、已启用的 canonical 验收和有效
342-
所选工作读取,再贯穿签名 envelope 与宿主 prompt adapter 保留命令、顺序和
343-
hook 身份。必读项只在 Agent channel 携带,明确空列表抑制旧读取回退。精确 Todo
344-
只返回一份完整源记录,概览仍有界。真实 legacy/File/SQLite CLI 覆盖源丢失、
345-
长要求尾部、引用路径、准入拒绝和签名坐标变更。见[工作上下文契约](../../reference/required-work-context.md)。
346-
模型采用、安装态 App/Lark 和整体上下文效率仍单独验收;本阶段不改变 transport
347-
默认值,也不删除尚有实际调用方的 Python adapter。
341+
统一工作上下文现在由既有 TS interaction owner 选择并满足必读,注册的 Python
342+
adapter 核验来源,在普通 heartbeat/quota 与签名 envelope 中返回完整当前任务来源,
343+
无需启用 TurnEnvelope。混合 Goal 文件仍必须经渐进式路径全文读取,不能按历史标题
344+
裁剪后冒充原始目标。未支持的来源保留必读命令,来源失败或变化会阻止依赖它的交付。
345+
一份 Agent carrier 保留明确空列表、完整要求尾部及 hook 身份;精确 Todo 返回一份
346+
完整源记录,概览仍有界。真实 legacy/File/SQLite CLI 覆盖源丢失、长要求尾部、
347+
scoped gate、恢复和签名内容篡改。见[工作上下文契约](../../reference/required-work-context.md)。
348+
这是普通上下文交付默认值的变化,不是 transport 默认值的变化;模型结果、安装态
349+
App/Lark 旅程及整体效率仍单独验收,保留尚有真实调用方的 Python IO adapter。
348350

349351
no-write model-behavior 安全适配器现在识别原生 scheduler 在 ACK/failure
350352
命令前绑定的 `--registry`/`--runtime-root` 路由前缀。验证走真实 binder 和
@@ -362,6 +364,32 @@ live 模型结果、App 采用或以下三项收敛验收完成。
362364
| 在真实宿主 renderer 采用同一 typed 投影 | heartbeat full/thin 与 Turn host 消费同一执行事实及同 Turn 捕获/详情入口;显式保留通知和 scheduler 的宿主传输。真实 File/SQLite CLI 与打包 Codex App 覆盖重入、来源丢失、必读前拒绝、迟到结果、backoff 和一次结算;补读不触发第二次准入。最后调用方迁移后才退役旧投影。 |
363365
| 核验上下文形态及迁移默认 | 将相同的正常、replan、等待/恢复与可选能力负载同时对照当前完整和短包路径,测量载荷/model token、详情 IO、延迟、资源增长、遗漏、决策与结果质量。数据丢失、重复效果、身份和结算错误保持硬约束;保留受支持的已保存 prompt/回执与可逆 rollout,根据证据再改预算或默认。 |
364366

367+
下一成本切片已有可复现的回归预算缺口,不能归因于 fixture alias,也不授权删掉
368+
必需上下文。`aa87cc019` 与 `fc411c878` 使用相同公共 CLI fixture、临时 alias
369+
和命令参数,实际 JSON stdout 测量如下:
370+
371+
| 公共负载/入口 | base 字符 | candidate 字符 | base 紧凑 JSON | candidate 紧凑 JSON |
372+
|---|---:|---:|---:|---:|
373+
| 36 Todo/1 Agent/12 run,`turn plan` | 16,115 | 17,403 | 12,112 | 13,145 |
374+
| 1 Todo/1 Agent/1 run,开启 multi-subagent 的 `quota should-run --turn-envelope` | 10,990 | 11,661 | 8,892 | 9,464 |
375+
| 36 Todo/1 Agent/12 run,`heartbeat-prompt --thin` | 3,122 | 3,122 | 3,069 | 3,069 |
376+
377+
crowded Turn 的增长包括 envelope 内 484 个紧凑字符,以及新增 hook-dispatch
378+
诊断的 510 个紧凑字符。envelope 现在说明哪些 hook 观察到空上下文、清除其缓存,
379+
并区分已满足的 pre-work 读取和后续 action 的新鲜来源要求;这些指令和签名观测
380+
有实际决策价值。hook 诊断另有副作用披露职责,移动或删除前须核验真实消费者。
381+
pretty-print 开销单独计量,不等于 token、延迟或模型质量结果。
382+
383+
原 runner 测试仍失败:crowded `turn plan` 超过 16,000 字符上限,开启
384+
multi-subagent 的 runner 超过 9,000 字符 envelope 上限。后者因嵌套 fixture
385+
路径在 base/candidate 分别输出 11,291/11,961 字符,与表中的路径负载不同。
386+
历史 base 已失败;这些是回归预算,不是执行 quota 或冻结的 promotion 门限。
387+
下一有界实现须先刻画诊断消费者,再比较无损压缩与有证据的余量,联合修改既有
388+
预算 owner 和 runner 测试。保留 fixture 规模、完整路由、来源全文、hook 坐标、
389+
新鲜性指令和真实 stdout 膨胀拒绝,遵循
390+
[预算决策指南](../../development/testing-and-quality.md#budget-failure-decisions)。
391+
原负载通过前,这次测量不算预算通过、transport 默认决策或安装态宿主资格。
392+
365393
不引入通用 executor,也不降低验收门槛来让短包通过。保留未满足要求,分别记录
366394
传输等价、安装态宿主采用和有效模型结果。见
367395
[当前 envelope 契约](../../reference/protocols/turn-envelope-v0.md#optional-memory-participation)。

0 commit comments

Comments
 (0)