Skip to content

Oracle glossary

Oracle glossary

This glossary owns the terms for oracle work with @tanstack/oracles. The project's own glossary or architecture documents own its domain terms. Use one term for one concept. Do not rotate synonyms for style.

Laws and evidence

TermMeaning
lawA promised behavior, stated so that a reader could predict an observation without reading production. An oracleProperty states it in law.statement.
authorityWhere a law comes from: an API or contract document and section, or a decision, with who made it (name and GitHub login) and its date. Production output is evidence, never authority.
limitsWhat a property does not establish. Unresolved parts of a law go here.
potential oracleA candidate oracle that the agent proposes in the conversation: the public behavior it would own, its contract as calls and results, and its potential laws (each a "For every" sentence with its authority, and what the probes showed), plus its open questions. The developer approves the laws that the authority decides before the oracle file is written.
probeA small script that calls the real public API with chosen inputs and records what happens. A finding needs one. Probes find the constraints, dynamics, and boundaries that become an oracle's laws and histories.
law statusadopted (has an authority, and a developer approved it; on a shared repository, its maintainers confirm it in review), observed (production does it, nobody has adopted it), or open (a question for the maintainer). Only an adopted law becomes an expected result.
rivalA plausible different law that predicts a different observation for some history.
witnessA history that shows something: that a state is reached, that two laws differ, or that a distinction matters.
distinguishing witnessA legal history where a law and its rival, or two model states, predict different observations.
allowed setThe answers a model accepts where the contract leaves a choice open, such as an order of independent events. The check accepts any member. This is how an oracle keeps an implementation's freedom.
dynamicsHow the result or the state changes with each action or input. The model's rules state them, and the histories vary them.
constraintWhat holds in every history, whatever happens, such as a count that never exceeds its limit. The check tests it at every checkpoint.
boundary conditionAn edge of the domain or the lifecycle (empty, zero, -0, a size limit, at capacity, cleanup), where real behavior and most defects live. Each one needs a constructed history or an open question.
adjacent formA different design that keeps every adopted law: another representation, allowed-set choice, or production structure. Offered so the developer can pick.
oracleThe parts that judge production behavior: law, histories, model, driver, and check.
oracle fileA test file whose tests are oracles. Its name contains oracle.

The parts of an oracleProperty

TermMeaning
historyStarting conditions plus a sequence of actions or events, including timing.
history grammarThe values, actions, constraints, and schedules that can form legal histories: the fast-check arbitrary and its resolver.
planThe concrete actions that resolve(history) gives. The driver runs it, and the model and check read it. It never holds expected observations.
modelThe part that gives the expected result of a plan without production. It is pure. It may read the inputs that the driver recorded in the trace, never production's outputs.
driverThe part that runs a plan through the real production entry point and records observations. It returns nothing, so it cannot decide a verdict.
observationOne recorded public fact, recorded with observe(checkpoint, value). It must be data.
traceThe ordered observations of one history.
checkpointThe exact point where the contract owes an observation.
checkThe part that compares the trace with the model and reports a violation. Only the check can fail a law.
violationA check's report that a history broke a law at a checkpoint.
calibrationA named wrong answer (a corrupted trace or a mutant driver) and the law that must reject it.
campaignOne run of a generated oracleProperty: a fixed-seed test or the random test.
replayRerunning a recorded failure from the command that the failure prints.
shrinkingReducing a failing history while it still fails the same way.
bounded exhaustivenessRunning every case inside stated finite bounds, with an enumerated history source.

Reach

TermMeaning
reachThe declared states that a history entered.
declared stateA state in states. A constructed history must enter it.
measured stateA state in measured. The run reports how often histories enter it, but nothing requires it.
constructed historyA history built from a generated one so that it enters named declared states. Only constructed histories make reach required.
fixed historyA named history, such as a regression. It is not reach.
state probeA production call, probing && globalThis.__oracleProbe?.(name, condition), that reports where production decides to enter a state. Production builds strip it.
probe-only codeThe probe statements and their guard. The gap check does not mutate them.

Gaps

TermMeaning
ownsThe production files or functions an oracle answers for, listed in the owns option of oracleProperty. The gap check judges owned code only. In conversation, an oracle owns a public behavior; its owns list names the functions that produce it.
gap checkThe loop that runs the oracle files against production and against mutants of the owned code. It reports every gap with one instruction.
mutantA small deliberate change to owned production code. Every mutant is deliberately wrong, so do not qualify the word. The original defect is a common mutant to check.
killA mutant that a law rejects through a registered oracleProperty route. A plain test in an oracle file is an unregistered kill, and it does not count.
survivorA mutant that no law rejects. Every survivor is a gap.
gapOwned behavior that the oracles do not judge. It closes only when a law kills it or the code is removed.
exitAny reasoning that puts a gap out of reach: calling a mutant equivalent or unobservable, or accepting a gap. None is allowed.
framework bugA gap that no kill or removal can close. The agent stops work on that gap and reports its key and evidence.
exclusion controlORC-004's control: a nearby invalid history that the grammar rejects. It is required, and distinct from a quiet exclusion, which is a finding.
dead codeCode whose removal no legal history can observe. Remove it.
invalid mutantA mutant that no oracle could possibly detect. The framework must not generate one, so meeting one is a framework bug to report. The author never decides that a mutant is invalid, and the label does not close a gap.
failing lawA test of an oracle file that fails with no mutant active, or a test of a describe whose beforeAll or afterAll fails. It judges nothing: the gap check leaves it out per test, as it leaves out a nondeterministic test, and keeps its reach. The file's passing tests still judge.
broken owner fileAn owner file that fails outside its tests: it does not load, or a file-level hook fails. It judges nothing, and another owner file's passing tests still judge the mutants they share.
blockedA mutant that no deterministic passing owner test reached, held by its owners' failing laws that reached it or by owner files that judge nothing. Its directive names them, and the report is provisional.
unownedProduction code that no oracle owns. The gap check reports it as a warning, not as judged.
REDThe extended oracle failing on unchanged production. It shows that the oracle can see the defect.
GREENThe same oracle passing after the change.

There is no "equivalent mutant" and no "unobservable effect". A survivor shows a missing history, observation, or law, or dead code. An effect that no check sees is an effect that the driver does not record.

Model alignment rule

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

  1. If it represents a production concept, use the 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.

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