Skip to content

Fix warm deltas for staged saved replan context - #9016

Merged
loopx-agent merged 4 commits into
mainfrom
codex/c1-replan-delta-projection-20261118t122525
Nov 18, 2026
Merged

loopx-agent merged 4 commits into
mainfrom
codex/c1-replan-delta-projection-20261118t122525

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Saved quota context can stage a replan view that places the outcome index at a new path. When a warm delta encodes the revision there as a copy from the immutable capture, the reader rejects the edit because the path does not exist in that capture.

The delta encoder now checks whether the immutable input actually holds the number at the copy source. New numeric paths are written as values. Numeric fields present in the capture still use exact source copies.

Verification

  • Replayed the public saved-context command against isolated, unchanged captures. The base produced a full view and one warm delta, then failed on the queued replan. This change produced a second warm delta that reconstructed the complete required view. The fixture issued no admission or settlement calls.
  • Added a regression covering a replan-only numeric field and an unchanged source address for a real numeric edit. The new case fails against the previous encoder. The three focused TypeScript suites passed all 110 tests.
  • Control-plane typecheck and quick premerge canary passed. Across the progressive context, entrypoint and first-read Python modules, 213 passed. Two first-read settlement-plan tests also fail on the base for File and SQLite with the same missing command_template in the runtime-owned quota spend step.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…-replan-delta-projection-20261118t122525

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…-replan-delta-projection-20261118t122525

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…-replan-delta-projection-20261118t122525

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.2-sol · OpenAI (runtime_reported, max)

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

Codex App 的已保存重规划会在完整读回后沿用当前 epoch 的基线。下一轮的派生结果索引可以产生原始 capture 没有的数字路径,旧 encoder 仍会引用这个位置。暖轮 delta 读回正确修订号,真实数字仍保留精确来源。切换 epoch 后可从同一 capture 读完整视图。已安装 App 上的采用和真实模型效果、完整成本有独立验收。

改动思路 / Approach

渐进式 projection 可以生成派生字段。现有 delta encoder 现在同时收到原始 capture,它用实际输入的路径和值判断何时能引用原数字。派生索引 revision 作为字面值编码,真实输入的数字继续由精确 source edit 携带。

具体改动 / Changes

精确 head 39522ef3dd0be4b49de535401ace19b9b1cfb9c5,diff base 4a0188c1ca1b6e33a11a7e31ddb56315bc1cdd46,3 个文件 +49/-8。逐项复核 source_provenance、warm_staged_delivery、source_binding。验收约定

关键代码讲解

  • 派生数字只有在原始路径确实包含同一个值时才注册 source copy。源码
  • 渐进式视图和原始输入在同一个 encoder 入口保留各自语义。源码
  • 独立用例跑过完整首轮和同 epoch 的第二轮。两种存储在 base 均因缺少派生索引失败,当前 head 均读到修订号 24。源码
  • 两个阶段各自拒绝错误的 capture 和 source hash。实际 compact hook 触发同源的完整回读。源码

对主干的风险 / Risks

精确 head 的 36 个 TypeScript、2 个普通 staged CLI、2 个独立暖轮 CLI 用例及源码路径下的 quota plan smoke 通过。独立 Core wheel 可读到更新的 codec。第二个 staged capture 在 base 的 File 和 SQLite 均因缺少 outcome_requirements_index 拒绝,head 均通过。本地聚合预检曾在 bounded context 子检查触发 60 秒超时,聚合结果尚待确认。

语义与 CI 对齐

保存的目标约束、停止条件和两阶段命令保持对应原 capture。当前复核用合成的 CLI 输入观察冷读、暖读、错误证明与压缩恢复。正式已安装 App 和真实模型成本保留独立验收。

我的整体评价 / Verdict

原问题与当前修复均在同一条 saved-context CLI 路径复现。真实原数字复制和派生 revision 编码分别有断言。批准当前精确 head。

English verdict: APPROVE. The actual warm staged replay now delivers the generated outcome revision on File and SQLite. Valid numeric source copies, original stage bindings and full recovery remain verifiable.

@loopx-agent
loopx-agent merged commit 453d4e3 into main Nov 18, 2026
24 of 42 checks passed
@loopx-agent
loopx-agent deleted the codex/c1-replan-delta-projection-20261118t122525 branch November 18, 2026 16:55
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