Back to blog

Estimate Replay Work Before You Evaluate

Twelve saved pairs can request 106,496 bootstrap draws. Count overlapping slices, distinguish metric methods, and set the recipient’s allowance before replay.

6 min readInvarLock Team
A folded strip opens beyond the end of a short sleeve, exposing the span that must fit.

Twelve saved pairs do not necessarily mean twelve pairs of replay work. Add two overlapping slices and the same records enter several calculations. Add another numeric metric and the planned bootstrap work doubles—even though no new answers have been collected.

In this small offline example, InvarLock requests 106,496 bootstrap draws for twelve pairs and three metrics. The count includes repeated slice membership, but only two of the metrics consume this allowance. Exact match uses a different interval method.

You can inspect that request with evaluate --preflight --json before scoring or writing evidence. The recipient then chooses a separate allowance for verify. An adequate allowance lets the complete policy be checked; it does not make the result pass.

Count memberships, then the methods that use them

The downloadable example contains authored software-fixture records, adapted from the released classification starter. Its answers, quality scores and latency values are invented inputs for checking software behavior, not model measurements. The policy requests exact answer matching and aggregation of two recorded numeric metrics: quality and latency.

Of the twelve cases, eight have priority: urgent and six have length: long. Four belong to both slices. Each metric applies to the overall set and to each slice.

Table 1: Count memberships, then the methods that use them. Data table with columns: Scope, Pairs, Planned draws
ScopePairsPlanned draws
Overall1249,152
Urgent832,768
Long624,576
Total memberships26106,496

Scroll horizontally to see every column.

Each row charges pairs × 2 numeric metrics × 2,048 repetitions. A draw is one paired case selected in a bootstrap repetition. The four cases in both slices each contribute once to the overall calculation, once to urgent and once to long. Deduplicating them across scopes would undercount the requested work.

The released multi-metric implementation excludes exact_match, normalized_match, numeric_tolerance and json_exact from this bootstrap charge. Those binary metrics still require scoring and interval calculations. A zero charge for a metric does not mean zero computation.

The count is a planned allowance. It does not shrink after seeing constant differences or missing observations. In this fixture, latency differences in the long slice are constant; that interval can avoid resampling, but preflight still reserves its full share. This keeps admission independent of favorable shortcuts in the scores.

Ask before creating the evidence

The reproduction script creates separate demonstration signing keys and recipient trust inputs, then runs the released CLI. With the generated inputs and operator key available, preflight is:

invarlock evaluate request.yaml --signing-key operator.pem \
  --preflight --json

The retained output reports record_count: 12, scope_count: 3 and required_bootstrap_draws: 106496. The default local allowance is 102400000. Preflight returns exit 0 without an evidence directory or a policy decision.

Next, the example asks evaluation to fit into only 100,000 draws:

invarlock evaluate request.yaml --signing-key operator.pem \
  --max-bootstrap-draws 100000 --json

It returns exit 2, explains that the comparison plans 106,496 draws, and writes no pack. A separate instrumented check of the same released comparison function records zero scorer calls before that refusal. The CLI outcome and the scorer-boundary check are retained separately in the package.

An operator allowance of 120,000 permits publication. It is an illustrative choice made before scoring, not a recommended host setting. The evidence contains all nine metric-and-scope results. Evaluation returns exit 0 because it successfully wrote the signed evidence; the recorded policy result is regression.

The recipient has its own allowance

The recipient's reviewed runs, policy and signer pin live outside the submitted pack. The fixture derives those pins from the input files before producing the pack, and uses a separate recipient signing key. A real handoff also needs independent review and an authorized way to obtain the signer fingerprint.

The recipient first allows 100,000 draws. Verification returns exit 2 with reason: local_work_budget_exceeded. Its decision and integrity fields are null, and it issues no receipt. This is incomplete verification, not evidence of a policy failure or corrupted material.

After reviewing the requested work, the recipient allows 110,000 draws:

invarlock verify evidence --trust-profile trust.json \
  --receipt verification.receipt.json \
  --max-bootstrap-draws 110000 --json

The result now says replay_status: completed and integrity_ok: true. It writes a signed receipt, leaves the pack unchanged, and returns exit 7 with decision: regression and policy_verdict: fail.

Why reject when every authored answer matches? The tiny sample leaves a wide interval. For the overall exact-match result, both runs score 1.0 and their difference is zero, but the 95% interval runs from −0.24249 to +0.24249. Its lower bound is below the illustrative allowed regression of −0.20. The two smaller slices also fail that requirement. All six recorded-score results pass. The report shows the individual checks.

Giving replay more capacity resolves the capacity refusal. It leaves the signed comparison policy and its rejection intact.

Plan the handoff, not just the producer job

Before evaluating captured records, list the metrics and slices the recipient will actually check. Run preflight on that complete request, retain its output, and have the recipient review the required work against their own local allowance. Raising the producer's allowance does not change the recipient's limit. Recheck when the case set, metric methods or slices change.

The August 31 article asks whether a new software release preserves expected policy outcomes. Its release-compatibility preflight replays historical references. Here, ordinary captured evaluate --preflight asks whether one planned request fits before scoring. The same word names different checks.

To reproduce this example, install Python 3.12 and invarlock==0.17.4, unpack the download, then run python reproduce.py --output reproduced. The script retains inputs, command output, exit codes, the signed pack and the new receipt. It expects the capacity refusals and the final policy rejection, then removes its temporary private keys. Rendering still runs after exit 7. The command record lets you inspect the observed path without executing it.

Limitations

  • This twelve-pair software fixture establishes its exercised counting, refusal and replay behavior. It supplies no model-quality, latency or sampling evidence; its policy thresholds and local allowances are illustrative.
  • Planned bootstrap draws are not peak-memory, completion-time or billing guarantees. Input and artifact byte limits still apply, and binary scoring consumes work outside this count.
  • The calculation shown is the released deterministic multi-metric captured path. Bounded judge evaluation has separate plan and collection limits; this flag does not budget judge calls. Native runtime limits are separate too.
  • The fixture models separate operator and recipient roles in one local script. Real trust inputs and resource decisions need their own owners. Replay authenticates and recomputes retained evidence; it does not establish the truth of the authored observations.

Sources

Website documentation explains the maintained workflow. This November 30 software demonstration uses the released InvarLock 0.17.4 wheel and source commit 5c926bd91f4a5e125d22d2ee44b4f7a8e99e50c5. The public package retains the authored inputs and observed CLI outputs; the August 31 article retains its original v0.15.0 compatibility evidence.

More in Evaluation

Explore nearby related posts.