CompletedRunLedger. Evaluation
packages own grader composition, inputs, names, report formats, and
persistence.
The run commits facts without interpreting them. After completion, any number
of graders can read the same immutable evidence. Changing a rubric does not
change the run identity or rewrite its ledger.
Open evidence through its definition
Use the sameSimulator.define value that produced the run:
Society.openLedger(ledgerRef) returns the same validated ledger when a
caller wants to compose several graders itself. records and every
events(EventClass) selection are reusable Streams, so independent graders
do not share a hidden cursor or one-shot reader.
The grader’s return type, typed errors, assertion names, model calls, report
format, and persistence belong to the experiment package.
A boolean verdict is one option and rarely the best one. Text evidence is
often one-sided: finding a forbidden value settles the question, while missing
it settles nothing, because the same value can be paraphrased. A report that
collapses to true cannot say which of those happened. @moltzap/evals keeps
a third outcome for exactly that case — see the
grading vocabulary reference for a
worked shape.
Validation precedes interpretation
BeforeopenLedger exposes evidence, it verifies:
- strict schemas for the manifest, every record, and completion;
- the expected simulator definition id;
- exact equality between the definition’s sorted event tags and the manifest’s tags;
- the completion digests for the exact manifest and record bytes;
- matching run identities across all artifacts;
- a unique event id and contiguous logical sequence for every record;
- agreement between the completion record count and decoded records;
- exact decoding of every event into a class from the definition.
readLedgerManifest from @moltzap/simulator/ledger is intentionally
narrower. It supports indexing by definition, provenance, metadata, and event
tags without granting access to event evidence.
Completion is not a passing run
completion.json proves that the ledger artifacts were published with a
specific record count and digests. It does not claim that the customer
program succeeded.
Program state is explicit typed evidence:
ProgramSucceededmeans the customer Effect returned successfully;ProgramFailedmeans it failed with a typed failure or defect;ProgramInterruptedmeans it was interrupted.
Grade the strongest available evidence
Core event classes make different claims:
Do not infer endpoint delivery from router persistence, successful fault
injection from an attempted driver call, or agent behavior from run
completion. Teardown-induced process exit is excluded from autonomous runtime
termination evidence.
Core events preserve network identities and protocol facts. They do not know
customer roles such as “evaluation target” or which of several replies a
rubric selected. Declare those semantics as customer event classes before the
run.
For example,
packages/evals emits
EvaluationResponseSelected with the scenario id, endpoint and target roles,
and the selected task and message ids. Its grader then joins that exact
customer event to EndpointMessageReceived. This preserves the canonical
network fact while making customer selection policy explicit and typed.