Skip to content

fix: retain autonomous replan decisions in stride followthrough - #6532

Merged
huangruiteng merged 2 commits into
mainfrom
codex/replan-autonomous-followthrough
Oct 15, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/replan-autonomous-followthrough

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Autonomous replans persist a scoped settlement identity, but stride followthrough only recognized legacy Todo identities and its codec discarded the autonomous binding fields. A later enabled review could therefore omit the accepted prior decision and skip its existing previous_review requirement.

Transport the binding facts and qualify them against the existing TypeScript settlement owner, including Goal/Agent/Turn, obligation, effect and accepted acknowledgement. The derived reference binds the autonomous obligation without inventing a Todo. Legacy decision references and feature-off context retain their existing behavior. This is an internal repair to the existing replan/history journey; no new strategy, setting, execution authority or UI operation is added.

Validation:

  • Real CLI journeys on File and SQLite: settle an autonomous decision, complete later work, deliver and resolve the prior decision at the next review, reject missing previous review, accept a valid review, and reject duplicate append on replay.
  • Focused Python replan regressions: 67 passed; the two extended provider journeys passed separately.
  • Full TypeScript suite before rebasing onto unrelated upstream changes: 4,731 passed, 42 optional integration tests skipped. Final-head replan/stride tests: 35 passed; control-plane typecheck passed.
  • Semantic vocabulary, maintainability, autonomous-replan and refresh-writeback smokes passed; public-boundary and Ruff checks passed.

The bilingual stride RFC records the repaired boundary. The small companion refactor centralizes prior-decision binding qualification and reuses settlement identity construction instead of adding a second identity rule. Feedback delivery does not establish execution quality or goal benefit; those remain empirical acceptance work. PostgreSQL integration was not run; no authority-store behavior is changed.

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-astra | OpenAI | runtime_reported | xhigh

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

动机

未发现阻塞性问题。审查精确 head:88157e454ce6fd8c2afa94ba21e469892643d11c。

启用 stride 的长程任务,在下一次重新规划时需要知道上一决策及其执行情况。 此前自主 replan 已保存的决策被历史读取漏掉;修复后下一轮可以读取该决策,并必须核查它的采用、信息和结果。 已通过真实 CLI 验证连续两轮的决策送达、历史引用解析、漏填核查拒绝、补齐接受和重放不重复追加。 本次不增加策略版本、不改变默认开关,也不把反馈送达等同于模型采用或目标收益。 剩余工作是将修复集成到后续接续 canary,再用受控实验验证实际采用、效率和目标收益。

规范依据是改动前的 docs/architecture/rfcs/hierarchical-agent-stride-control-v0.md,版本 0e0a3e06e6b6e52702d207ac1f729b70c1840bfb,验收条目 7.6:返回上次已接受、证据绑定的路线,保留历史顺序、作用域、遗漏和未知收益,支持原 history 入口读取。本次文档补充解释自主绑定,不能反过来充当实现正确性的依据。

改动思路

两个共同故障点分别在事实传输和类型化资格判断,必须一起修复;复用现有 settlement owner 可以避免新的身份规则源。 当前 PR 完成从自主决策持久化到下一轮强制核查的读取闭环,实验效果仍由后续实验验收。

已核查零改动、仅放宽 schema、重写旧历史三种替代方案:不改会保留确定性遗漏,仅放宽 schema 无法排除冲突身份,重写历史又会破坏证据引用。当前方案在已有 owner 中修复事实传输和资格判定,既不新增策略版本,也不添加并行状态机。这里用文字描述调用路径;没有把示意图当作执行证据。

具体改动

replan_context_codec.py:replan_evidence_rows 只在启用决策传输或显式读取决策引用时携带 obligation、binding kind/id;Python 不判断决策有效性。replan_context.ts:decisionBindingMatches 保留旧 Todo 资格规则,复用 effect_program.ts:settlementIdentityPayload 校验自主 Goal、Agent、Turn、义务、effect 和已接受的回执,拒绝同时绑定 Todo 的冲突数据。recordedDecision 把义务绑定进派生引用,不虚构 Todo;validateReplanContext 检查新投影字段。

两处现有测试扩展覆盖自主记录、损坏绑定、旧记录兼容和下一轮实际写回;双语 RFC 说明反馈边界。未改动 quota、调度、策略枚举或前端配置入口。原有 strideReviewMismatch 负责强制核查;不会把进度记录自动认定为实际采用或收益。

对主干的风险

最重要的反例是“旧 Todo 测试都通过,但自主决策全部丢失”。我将同一份测试 harness 放在不可变 base 与本 head,走真实 CLI 和隔离 File/SQLite:base 两例都在下一轮缺失 decision_followthrough;本 head 两例通过。补充核查包括历史引用解析、缺少 previous_review 时不追加、补齐后接受、重复调用不追加,以及冲突身份、损坏最新路线、其他 Agent 和退休 Goal 实例的排除。

最终 head 的 replan/stride 测试 35 项及 TS typecheck 通过;相关 Python 回归 67 项通过,连续两轮 CLI 两项在最终 head 重跑通过。此前完整 TS 套件 4,731 通过、42 个可选集成用例跳过;基线更新未改变本次 owner,最终受影响路径已重跑。semantic vocabulary、maintainability、autonomous replan、refresh writeback、公开边界与 Ruff 检查通过。按 review packet 的设置未查询或等待远端 CI。未运行 PostgreSQL 集成;本 PR 不修改 authority store,不能把该跳过说成通过。

我的整体评价

这是有实际调用与负例证据的有界修复,可以批准;不是“字段存在”就算交付。较小的相关重构已经应用:把历史绑定资格集中到本地 helper,并使用现有 settlement 身份源,避免新造规则。旧引用完整兼容,策略关闭时 context 不变,启用时拒绝损坏绑定,未来新 replan 仍通过原有强制核查与恢复路径。

仍需在集成后验证真实模型是否利用回传证据改变后续研究;当前结果不能证明分数提高,也不授予合并或修改运行中实验的权限。合并前仍应遵守独立的授权和 readiness 检查。

English verdict: APPROVE - 88157e4; autonomous decision feedback now reaches the next existing review obligation through validated scoped identity. Real File/SQLite base/head CLI counterfactuals, correction/replay, compatibility and focused regressions passed. Research utility remains unproven; merge authorization is separate.

@huangruiteng
huangruiteng merged commit 871c100 into main Oct 15, 2026
15 of 27 checks passed
@huangruiteng
huangruiteng deleted the codex/replan-autonomous-followthrough branch October 15, 2026 13:51
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.

2 participants