TanStack

Content temporarily unavailable

Project glossary

Use one term for one concept across production code, models, tests, and design documents. Do not rotate synonyms for style. Shared words let a reader move between the contract, the model, and the implementation without translating.

This glossary owns terms that cross subsystem boundaries. A subsystem may add narrower terms in its architecture document. It must not redefine a term here. When an independent model needs a different abstraction, state the mapping next to the model.

Aligned vocabulary does not mean copied logic. A reference model should not use production queues, caches, or semantic helpers merely to share their names.

Runtime terms

TermMeaningDo not use as a synonym
CollectionThe public keyed data container. Capitalize it when referring to the TanStack DB type.Relation, table, or query result.
source CollectionA Collection read by a query or adapter.Source relation when the value is a public Collection.
live-query CollectionA Collection whose rows are produced by a live query.Query, observer, or result set.
relationAn internal weighted multiset maintained by D2.Collection.
rowOne keyed public Collection value or one relation value. Qualify source row, relation row, or public row when more than one kind appears.Event or transaction.
change messageOne insert, update, or delete delivered through the Collection sync boundary.Transaction or publication.
sync transactionThe changes between one begin() and commit() pair.Optimistic transaction or publication.
optimistic transactionA local mutation transaction whose intent may later complete or roll back.Sync transaction.
Collection statusOne public Collection lifecycle value: idle, loading, ready, error, or cleaned-up.Subscription status.
subscription statusOne subscription value: ready or loadingSubset.Collection status.
subscriptionA consumer of Collection changes with its own subset demands and lifecycle.Collection, query, or transport.
sync adapterThe code supplied through Collection sync configuration that starts a sync run and translates between TanStack DB and a provider.Provider or source Collection.
providerThe external database, service, or SDK from which a sync adapter acquires data.Sync adapter or source Collection.
sync runOne invocation of a Collection's sync function, plus the callbacks and resources installed by that invocation, until cleanup invalidates them. A run may own zero or more provider requests and may outlive any one request. Component-owned syncRunGeneration counters fence this lifetime in Collection state, sync ownership, and live-query graph work.Provider session, replay, generation, or request.
provider sessionA provider-defined remote stream, connection, or SDK lifetime. Always qualify it with the provider.Sync run.
cleanupThe transition that ends the current sync run and releases its resources. The Collection object remains available for cleanup or restart.Collection destruction, restart, or replay.
restartStarting a new sync run after the prior sync run has ended.Same-run recovery or replay.
truncate replayAn authoritative source replacement after a truncate, inside the current sync run. The Collection subscription remains active; any dependent live-query graph remains active behind its publication barrier.Restart, reload, retry, or repair.
source snapshotThe source rows established by one snapshot operation within its declared predicate and window. It proves full-source state only when the provider says that scope is authoritative and exhausted.Public snapshot or proof of full-source coverage.
public snapshotThe last coherent set of rows exposed to reads, events, and downstream queries.Private replacement or source snapshot.
private replacementSource or graph state withheld while an authoritative replay or repair is incomplete.Public snapshot.
publicationThe boundary that makes one coherent result observable to reads, events, and downstream queries.Provider return, request settlement, or sync commit by itself.
atomic publicationOne publication boundary at which state, events, and consumers observe the same result without an intermediate public state.Any individual commit() call or source snapshot.
readinessEvidence that a named consumer may proceed. Always qualify Collection readiness, subscription readiness, or initial-query readiness; they settle at different boundaries.Provider completion or publication in general.

source names a role in a data flow; it does not own a lifecycle. Do not coin a source session. Use sync run for the local Collection sync invocation and a provider-qualified provider session for a remote lifecycle.

Demand and pagination terms

These terms form a graph, not a one-to-one pipeline. Keep the ownership, work, evidence, and visibility boundaries visible:

plaintext
logical subset owner --retains--> demand
demand --starts or replaces--> 0..n acquisition attempts
accepted attempt --establishes--> physical acquisition + acquisition lease
physical acquisition --may drive--> 0..n sync transactions
commit(sync transaction) --returns--> applied receipt
acquisitions + receipts + graph work --may gate--> publication
publication --advances or replaces--> public snapshot

One demand may need several acquisitions. One acquisition may write through several sync transactions. One publication may wait for several acquisitions, receipts, or graph participants. Do not infer success or visibility from an earlier node alone.

TermMeaningDo not use as a synonym
demandThe logical need for source data. Demand may outlive or replace physical work.Request, transport, or row ownership.
logical subset ownerOne subscription claim that keeps a subset demand active.Physical acquisition.
request dataThe immutable LoadSubsetOptions and attached signal passed to an adapter.Demand or established coverage.
acquisition attemptOne invocation that asks a sync adapter to start physical work. A synchronous throw ends the attempt before acceptance. If cleanup invalidates the captured sync run after the adapter returns but before activation, core cancels the tentative acquisition without retaining its lease; cleanup owns the adapter resources.Physical acquisition or transport.
physical acquisitionRequest-scoped work accepted by a sync adapter for a demand.Acquisition attempt, logical demand, or transport.
leaseAn ownership token that requires a matching release. TanStack DB leases do not expire on a timer. Always qualify which resource the lease owns.Demand, request, or data coverage.
acquisition leaseThe release obligation created when an adapter accepts a physical acquisition.The acquisition attempt itself.
window leaseOne window-controller caller's contribution to the requested window.Acquisition lease.
observer leaseOne Query DB owner's claim that retains a query observer or its rows.Subscription or acquisition lease.
demand retirementRemoving one logical owner's claim on demand.Acquisition release or row deletion.
acquisition releaseFulfilling one acquisition lease by aborting its signal and giving the owning adapter one unload opportunity.Demand retirement, guaranteed transport cancellation, or row deletion.
adapter unloadThe adapter callback invoked during acquisition release.Demand retirement or proof that transport stopped.
abortA cancellation signal sent to work that may still be in flight.Release, rollback, or guaranteed transport cancellation.
transportProvider work such as an HTTP request or stream. A transport may be shared, may outlive abort, and need not map one-to-one to a physical acquisition.Acquisition attempt or demand.
settlementA promise becoming fulfilled or rejected. Qualify what settled.Success, application, or publication.
applied receiptThe SyncAppliedReceipt returned by commit(). It settles when that sync transaction's writes and events become visible, or rejects if they are abandoned.Provider completion or source exhaustion.
applied settlementThe law that a successful subset load waits for every applied receipt that establishes its result.Publication of a larger graph result.
windowThe requested ordered view described by offset and limit.Loaded prefix or established source extent.
prefixSource rows from the start of one declared order through a finite boundary.Page, window, or proof of exhaustion.
cursorValues and expressions that continue an ordered request from a boundary.Offset or general request identity.
boundaryThe last value that an ordered acquisition has safely established for continuation.Any last local row.
tie groupRows equal under the order terms used by a continuation boundary.Page.
source exhaustionAuthoritative evidence that no more matching source rows exist.A short response unless the provider says it is authoritative.
generationA monotonic token used to reject obsolete asynchronous work. Qualify the clock it fences, such as sync-run, replay, ordered-load, window-operation, cursor-sequence, post-write-refetch, or demand generation.Session, replay, or request.
repairWork that tries to restore an authoritative source result after finite coverage becomes invalid or an acquisition fails. Repair may use a replay, but the terms are not synonyms.Retry, replay, or restart.
recoveryRegaining a named capability after failure. Always qualify what recovered and whether it stayed in the same sync run.Restart or repair in general.

Live-query materialization terms

The live-query architecture defines the full laws and local vocabulary. These cross-file terms keep their exact meanings:

TermMeaning
data planeThe D2 graph that joins, reduces, orders, and materializes relations.
demand planeThe asynchronous adapter that starts acquisition attempts and releases acquisition leases.
bucket keyThe canonical identity of one correlated child partition.
active bucketA bucket referenced by at least one current route.
route relationWeighted links from bucket keys to materialization cells.
materialization cellOne include field on one parent-row occurrence.
Collection facadeThe stable public Collection shared by parents routed to one active bucket.
weighted deltaA positive or negative change to a relation row.

See packages/db/src/query/live/ARCHITECTURE.md for bucket relations, bucket values, arrangements, reductions, and the normative materialization laws.

Oracle and model terms

TermMeaning
contract or lawThe promised behavior and its declared boundary.
oracleThe rule or mechanism that judges production behavior.
reference modelA simpler, independent computation or state machine used as an oracle.
historyStarting conditions plus a sequence of actions or events, including relevant dependencies and timing.
history grammarThe values, actions, constraints, and schedules that can form legal histories.
production driverTest code that invokes the real entry point and controls relevant external events.
observationOne recorded public fact.
traceAn ordered sequence of observations.
checkpoint or observation cutThe exact point where the contract requires comparison.
oracle replayRe-running a recorded oracle failure from its seed, shrink path, actions, or other replay inputs. Do not use it for runtime truncate replay, retry, or a new random campaign.
projection or abstractionThe parts of concrete state retained for one judgment.
refinement checkA check that observed production behavior is allowed by the model. A sampled check is not a proof for every behavior.
partial oracleAn oracle that judges only named parts of the contract.
reach witnessEvidence that the production driver reached the claimed boundary.
mutantA deliberate wrong answer or implementation used to test oracle sensitivity.
fault injectionA deliberate runtime failure, delay, cancellation, or malformed response used to test a system boundary.
shrinkingReducing a failing generated history while preserving the failure.
bounded exhaustivenessExecuting every case inside stated finite bounds.
held-out challengeA challenge not used to shape the tested design. After it guides a change, retain it but stop calling it held out.

Grammar rules

Use nouns for state and verbs for transitions:

  • A demand becomes active or retires.
  • Core starts an acquisition attempt. If the adapter accepts it, the attempt establishes a physical acquisition and its acquisition lease. A synchronous throw fails the attempt before either is established. Cleanup may instead invalidate a returned attempt before activation; core then cancels the tentative acquisition without retaining its lease.
  • A logical owner retires. Core releases an acquisition lease. The adapter unloads its acquisition.
  • An abort signal requests cancellation; transport stops only when the provider does so.
  • A promise settles; it fulfills or rejects.
  • A sync transaction applies when its writes and events become visible.
  • A replay or repair publishes one coherent public snapshot.
  • Cleanup ends a sync run. Restart starts a new sync run.
  • Truncate replay replaces source state inside the current sync run and any current dependent graph.

Use settled for a promise that fulfilled or rejected. Use complete for named coverage, content, history, or a non-promise operation only when no stronger boundary term applies. Use success only for fulfillment. Qualify overloaded words such as state, request, snapshot, session, owner, release, recovery, and generation at first use.

Model alignment rule

For every model state, action, and observation, apply one of these rules:

  1. If it represents a production concept, use the canonical production term.
  2. If it combines production concepts, name the abstraction and list what it combines.
  3. If it splits one production concept, qualify each part and state the split.
  4. If it exists only in the model, say so. Do not give it a production name.

The same check applies in reverse. New production terminology should update this glossary and every model that represents that concept in the same change.