Skip to content

fix(goal): bind no-follow-up ACKs to lifecycle truth - #3270

Merged
huangruiteng merged 3 commits into
mainfrom
codex/no-followup-semantic-consistency-20260817
Aug 16, 2026
Merged

fix(goal): bind no-follow-up ACKs to lifecycle truth#3270
huangruiteng merged 3 commits into
mainfrom
codex/no-followup-semantic-consistency-20260817

Conversation

@huangruiteng

Copy link
Copy Markdown
Owner

Summary

  • Reject coverage-backed no-follow-up when the same writeback keeps the vision open or the path continuing.
  • Keep Todo succession authoritative: a semantic ACK cannot retire a completed-without-successor gap; only a typed runnable successor or durable Todo no-follow-up settlement can resolve it.
  • Point repair guidance to loopx todo complete --no-follow-up and explicitly reject synthetic user gates.
  • Consolidate the typed Todo succession reason/filter so write and read paths consume the same current gap truth.

Why this is separate from #3261

#3261 makes Todo completion continuation explicit and provides the narrow same-Turn recovery seam. This PR closes the cross-contract gap where progress/vision ACK state could still claim terminality without that durable Todo settlement.

Validation

  • 199 model-behavior and focused goal-frontier tests passed.
  • 162 broader goal-frontier/quota tests passed (covered within the 199-test run plus a prior focused pass).
  • 59 direct regression tests passed after final refinement.
  • Ruff passed on changed Python and tests.
  • Control-plane maintainability ratchet passed.
  • loopx canary premerge --from-git-diff: 18/18 selected checks passed, no manual holds.
  • Public/private boundary scan passed.

Closes #3264.

Signed-off-by: huangrt01 <huangrt01@163.com>
Signed-off-by: huangrt01 <huangrt01@163.com>
Signed-off-by: huangrt01 <huangrt01@163.com>
@huangruiteng

Copy link
Copy Markdown
Owner Author

Summary

  • Reject coverage-backed no-follow-up when the same writeback keeps the vision open or the path continuing.
  • Keep Todo succession authoritative: a semantic ACK cannot retire a completed-without-successor gap; only a typed runnable successor or durable Todo no-follow-up settlement can resolve it.
  • Point repair guidance to loopx todo complete --no-follow-up and explicitly reject synthetic user gates.
  • Consolidate the typed Todo succession reason/filter so write and read paths consume the same current gap truth.

Why this is separate from #3261

#3261 makes Todo completion continuation explicit and provides the narrow same-Turn recovery seam. This PR closes the cross-contract gap where progress/vision ACK state could still claim terminality without that durable Todo settlement.

Validation

  • 199 model-behavior and focused goal-frontier tests passed.
  • 162 broader goal-frontier/quota tests passed (covered within the 199-test run plus a prior focused pass).
  • 59 direct regression tests passed after final refinement.
  • Ruff passed on changed Python and tests.
  • Control-plane maintainability ratchet passed.
  • loopx canary premerge --from-git-diff: 18/18 selected checks passed, no manual holds.
  • Public/private boundary scan passed.

Closes #3264.

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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

精确评审头(Exact Head): 3270@152acda4ba4d7bcd49d10ce6de761b583bd34654
Base: main | 类型: no-follow-up ACK 绑定 Todo 生命周期真相(13 files, +~300)
作者: huangruiteng(owner)


详细中文评审

动机

关闭 #3264:此前 refresh-state 可接受 coverage-backed result_class=no_followup,但同一 writeback 保留 open vision / continuing path,语义 ACK 能清掉 completed-without-successor 义务却没有结构化 Todo no_followup=true,导致投影裂缝与合成 user gate。本 PR 把“语义 ACK”与“Todo 生命周期结算”彻底分开。

改动思路

三处收口:(1) semantic_delta_from_writeback 只在 agent_vision.state=no_followuppath_delta.outcome=stop 时接受 coverage_backed_no_followup;(2) qualify_replan_writeback 在存在 Todo succession gap 时拒绝 coverage-backed no-followup,并给出 loopx todo complete --no-follow-up 修复指引;(3) ack_policy 在 succession gap 打开时只接受 new_runnable_successor outcome。写/读共用同一 typed todo_succession_gap_items(reason-code 归一)。

具体改动

  • progress_observation.py:no-followup 一致性校验(reason_code no_followup_vision_path_inconsistent)。
  • semantic_replan_writeback.py:Todo gap 打开时拒绝并给修复命令(reason_code todo_no_followup_settlement_required),enforce_open_replan_writeback 对带 reason_code 的拒绝直接抛带指引的 ValueError。
  • ack_policy.py / goal_frontier/__init__.py:gap 打开时 outcome 集合收窄到 new_runnable_successor;提示文案明确 “do not invent a user gate”。
  • succession_warning.py / todo_summary.py:consolidate todo_succession_gap_items 与 reason code,recommended_action 指向 todo complete --no-follow-up
  • 文档:project-agent-todo-contract 与 goal-vision-replan-contract 明确“coverage evidence ≠ lifecycle settlement”。
  • 测试:vision/path 一致性参数化、语义 ACK 不能替代生命周期结算(含持久化 ACK 回归)、ack policy successor-only、structured terminal settlement 不再触发 stale Next Action repair。

关键内容讲解

  1. 一致终态才接受no_followup ACK 必须同时满足 vision state=no_followup 与 path outcome=stop,否则 outcome 被移除且 accepted=False
  2. Todo 优先:只要 completed-without-successor gap 仍打开,任何 coverage-backed no-followup 都不能 ACK replan 义务;必须先 todo complete --no-follow-up 或加真实 successor。
  3. 禁止合成 gate:修复文案与 projection 都明确“不要为压制 succession warning 而伪造 user gate”——正是 #3264 的核心验收项。

对主干的风险

无阻断项。改动集中在 goal-frontier/replan writeback 判定面,行为收紧符合 #3264 验收;不改变 benchmark 评分/任务语义。CI:Sign-off、build ×2、dependency-review 均 SUCCESS,pytest IN_PROGRESS(无失败)。

验证矩阵(exact head 实测)

场景 结果
test_goal_terminal_no_followup / test_progress_observation / test_refresh_state_replan_gate / test_replan_novelty_policy 59 passed
test_goal_frontier_replan_rules / test_replan_semantic_action_behavior / test_replan_host_context_projection / test_visible_goal_terminal_settlement 52 passed
作者 canary premerge 18/18 selected checks,无 manual holds
ruff / maintainability ratchet(作者) PASS
CI:Sign-off / build ×2 / dependency-review SUCCESS
pytest(CI) IN_PROGRESS(评审时刻)

我的整体评价

精准命中 #3264 的三个验收项(拒绝不一致 no-followup、语义 ACK 不能替代 Todo 结算、修复指引不造 user gate),读/写共用同一 typed gap 真相,111 个相关测试在 exact head 全绿。结论:APPROVE(author-owned PR,以 COMMENTED 记录批准结论;合并前确认 CI pytest 绿)。


English Verdict

Verdict: APPROVE (author-owned PR; recorded as COMMENTED because GitHub blocks formal self-approval). This change closes #3264 exactly: coverage-backed no-follow-up is accepted only when vision closes (state=no_followup) and the path stops, a semantic ACK can no longer retire a completed-without-successor gap without durable todo complete --no-follow-up settlement, and repair guidance explicitly forbids inventing a user gate. 111 focused goal-frontier/replan/terminal tests pass at the exact head; Sign-off, builds, and dependency-review are green, and CI pytest was still in progress at review time.

@huangruiteng
huangruiteng merged commit a521d8b into main Aug 16, 2026
8 checks passed
@huangruiteng
huangruiteng deleted the codex/no-followup-semantic-consistency-20260817 branch August 16, 2026 17:33
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.

bug(goal): no-follow-up semantic ACK can strand terminal closeout

1 participant