Skip to main content

Module sequential

Module sequential 

Source
Expand description

decision-certificate.v1.6 (spec/decision-certificate.v1.6.md): the sequential block, the anytime-valid crossing of each class (§1.3), the exploration draw (§1.7) and the checks beyond the schema (§2.7).

crossed is the spec’s normative recipe: IEEE-754 binary64 + - * / only, in a fixed order, with exact power-of-two renormalisation, so it gives the same bits in this crate, its WebAssembly build and the Python package. No logarithm or exponential is used: their rounding differs between maths libraries.

Structs§

ClassResult
One pre-registered class’s tested units, errors, level δ_c, status count and re-scored units (spec v1.6 §2.2).
Classes
How records are put in classes (spec v1.6 §1.5): none, option or segment.
Draws
Exploration
The exploration draw (spec v1.6 §1.7): its experiment, bucket version, unit, the salt’s commitment sealed before the window and the salt revealed after it.
LabelBasis
LabelResolution
Labels
Label counts over the tested units (spec v1.6 §2.5).
Limits
The pre-registered limits an attempt is refused above (spec v1.6 §2.3).
NoNewsRule
The label a record with no outcome by its horizon takes (spec v1.6 §2.3).
OutcomeSource
Where the outcomes were read (spec v1.6 §2.4): a table and its snapshot.
Pauses
A number of pauses and their total seconds (spec v1.6 §2.3 pause_budget, §2.6 pauses).
Preregistration
The citation of the sealed pre-registration (spec v1.6 §2.3).
Reconciliation
The attempt’s reconciliation (spec v1.6 §2.6): its health artifact, the draws, the unclassifiable units and the tail after the stop.
RecordRange
The records the certificate was computed over (spec v1.6 §2.4).
Sequential
The sequential block of a v1.6 certificate (spec v1.6 §2.2).
StatusCount
Units by their first record’s sealed status (spec v1.6 §2.2), fields in STATUSES order.
Tail

Constants§

BUCKETS
The number of buckets: a rate is a whole number of basis points.
BUCKET_MSG_PREFIX
The draw’s message prefix (bucket_version bp2, spec v1.6 §1.7).
EXPLORE_COMMIT_PREFIX
The salt commitment’s domain-separation prefix (spec v1.6 §1.7).
GRID
The grid of §1.3: qⱼ = alpha · j / GRID for j = 1 .. GRID − 1.
MAX_TESTED
The largest n of one class (spec v1.6 §2.2).
MIN_LEVEL
The least alpha, per-class level delta_c and tail_level a v1.6 certificate may carry (spec v1.6 §2.7): below it, 19 / level or the tail’s ratio can leave binary64’s range and the recipe is undefined.
STATUSES
A record’s sealed status (spec v1.6 §1.1), in the order of a status count (§2.2).

Functions§

crossed
Whether a class with n tested records and errors errors crossed at level delta_c: its grid-mixture test supermartingale is at least 1 / delta_c (spec v1.6 §1.3), by the spec’s recipe. None when the inputs are out of range (errors <= n <= 10^9, alpha and delta_c in MIN_LEVEL, 1)).
explore_bucket
A unit’s bp2 bucket (spec v1.6 §1.7): the first eight bytes of HMAC-SHA-256(salt, "bp2" 0x0A ‖ experiment_id ‖ 0x0A ‖ unit), big-endian, modulo 10000. The unit is selected when the bucket is below the rate in basis points. None unless salt is 64 lowercase hex.
rate_bp
The whole number of basis points r with rate = r / 10000 (one IEEE division), 1 <= r <= 9999, or None.
salt_commitment
sha256: + hex SHA-256("seam.gate.explore.v1" 0x0A ‖ the 32 salt bytes): the commitment sealed before the window (spec v1.6 §1.7). None unless salt is 64 lowercase hex.
tail_trips
Whether the tail monitor trips on n resolved tail units with errors errors at level: its mirrored grid mixture is at least 1 / level (spec v1.6 §1.3). None when the inputs are out of range (errors <= n <= 2^53 - 1, alpha and level in MIN_LEVEL, 1)).