Skip to content

Ship provider-neutral resource metering, hard envelopes, and runtime leases #32

Description

@LeftTwixWand

Outcome

Enforce provider-neutral resource accounting and hard runtime limits with durable attribution.

Acceptance criteria

  • Have trusted Model Neurons, the trusted BehaviorHost/runtime meter boundary, and Storage Neurons produce ResourceUsed Synapses; BehaviorHost is a host/meter boundary, not a Neuron.
  • Attribute every usage fact to its workspace and, when causal lineage exists, to the executing Behavior revision, root Behavior, Agent, member, and task or session.
  • Record unattributable shared consumption honestly as workspace overhead rather than fabricating causal ownership.
  • Reserve capacity before work, settle actual usage afterward, and release unused reservation.
  • Enforce hard token, runtime, and storage envelopes rather than advisory quotas.
  • Return typed ResourceLimitReached outcomes when an envelope is exhausted.
  • Cover exhaustion, typed failure, release, and recovery in Behavior BDD scenarios.
  • Issue bounded, renewable RuntimeLease records.
  • Give user activity, webhook delivery, and scheduled events short runtime leases.
  • Allow longer work to renew a lease only within the active resource envelope.
  • Prevent self-generated heartbeats from renewing a lease or keeping a workspace alive indefinitely.
  • Persist future scheduled work durably so the runtime can sleep and wake for the event.
  • Expose provider-neutral resource usage and limits in the UI without currency, wallets, rates, or commercial policy.

Non-goals

  • Adding provider-specific accounting or enforcement outside local resource envelopes.
  • Adding currency, wallet, pricing, or other commercial billing concepts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Required for the first complete OS proofarea:resourcesDigitalbrain resources work

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions