Authoritative And Derived State

Atlox separates information the application accepts as fact from representations that can be recomputed.

Authoritative state

Application-owned var places contain authoritative logical values:

type Ticket {
  title: Text
  open: Bool
}

var tickets: Map<Int, Ticket> = {}

The runtime may store this map as rows, key-value cells, columns, or another layout. Those choices cannot change the fact that application code observes one Map<Int, Ticket> value.

Derived state

Functions describe computed values:

fn openTickets() {
  tickets.filter((_, ticket) => ticket.open)
}

The result may be evaluated on demand, translated into a query, maintained incrementally, indexed, cached, or replicated to a browser. It does not become a second source of truth.

This principle applies to read models, search documents, aggregates, analytics, and client replicas. Their physical state is replaceable because the defining relationship remains in the semantic program.

Operational state

Retry counters, rollout checkpoints, replica progress, cache occupancy, and similar machinery belong to the runtime. They are durable when required, but they are not application facts.