Expand description
The largo test runner core.
Studio-reusable: everything here is CLI-independent. The runner discovers
## Test blocks in a parsed program, executes each in a FRESH interpreter
world (fixture pollution is structurally impossible), applies the
constitution’s semantics — Expect records-and-continues, Expect this to fail fails on success, Expect output: compares byte-exact, deterministic
op budgets, loud skips — and renders a DETERMINISTIC report (name-ordered,
byte-identical across -j N; the golden in test_runner_lock.rs).
Structs§
- Inventory
- The whole inventory: every classified claim plus its rolled-up summary.
- Inventory
Item - ONE classified claim in the inventory.
- Inventory
Summary - The rolled-up census the inventory carries alongside its items — the internally-consistent counts (examples + properties + theorems + axioms + admitted == claims; proven ⊆ properties + theorems).
- Property
Info - The
For allproperty a test exercised, if any — its domain (for bound disclosure) and how many variables it quantified (for the exhaustion bound). - Proven
Claim - A theorem/axiom claim handed to the inventory by the prove path. Kept tiny so
the CLI’s
Outcome/prove report can map onto it without a dependency cycle. - RunReport
- The whole run, name-ordered (report order is part of determinism).
- Test
Config - Runner configuration.
- Test
Outcome - One executed (or skipped) test.
- Tier
Summary - A machine-readable census of which EXECUTION TIERS a
largo testrun actually exercised — the runner’s answer to G14’s “a green run must be legible about what it proved”. The tree-walking interpreter is the always-on reference tier (every## Testruns on it); the bytecode VM tier is a cross-tier VALIDATOR that only runs under--tiers all, and when it does, each test’sTierEvidencesays whether the VM agreed, refused, or diverged. Derived purely from the report, so the census can never drift from the evidence it summarizes.
Enums§
- Claim
Kind - The KIND of a claim — the top-level partition the inventory reports over.
- Claim
Status - The honest per-item status.
- Property
Domain - The finite domain a
For allproperty quantified over, with the concrete bound the runner actually enumerated/sampled — the disclosure that keeps a green property from silently meaning “unbounded proof” (G13-full). Carried on theTestOutcomeso the inventory can classify a property honestly. - Rank
- The earned rank of a run — a ladder computed from EVIDENCE, never self-declared. The higher rungs (COVERED/HARDENED/PROVEN/BATTLE-READY) require coverage, mutation, proofs, and the full inspection, which light up as those waves land; the runner computes the base rungs honestly today.
- Tier
Evidence - Cross-tier evidence for one test under
--tiers all(footgun F18): what the bytecode VM did with the test’s computation, machine-readable in the JSON report. Absent (NoneonTestOutcome::tier) when the guard did not run — evidence is never invented. - Verdict
- One test’s verdict.
Functions§
- render_
fitness - Render the fitness report (§1.12) — the last block of every run: the earned rank and the evidence behind it, with the next rung named.
- render_
report - Render the human report — deterministic, golden-locked (
test_runner_lock). - render_
report_ json - Render the machine report (
--format json). - render_
test_ inventory_ json - Render the
largo test --jsoninventory document: the classified claims plus their summary, the seed, and the raw outcomes (so a consumer keeps both the classification and the underlying detail from one call). - render_
tier_ summary - Render the machine-readable tier census as ONE greppable line, mirroring the
LOGOS_VALIDATORS_RAN:convention the Rust suite uses for external validators. A CI/release gate grepsLOGOS_TIERS_RAN:to see, at a glance, which execution tiers a greenlargo testactually exercised — the interpreter always, the VM cross-tier validator only under--tiers all. When the VM validator was OFF, the line says so explicitly (vm=off), so a fast default run never masquerades as having proven cross-tier agreement it never ran. - run_
tests - Discover and execute every
## Testinsource. Each test runs in a fresh interpreter world; the report is deterministic and name-ordered. - run_
tests_ with_ launcher run_tests, with a livecrate::page_host::RemotePageLauncherso a MOUNTED test’sTestConfig::page_tierscan also exercise aBrowsercandidate — the seamlargo test --browsercalls through once a real one exists (apps/logicaffeine_cli/src/browser/**).Nonereports aBrowsercandidate astier: refused, never a silent skip.- tier_
divergence - Compare one test computation’s run on the interpreter against its run on
the bytecode VM — the
--tiers allcomparison, PURE so it is unit-lockable with synthetic divergent inputs. Both outputs are newline-joined lines (the shared engine convention), compared byte-for-byte in FULL; error text is compared exactly; the outcome class (clean vs errored) falls out of the error comparison. ReturnsNoneon agreement, or the divergence bundle.