Skip to content

Add goal route hint projection#879

Open
huangruiteng wants to merge 2 commits into
mainfrom
codex/goal-route-hint-projection-20260629
Open

Add goal route hint projection#879
huangruiteng wants to merge 2 commits into
mainfrom
codex/goal-route-hint-projection-20260629

Conversation

@huangruiteng

Copy link
Copy Markdown
Owner

Summary

  • add a compact goal_route_hint_v0 builder for agent-scoped quota should-run payloads
  • expose the hint in quota JSON/markdown without mutating shared ## Next Action
  • document the advisory/read-only boundary and cover run/wait side-agent cases in work-lane smoke

Validation

  • python3 examples/work-lane-contract-smoke.py
  • python3 examples/quota-plan-smoke.py
  • python3 examples/next-action-projection-contract-smoke.py
  • python3 examples/quota-scheduler-hint-compaction-smoke.py
  • python3 examples/quota-scheduler-policy-smoke.py
  • python3 -m compileall -q loopx
  • python3 -m loopx.cli --format json check --scan-path loopx/quota.py --scan-path loopx/policies/goal_route_hint.py --scan-path examples/work-lane-contract-smoke.py --scan-path docs/quota-allocation.md --scan-path docs/status-data-contract.md --scan-path docs/product/core-control-plane/rule-seam-map.md
  • git diff --check

Note: loopx check still reports the pre-existing loopx-meta duplicate index rows warning.

@huangruiteng

Copy link
Copy Markdown
Owner Author

No blocking findings from my side.

Product/architecture judgment:

  • Motivation: this PR addresses a real multi-agent operator problem: quota should-run --agent-id ... can select an agent-lane action while the durable goal ## Next Action still belongs to the primary goal route. Without a compact synthesis, hosts/agents can confuse a lane-local action with a goal-level mutation.
  • Solved or not: the implementation does solve the intended boundary for the tested cases. goal_route_hint_v0 is emitted as read-only advisory data, carries preserves_goal_next_action=true / goal_next_action_mutation=none, and the smokes cover both current-agent runnable and other-agent wait cases.
  • User/operator impact: this should make heartbeat/Codex-host output less confusing. Operators can see “current lane should run/wait” without losing the shared durable Next Action or hiding other-agent queues.
  • Main risk: medium because this touches quota.py hot-path output and adds another advisory field that agents may over-trust. I sampled the live payload: total quota JSON is still large (~177KB in this local state), but the new goal_route_hint itself is compact and markdown renders only a short summary/current action line. Existing Next Action preservation remains explicit.
  • Design judgment: extracting the synthesis into loopx/policies/goal_route_hint.py is the right direction; it is cleaner than adding more branching directly into quota.py. Long-term, this can become part of a broader route/advisory projection module, but this PR keeps the contract bounded and read-only.

Validation I ran locally on PR head e783c250:

  • python3 examples/work-lane-contract-smoke.py
  • python3 examples/quota-plan-smoke.py
  • python3 examples/next-action-projection-contract-smoke.py
  • python3 examples/quota-scheduler-hint-compaction-smoke.py && python3 examples/quota-scheduler-policy-smoke.py
  • python3 -m compileall -q loopx
  • python3 -m loopx.cli --format json check --scan-path loopx/quota.py --scan-path loopx/policies/goal_route_hint.py --scan-path examples/work-lane-contract-smoke.py --scan-path docs/quota-allocation.md --scan-path docs/status-data-contract.md --scan-path docs/product/core-control-plane/rule-seam-map.md
  • git diff --check origin/main...HEAD
  • extra live sample: python3 -m loopx.cli --format json ... quota should-run --goal-id loopx-meta --agent-id codex-side-bypass, confirming goal_route_hint is advisory/compact and active_state_next_action remains separate.

Note: loopx check only reported the known pre-existing loopx-meta duplicate index rows warning.

Merge decision: approved from side-agent review perspective, but I did not admin-bypass merge because this is quota/status hot-path behavior and still has the normal review-required gate.

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