Skip to main content

Gate runtime rules

This section defines the runtime contract for:

  • authorize
  • commit
  • ingest

This section does not repeat field-level API reference. It defines decision semantics, failure classes, and retry-safe behavior.

System contract

  • authorize is the admission step. It evaluates entitlement, active policy windows, and funding/budget feasibility, then issues a lease.
  • commit is the settlement step for authorized work. It validates the lease context, prices usage, writes rating facts, and settles.
  • ingest is direct usage write without authorize. It prices and writes rating facts directly for service-to-service accounting.

Shared rules across operations

  • Every operation requires explicit idempotency handling.
  • Every operation is scoped by realm and billing account context.
  • Feature and meter codes must be valid normalized identifiers.
  • Hint emission is first-class: clients and operators should consume hints, not only status code.

Operation matrix

OperationMain purposeRequires leaseApplies quota/rateWrites ratings
authorizeAdmission and lease issuanceNoEvaluates windows for admissionNo
commitFinalized priced commit for authorized workYesApplies quota counters at commitYes
ingestDirect priced usage ingestNoNo authorize lease flowYes

In this section