Skip to main content

Module batch_qualification

Module batch_qualification 

Source
Expand description

The batching qualification report, rustev.batch-qualification/1 (spec 044, 3.8).

Adapter-scoped batching (spec 009, 3.10.4) is qualified per adapter in two stages. Stage 1 is deterministic and offline: the adapter’s own harness runs every case of Stage1Case over loopback with scripted responses and records each as passed or failed. Stage 2 is live, on synthetic or admitted data only, and pairs each case’s batched answer with its unbatched one. This module holds the report and derives its verdict; it runs no case, performs no I/O and reads no clock.

The verdict is never supplied by the host: BatchQualification::new computes it, and a parsed report whose recorded verdict differs is refused. qualified needs every stage 1 case passed and stage 2 meeting the declared bound over at least the declared minimum; not_qualified records a measured failure; anything else is unknown, so a report without stage 2 is unknown. A report grants nothing: enabling batching stays the owner’s act (R-28).

Structs§

AgreementBound
When a batched and an unbatched answer agree, and how many must.
BatchQualification
A qualification report for one adapter’s batched path.
BatchingConfig
Spec 009 3.10.4’s batching configuration.
Bindings
The adapter’s binding identities with batching on and off. They are equal when the adapter’s identity does not hold the batching switch.
PairedAnswer
One case asked batched and unbatched.
Ratio
numerator / denominator, with 0 < denominator and numerator <= denominator. Integers, so the bound is exact.
Spend
Stage 2’s settlements from the spend journal, in its cost units.
Stage2
Stage 2’s paired answers and what they cost.
Stage1Result

Enums§

Agreement
How one pair of outputs is compared.
Answer
BatchQualificationError
Why a report was refused.
CaseOutcome
Stage1Case
The stage 1 cases (spec 044, 3.8 item 1). The failure classes are spec 003’s, to which spec 009 3.6 maps every remote code.
Verdict

Constants§

BATCH_QUALIFICATION
MAX_PAIRS
The most paired answers one report holds.
MAX_TEXT_BYTES
The most bytes of a name or a failed case’s reason.