Skip to content

quota: isolate autonomous replan decision plane - #1156

Merged
huangruiteng merged 2 commits into
mainfrom
codex/replan-decision-plane-kernel-20260703
Jul 2, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/replan-decision-plane-kernel-20260703

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

Summary

  • Move goal-frontier and required autonomous-replan decision logic into loopx.policies.goal_frontier so quota.py remains a thin adapter/wiring layer.
  • Select autonomous_replan_required before monitor quiet skip, agent-scope wait, or agent-scope exhausted projection can mask it.
  • Expose goal_frontier_projection / autonomous_replan_decision through quota, status, diagnose, markdown, and public data-contract docs.

Validation

  • python3 -m py_compile loopx/quota.py loopx/policies/goal_frontier.py loopx/cli_commands/status.py loopx/diagnose.py examples/quota-replan-decision-plane-smoke.py
  • python3 examples/quota-replan-decision-plane-smoke.py
  • python3 examples/autonomous-replan-obligation-smoke.py
  • python3 examples/monitor-scheduler-contract-smoke.py
  • python3 examples/quota-agent-scoped-user-gate-smoke.py
  • python3 examples/quota-cleared-blocker-successor-gate-smoke.py
  • python3 examples/docs-governance-smoke.py
  • python3 examples/interaction-pattern-catalog-smoke.py
  • git diff --check origin/main...HEAD
  • loopx check --scan-path docs/product/core-control-plane/rule-seam-map.md --scan-path docs/quota-allocation.md --scan-path docs/status-data-contract.md --scan-path loopx/policies/goal_frontier.py --scan-path loopx/quota.py --scan-path loopx/cli_commands/status.py --scan-path loopx/diagnose.py --scan-path examples/quota-replan-decision-plane-smoke.py

Review note

This touches runtime quota behavior, so it should be reviewed rather than self-merged.

@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Self-review before owner-authorized self-merge.

Findings: none.

Product/architecture judgment:

  • Motivation: required autonomous replan was being treated as another quota payload detail, so monitor quiet skip or agent-scope wait could mask a goal-level planning obligation.
  • Solved: this PR moves goal-frontier/replan decision logic into loopx.policies.goal_frontier; quota.py now consumes that policy result and selects autonomous_replan_required before lane-local quiet/wait projections.
  • User/operator impact: heartbeat agents should no longer silently wait when the whole goal requires replan, and status/diagnose now expose compact goal_frontier_projection / autonomous_replan_decision fields.
  • Main risk: quota hot path behavior changes; risk is bounded by the new focused smoke plus existing replan, monitor, user-gate, and successor-gate smokes.
  • Design judgment: acceptable as a reusable policy seam. It deliberately keeps per-goal/per-agent vision/replan logic out of quota.py.

Validation run:

  • python3 -m py_compile loopx/quota.py loopx/policies/goal_frontier.py loopx/cli_commands/status.py loopx/diagnose.py examples/quota-replan-decision-plane-smoke.py
  • python3 examples/quota-replan-decision-plane-smoke.py
  • python3 examples/autonomous-replan-obligation-smoke.py
  • python3 examples/monitor-scheduler-contract-smoke.py
  • python3 examples/quota-agent-scoped-user-gate-smoke.py
  • python3 examples/quota-cleared-blocker-successor-gate-smoke.py
  • python3 examples/docs-governance-smoke.py
  • python3 examples/interaction-pattern-catalog-smoke.py
  • git diff --check origin/main...HEAD
  • loopx check --scan-path ... (public boundary clean for the 8 changed files; unrelated loopx-meta duplicate-index warning remains)

Merge decision: owner authorized self-merge; proceeding with admin-bypass squash merge.

@huangruiteng
huangruiteng merged commit 0d9d23b into main Jul 2, 2026
@huangruiteng
huangruiteng deleted the codex/replan-decision-plane-kernel-20260703 branch August 7, 2026 13:43
liubf21 pushed a commit to liubf21/loopx that referenced this pull request Aug 14, 2026
* quota: isolate autonomous replan decision plane

* docs: document goal frontier replan policy seam
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