Skip to content

fix(control-plane): bind replan reads by obligation identity - #3144

Merged
huangruiteng merged 1 commit into
mainfrom
codex/issue-3141-required-read-identity
Aug 12, 2026
Merged

fix(control-plane): bind replan reads by obligation identity#3144
huangruiteng merged 1 commit into
mainfrom
codex/issue-3141-required-read-identity

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • bind replan required-read enforcement to the current obligation identity instead of timestamp ordering alone
  • preserve the standing-watch compatibility case only for a typed watch_lane_continuation on the exact same frontier
  • make the model behavior fixture select the current quota packet's exact evidence-log command and verify the durable evidence_log_read event

Fixes #3141.

Behavior change

A pre-trigger ordinary replan ACK no longer bypasses required-read validation. It is rejected with required_read_not_executed unless an exact receipt carries the current required_read_id. The only pre-trigger exemption is an explicit watch-lane continuation whose frontier identity matches the current obligation.

This is a machine-enforced control-plane obligation, not guidance. Generic evidence-log reads without the projected --required-read-id do not satisfy it.

Validation

  • 85 focused replan, frontier, monitor, and behavior tests passed
  • repository-declared mypy passed (16 configured source files)
  • Ruff and changed-file py_compile passed
  • git diff --check origin/main...HEAD passed
  • risk-driven premerge passed: 15/15 selected checks, 0 failures, 0 manual holds
  • exact-scope change-quality receipt: cqr_cf09980a10102a9f6b37

The first premerge invocation exposed a host entrypoint using system Python 3.9 (tomllib unavailable). The same E2E check and then the complete 15-check premerge suite passed through the repository's supported venv Python module entrypoint.

Boundaries

  • no benchmark-specific runtime rule or raw benchmark evidence
  • no new capability, schema, executor, or speculative abstraction
  • no private state, credentials, local paths, or generated rollout logs

@huangruiteng

Copy link
Copy Markdown
Owner Author

Self-review completed against the exact head 30732774172f73664554c963c46e3501ffe6c47e.

Review lenses

  • Typed state: the pre-trigger exemption now requires both the exact frontier_identity and typed watch_lane_continuation; timestamp ordering alone grants no authority.
  • Domain neutrality: the validator remains goal/benchmark agnostic and reuses the existing replan obligation and receipt contracts.
  • Behavior disclosure: ordinary pre-trigger ACKs now fail closed with required_read_not_executed; only an exact typed watch continuation is exempt.
  • Guidance vs obligation: the packet's --required-read-id is a machine-enforced required read, not advisory copy.
  • Behavior realism: the scripted model actor reads the latest quota tool result, chooses that packet's exact evidence-log command, and the test verifies the durable evidence_log_read event and matching identity.

No actionable review findings remain. The diff contains no new schema/executor, benchmark-specific rule, private state, raw rollout, credentials, or local paths. The visible test-only-placeholder API key values are pre-existing inert test fixtures.

Validation

  • 85 focused replan/frontier/monitor/model-tool tests: passed
  • repository-declared mypy (16 configured files): passed
  • Ruff, changed-file py_compile, and diff hygiene: passed
  • change-quality receipt cqr_cff08273959f50d819df: valid for the exact diff
  • risk-driven premerge: 15/15 selected checks passed, 0 failures, 0 manual holds, self-merge allowed

The first premerge command exposed the console entrypoint resolving system Python 3.9 and failing on tomllib; the isolated E2E check passed under the supported venv Python, then the entire premerge suite was rerun through that module entrypoint and passed. Coverage is sufficient because it combines direct regression/negative cases, the real quota→model-tool→durable-receipt behavior seam, adjacent frontier/monitor tests, and broader control-plane/canary-runner risk profiles.

@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)

详细中文评审

精确评审头: 3144@30732774172f73664554c963c46e3501ffe6c47e

动机

修复 #3141:replan 的 required-read 强制此前依赖时间戳顺序,普通前置 replan ACK 可绕过证据日志读取校验。本 PR 把它绑定到当前 obligation identity:只有同一 frontier 上显式 watch_lane_continuation 类型的前置证据才被豁免,其余前置 ACK 必须携带当前 required_read_id 的读取回执。

改动思路

autonomous_replan_ack.py 新增 _ack_is_prior_watch_continuation_for_obligation:前置豁免要求 frontier_identity 完全一致且 delta_contract 含 watch_lane_continuationvalidate_replan_required_read_receipt 在存在 projected required_read_id 时以身份匹配为准(弱化时间戳顺序依赖)。测试夹具改为选择当前 quota packet 的精确 evidence-log 命令并验证持久化 evidence_log_read 事件。

具体改动(关键代码讲解)

  • _ack_is_prior_watch_continuation_for_obligation:把“standing watch”豁免从时间戳语义收窄为 typed delta + exact frontier,杜绝普通 replan ACK 冒充。
  • validate_replan_required_read_receiptbool(required_read_id) or triggered_at <= recorded_at——有 projected id 时身份优先;无 id 时保留时间顺序校验。行为变更明确、机器强制,不是 guidance。
  • 测试test_replan_evidence_tool_behavior.pytest_replan_required_read_receipts.py 重构为义务身份语义(+416/-150 覆盖);此前 clean main 上失败的 9 个 live-model/tool 测试在此 head 全部通过(本次实测 41 passed),即该 PR 同时修复了基线 CI。

对主干的风险

低且方向正确:豁免面收窄(只有精确 watch 续期可前置),强制面收紧(普通前置 ACK 不再绕过读取);watch_lane_continuation 是现有 typed delta kind,无新抽象。唯一注意点是身份匹配要求 frontier_identity 稳定,若有合法前置续期因 id 漂移被拒,会得到显式 required_read_not_executed 回执(fail closed,可诊断)。

我的整体评价

APPROVE(author-owned,以评论记录)。 scope fit 成立(真实 replan 强制路径);行为变更明确披露;修复了 baseline CI 的 replan evidence-tool 失败;41 项聚焦测试通过、py_compile 干净。无阻塞项。


English Verdict

APPROVE — exact head 30732774172f73664554c963c46e3501ffe6c47e (author-owned; formal self-approval blocked by GitHub, recorded as a comment).

Fixes #3141 by binding replan required-read enforcement to obligation identity: only a typed watch_lane_continuation on the exact same frontier may precede the obligation; ordinary pre-trigger ACKs must carry the current required_read_id. Machine-enforced, clearly disclosed behavior change. Verified: 41 focused replan/behavior tests pass at the exact head (including the previously failing live-model/tool tests), py_compile clean. No blockers.

@huangruiteng
huangruiteng force-pushed the codex/issue-3141-required-read-identity branch from 3073277 to a1b7725 Compare August 12, 2026 16:38
@huangruiteng

Copy link
Copy Markdown
Owner Author

Final guard after rebasing onto v0.4.5 supersedes the earlier exact-head reference:

  • reviewed head: a1b7725b47e02a838bcef06e09be13f2f14ce3f8
  • base: 80877982216577174e3e7c7cca9804c5a3a3148b
  • exact-scope quality receipt: cqr_cf09980a10102a9f6b37 (valid)
  • focused suite after rebase: 85 passed
  • full risk-driven premerge after rebase: 15/15 passed, 0 failures, 0 holds
  • GitHub build, dependency review, and pytest for this head: passed
  • mergeability: mergeable; local head equals remote PR head

The intervening main change only bumped the release version; it did not touch this control-plane seam. No actionable findings remain, so this exact head is qualified for the authorized admin self-merge.

@huangruiteng
huangruiteng merged commit 1980d0a into main Aug 12, 2026
5 checks passed
@huangruiteng
huangruiteng deleted the codex/issue-3141-required-read-identity branch August 12, 2026 16:48
huangruiteng added a commit that referenced this pull request Aug 12, 2026
#3147)

Mark the fresh-project onboarding fixture done (GH-C87, #3093/#3103), bump release docs slices to v0.4.5, and add security-boundary (GH-C90) plus obligation-bound replan/evidence-read (GH-C91) fixtures. Reflect merged security fixes #3137-#3140, PR-review lenses #3123/#3134, replan evidence-log hardening #3100-#3106/#3112/#3135/#3144, and the landed React homepage #3098.
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]: replan required-read enforcement can be bypassed by pre-trigger ACK early return

1 participant