Skip to content

Design governed-runner budget settlement receipt #207

@mdheller

Description

@mdheller

Purpose

Define a governed-runner budget settlement receipt for future v0.2+ runtime flows.

This is a design issue only. Do not implement budget settlement here.

Context

Governed-runner v0.1 includes budget estimates in GovernedRunContract and AttemptAdmissionReceipt, but it does not settle actual costs or resource consumption.

Any future execution surface needs a separate settlement record so estimates and actuals do not collapse into one ambiguous state.

Proposed scope

Define BudgetSettlementReceipt v0.1 to record:

  • run id
  • attempt id
  • admission receipt ref
  • estimated budget fields
  • actual measured resource fields
  • token/cost/tool-call counters when available
  • estimate provenance
  • settlement provenance
  • overrun status
  • fail-closed reason when settlement data is missing

Acceptance criteria

  • Define BudgetSettlementReceipt v0.1 schema.
  • Add positive fixture for settled synthetic attempt.
  • Add negative fixture for missing admission receipt ref.
  • Add negative fixture for missing actuals.
  • Add negative fixture for negative cost/token counts.
  • Add negative fixture for overrun hidden as successful settlement.
  • Add validator and Makefile target.
  • Add docs separating budget estimate, budget admission, and budget settlement.

Non-goals

  • no live billing integration
  • no provider API calls
  • no actual token metering implementation
  • no execution implementation
  • no authority update
  • no rollback restore

Boundary

This issue completes when schema, fixtures, validator, and documentation are ready. Runtime settlement integration must be separate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions