Skip to content

fix(quota): preserve visible Goal settlement source - #3403

Draft
huangruiteng wants to merge 2 commits into
mainfrom
codex/visible-goal-settlement-source-20260821
Draft

fix(quota): preserve visible Goal settlement source#3403
huangruiteng wants to merge 2 commits into
mainfrom
codex/visible-goal-settlement-source-20260821

Conversation

@huangruiteng

Copy link
Copy Markdown
Owner

Summary

  • derive quota spend attribution from the typed scheduler runtime profile
  • keep native Goal runtimes on source=visible-goal without heartbeat Todo/Turn bindings
  • preserve the existing typed heartbeat settlement plan and record the reusable self-repair pattern

Root cause

The canonical visible Goal host command already used source=visible-goal, but the nested interaction contract hard-coded a heartbeat spend and the currently selected Todo. If the Todo completed before accounting, that stale binding could reject the spend or misattribute interactive usage.

Validation

  • python -m pytest tests/control_plane/test_quota_settlement.py tests/control_plane/test_quota_settlement_cli.py tests/control_plane/test_scheduler_execution_context.py tests/test_host_loop_activation.py -q
  • python examples/control_plane/interaction-contract-state-machine-smoke.py
  • python examples/control_plane/quota-spend-agent-identity-smoke.py
  • loopx canary premerge --from-git-diff
  • loopx check public-boundary scan over all four changed files (clean)

Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
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