Skip to content

fix(control-plane): preserve monitor settlement binding - #3424

Merged
huangruiteng merged 3 commits into
mainfrom
codex/fix-monitor-settlement-binding-20260821-delivery
Aug 21, 2026
Merged

fix(control-plane): preserve monitor settlement binding#3424
huangruiteng merged 3 commits into
mainfrom
codex/fix-monitor-settlement-binding-20260821-delivery

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve the exact receipt-bound monitor as the same-Turn settlement target after polling reschedules it
  • emit an explicit settlement obligation instead of rebinding to a newly created successor
  • model receipt-bound monitor state as poll_due or settlement_pending, with invalid phases rejected
  • preserve long wrapped Next Actions losslessly in durable refresh records while keeping compact projections bounded

Root cause

Monitor polling rescheduled the parent into the future and created a successor. The following same-Turn should-run call then dropped the no-longer-due parent and rebound execution to the successor, so the exact parent receipt could not be settled.

During rebase, the premerge heartbeat-flow smoke also exposed an adjacent regression from the newly merged structured Next Action parser: refresh-state reused its compact 220-character projection mode for a durable run record. The parser now has an explicit lossless mode for that record without changing compact status/read-model defaults.

Architecture

This remains a pre-quota monitor-lane transition. The TypeScript Effect Program continues to own downstream settlement execution, and the newly migrated TS Todo next-action domain continues to own completion transitions. No parallel settlement or parsing authority was added.

Validation

  • 25 focused monitor follow-through and Todo next-action settlement tests passed
  • examples/control_plane/heartbeat-quota-flow-smoke.py passed after catching and repairing the lossless-readback regression
  • Ruff, changed-file py_compile, and repository strict mypy passed
  • public/private boundary scan clean; one matched phrase is existing public product text describing a credential-free repository
  • loopx canary premerge --from-git-diff --goal-id loopx-meta passed: 17 selected checks, 0 failures, 0 warnings, 0 holds
  • exact-scope quality receipt: cqr_4f8e371c92234532a612

No local runtime state, raw histories, credentials, or generated logs are included.

Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
@huangruiteng
huangruiteng force-pushed the codex/fix-monitor-settlement-binding-20260821-delivery branch from bff5f63 to 52bf6d9 Compare August 21, 2026 15:17
@huangruiteng

Copy link
Copy Markdown
Owner Author

Maintainer self-review

No blocking finding remains after reviewing and refining the final diff.

Product and control-plane judgment

  • The exact monitor selected by a committed heartbeat receipt remains the same-Turn settlement identity after polling reschedules it. A newly created successor stays visible but cannot steal settlement in that Turn.
  • The original boolean state was refined into ReceiptBoundMonitorPhase (poll_due or settlement_pending). Missing/invalid phase is rejected, and focused coverage proves both legal phases plus the negative path.
  • This rule correctly remains in the pre-quota monitor-lane owner. The TypeScript Effect Program owns downstream settlement execution; the recently migrated TS Todo next-action domain owns completion transitions. Moving this selection rule now would create duplicate cross-language authority.
  • Rebase onto fix(todos): settle durable Next Action on completion #3414 exposed an adjacent durable-state regression: structured Next Action parsing compacted refresh records at 220 characters. The existing parser now has an explicit lossless mode only for durable refresh records; status/read-model projections retain bounded defaults. No second parser or state owner was added.

Validation

  • 25 focused monitor follow-through and Todo next-action settlement tests passed
  • examples/control_plane/heartbeat-quota-flow-smoke.py passed after reproducing and repairing the long-action truncation
  • Ruff, changed-file py_compile, and repository strict mypy passed
  • LoopX change-quality receipt: cqr_4f8e371c92234532a612
  • loopx canary premerge --from-git-diff --goal-id loopx-meta — 17/17 selected checks passed; no warnings, failures, or holds
  • GitHub required checks — Sign-off, dependency review, build, Windows PowerShell, and Linux pytest all passed
  • Public/private boundary scan — clean; the only textual match is existing public product guidance describing a credential-free repository

The final six-file diff is cohesive around same-Turn settlement and durable Next Action continuity, with the related refactors reducing ambiguous state and duplicated parsing behavior. It is reviewable and reversible, and it does not alter permissions, scoring, benchmark behavior, or external effect authority.

@huangruiteng
huangruiteng merged commit 90532a7 into main Aug 21, 2026
7 checks passed
@huangruiteng
huangruiteng deleted the codex/fix-monitor-settlement-binding-20260821-delivery branch August 21, 2026 15:26
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