fix(rectification): skip settlement for free turns #30

Merged
jesse merged 1 commits from codex/fix-rectification-free-settlement-20260811 into main 2026-08-12 03:16:40 +08:00
Owner

Root cause

Free opening/read_only turns skip usage reservation but still called complete_usage after a successful Agent response. PostgreSQL returned request_missing and the runner downgraded the completed answer to usage_settlement_failed.

Fix

  • bypass settlement for non-message actions
  • keep message authorization and settlement unchanged
  • add focused billing contract coverage
  • record BUG-171

Verification

  • 51 focused rectification/billing tests passed
  • targeted ESLint passed
  • git diff --check passed
## Root cause Free opening/read_only turns skip usage reservation but still called complete_usage after a successful Agent response. PostgreSQL returned request_missing and the runner downgraded the completed answer to usage_settlement_failed. ## Fix - bypass settlement for non-message actions - keep message authorization and settlement unchanged - add focused billing contract coverage - record BUG-171 ## Verification - 51 focused rectification/billing tests passed - targeted ESLint passed - git diff --check passed
jesse added 1 commit 2026-08-12 03:00:01 +08:00
fix(rectification): skip settlement for free turns
Staging Backend Quality Gate / validate (pull_request) Successful in 15m26s
Staging Backend Quality Gate / publish (pull_request) Has been skipped
da384357d0
jesse merged commit 689799102e into main 2026-08-12 03:16:40 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/Jyotisha#30