Skip to content

Persist rental-ledger consumption entries against the settlement-backend interface #6314

Description

@JSONbored

Problem: #4792 shipped buildLoopConsumptionEntry/totalConsumptionForTenant (packages/loopover-engine/src/loop-consumption.ts) as a pure decision core with deliberately no storage opinion — persisting entries was explicitly deferred as "the separate, blocked-on-#4789/#4790 integration." That integration was never filed as its own issue; it only existed as a sentence inside #4792's body, so there's nothing a contributor or maintainer can pick up once #4789/#4790 clear.

Area: Platform / gittensor economics — rental ledger

Proposal: Wire buildLoopConsumptionEntry's output into a real settlement backend via #6098's SettlementBackend interface (recordPayout/getPoolBalance) — call recordPayout with a PayoutEligibleEvent on every completed or killed loop run, per #6098's already-resolved contract. No new persistence design needed; #6098 already specifies the shape.

Deliverables:

Acceptance criteria:

  • A completed test loop's consumption entry results in exactly one recordPayout call, reconcilable against the tenant's pool balance.
  • A retried/duplicate completion event does not double-decrement the pool.

Resources:

Boundaries:


Part of #4778.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

Projects

Status
Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions