KPI frozen contracts and maintenance#

This page is for maintainers who change KPI workloads, the bundle generator (benchmarks/kpi/reference_fixtures/), contract files or measurement code. It covers the contract files that freeze the nine workloads, the Linux AArch64 qualification files, pin refresh, the validation receipts KPI accepts, the measurement identity, the tests and goldens, the source map and the reviewed static-analysis annotations. The KPI glossary defines the KPI terms used here, such as workload, base workload, bundle, budget, package, validation receipt, controller and driver.

KPI workloads and metrics describes what each workload measures and lists its expected values. Representative fixture stages generates and inspects the bundles. Consumer terms such as backend, ovstage, OpenUSD, SDK archive and Suite API keep their consumer meaning.

Run the examples on this page from ovclash/ with the Python test venv that --validate creates, a CPython 3.12 environment. This page calls it $TEST_PY:

TEST_PY=_build/deps/venv/python_tests/bin/python3

On Windows, use set "TEST_PY=_build\deps\venv\python_tests\Scripts\python.exe" and "%TEST_PY%". Save a multi-line snippet to a .py file in ovclash/ and run it with "%TEST_PY%" -B <file>, where <file> is the name you saved it under. $TEST_PY is not the KPI input Python $PY of the quick start. Generate bundles only with $PY, because the pins match only the bytes it writes.

Frozen workloads and profiles#

The contract files under benchmarks/kpi/ are the only authority for expected work. A candidate build (the build under measurement), a prepared run directory or a result receipt cannot replace them. No command writes them, CI included: a job reads them from its checkout, and a maintainer edits them from reviewed evidence, never from values learned in a candidate run.

File

Format

Holds

Read on

reference_fixtures/recipe.json

identifier and integer version

The recipe identity of the bundles

Every platform

representative_expectations.json

ovclash-kpi-representative-expectations-v1

The recipe source. For body-representative and cockpit-representative: the bundle and root.usda pins and the static, dynamic and suite-save workload rows

Every platform

representative_extensions.json

ovclash-kpi-representative-extensions-v1

The three extension workload rows, the reviewed Clearance reference and a 65-sample depth reference

Every platform

representative_depth.json

ovclash-kpi-representative-depth-v1

The pins and schedule of the dedicated depth bundle and its 10-sample depth reference

Every platform

representative_arm_expectations.json, representative_arm_clearance_expectations.json, representative_arm_depth_expectations.json

ovclash-kpi-representative-runtime-expectations-v1, ovclash-kpi-representative-runtime-clearance-expectations-v1, ovclash-kpi-representative-runtime-depth-expectations-v1

Reviewed overlays for Cockpit Static, Cockpit Clearance and Body Dynamic depth

linux-aarch64 only

recipe.json holds exactly these two fields, in at most 1,024 bytes of UTF-8 JSON:

Field

Type

Required

Default or values

Description

identifier

string

Yes

Nonempty; currently reference-fixtures-v1

The recipe name

version

integer

Yes

1 or greater

The recipe version. Bump it for any change to generated bytes; see refresh pinned fixture identities

A contract file may hold at most 256 KiB. representative_expectations.json has these fields, each required, and the loader refuses any other field. A profile’s queries array holds its three base workload rows:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

Contract schema

format

string

Yes

ovclash-kpi-representative-expectations-v1

Contract format

source

object

Yes

The recipe identity that bundle.source_identity() returns: policy, sha256, recipe

Binds the contract to recipe.json

seed_evidence

object

Yes

Review provenance; no check reads its previous_* fields

Where the expected work came from

profiles

array

Yes

Exactly two objects: body-representative, then cockpit-representative

One entry per bundle

profiles[].profile

string

Yes

body-representative or cockpit-representative

The bundle name

profiles[].bundle

object

Yes

path (<profile>/bundle/bundle.json), sha256 and closure_digest, both lowercase SHA-256 hex

The bundle pin; the closure digest is defined in bundle manifest and seal

profiles[].entry

object

Yes

path (root.usda) and sha256

The pin of the stage’s root layer

profiles[].queries

array

Yes

Exactly three rows, static, dynamic, suite-save, in this order

The base workload rows

queries[].id

string

Yes

static, dynamic or suite-save

The base workload of the profile

queries[].settings

object

Yes

Every one of the 34 canonical run settings; for suite-save, every native Suite run-settings field

The complete frozen settings of the query

queries[].scope

object

Yes

a and b: arrays of unique absolute prim paths, possibly empty

The two search sets

queries[].timeline

object

Yes

dynamic (boolean), start_seconds, end_seconds, time_codes_per_second (numbers) and sample_count (integer), all matching the time settings

The sample schedule

queries[].stats

object

Yes

nb_meshes, nb_shared_meshes, nb_cooked_meshes, nb_point_clouds: nonnegative integers

The native mesh statistics

queries[].expected

object

Yes

The compact expectation; see expected-work identity

The expected work

queries[].volume

object

Yes

report_bytes, or logical_blob_bytes for suite-save: an integer from 0 to 64 GiB

The expected report or Suite BLOB volume

representative_extensions.json must list exactly these one-setting changes, in this order; extension references gives the fields of the whole file. MEDIUM is the max_local_depth_mode value 2 of the canonical API: a refinement of the fast MINIMAL estimate of maximum local depth.

Workload

Base workload

Changed setting

benchmark-body-representative-dynamic-depth

Body dynamic

max_local_depth_mode: 2 (MEDIUM)

benchmark-cockpit-representative-static-clearance

Cockpit static

tolerance: 0.75

benchmark-body-representative-duplicates-only

Body static

only_find_duplicates: true

Rounded values in the documentation never replace the exact values in these files. Dynamic sample times follow the runtime’s binary64 recurrence (benchmarks/kpi/sample_grid.py): start at the first time and add 1.0 / rate while the time stays at or below the end. Both endpoints of the ordinary and depth schedules are samples:

"$TEST_PY" -B -c "from benchmarks.kpi.sample_grid import native_sample_times as t; print(len(t(0.0, 2.0, 32.0)), len(t(0.0, 1.125, 8.0)))"
65 10

Contract composition#

representative_workloads.frozen_contract() builds the contract for one runtime axis in this order:

  1. Read representative_expectations.json. Its source must equal the current recipe identity.

  2. Validate representative_extensions.json against the digest of the base contract. Append the three extension workload rows.

  3. On linux-aarch64 only, overlay the Cockpit Static and Clearance qualifications.

  4. Replace the extension’s 65-sample dynamic-depth row with the row derived from representative_depth.json.

  5. On linux-aarch64 only, overlay the depth report volume.

The runtime axis comes from the wheel tag of the build: win_amd64 is windows-x86_64, a Linux x86_64 tag is linux-x86_64, and a Linux aarch64 tag is linux-aarch64.

Run this check after every contract edit, from ovclash/ with $TEST_PY. It validates every file and binding, and it raises a ValueError with a fixed message at the first stale one:

"$TEST_PY" -B - <<'EOF'
from benchmarks.kpi import representative_workloads as rw

for axis in ("windows-x86_64", "linux-x86_64", "linux-aarch64"):
    contract, digest = rw.frozen_contract(kind=rw.CURRENT_FORMAT, runtime_axis=axis)
    workloads = sum(len(profile["queries"]) for profile in contract["profiles"])
    print(f"{axis:15} {workloads} workloads  {digest}")
EOF

A passing check prints one line per runtime axis and exits 0. With the current files, it prints the digests that tests/python_tests/test_kpi_representative_runtime_contract.py pins:

windows-x86_64  9 workloads  d0462a2cff47dcb5306b85b979a22ce0f8dae70c9a97c4c4dfee656b77209b24
linux-x86_64    9 workloads  d0462a2cff47dcb5306b85b979a22ce0f8dae70c9a97c4c4dfee656b77209b24
linux-aarch64   9 workloads  bedbc0ee4807f033c992298df84b770aa3e0e7407bd532973dcbed10a0c5e566

Preparation#

representative_workloads.prepare_manifest(destination, *, build_path) turns a build manifest into a prepared run. Generate the bundles shows how to call it. It never runs the product and never asks a candidate build for expected results. It:

  1. creates destination, which must not exist, and copies the build manifest into it;

  2. validates the build against the build checks of this section, including every file hash;

  3. derives the runtime axis and the frozen contract for it;

  4. writes copies of the three contract files. On Linux AArch64, the expectations copy carries the Cockpit Static qualification;

  5. generates the bundles body-representative, cockpit-representative and body-representative-depth. Each generated bundle.json SHA-256, closure digest (see bundle manifest and seal) and root.usda entry must equal its pin;

  6. reads the contract again. It must not have changed during generation;

  7. writes generation.json and the run manifest representative-workloads.json.

Private execution tree shows the resulting layout.

The build checks require:

  • an ovstage or openusd build with configuration Release and a dependency pin for that backend;

  • verified source (source.verified is true). A dirty source of uncommitted changes is measured only in a local diagnostic check; budget creation and calibration export require source.dirty to be false (see source identity);

  • installed provenance, the ovclash-build-provenance.json of the install tree, that matches the manifest’s source, backend, build type and backend version (see build provenance);

  • install and binding roots without undeclared native or binding modules;

  • installed native files that match the SDK archive byte for byte, bindings that match the wheel, and exactly one primary library shared by both.

The ovstage SDK archive does not contain the ovstage runtime files. For those files, KPI rebuilds ovclash-runtime-closure.json, ovclash-runtime-dependencies.json and requirements.txt from the installed bytes with the producer’s own serializer. The SDK archive members must have the same SHA-256. tests/python_tests/test_kpi_runtime_metadata_producer.py keeps that serializer equal to scripts/prepare_sdk.py.

During measurement, every child reports the native and binding modules it loaded, before and after the operation. Each must be a declared file of the build with its declared SHA-256, and the native list must include the primary ovclash library.

Message

Cause

KPI builds require ovstage or OpenUSD Release

Another backend or configuration

representative work requires verified Release source

An unverified source tree: a Git probe failed at build time

representative contract or fixture recipe source differs

recipe.json changed, but source in representative_expectations.json did not

generated representative bundle differs from frozen bytes

Generated bundle bytes differ from the pins: another Python version or a generator change

generated representative entry differs from frozen bytes

The generated root.usda differs from its pin

representative expected work changed during generation

A contract file was edited while the bundles were generated

The run controller re-reads the prepared copies. A copy that differs from the checked-in file fails with run cannot replace frozen representative expectations, or the matching message for the extensions and the depth reference.

Expected-work identity#

The compact expectation (ovclash-kpi-benchmark-expectation-v1) is the expected object of a workload row. Every field is required unless marked otherwise, and the reader refuses any other field:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

Expectation schema

format

string

Yes

ovclash-kpi-benchmark-expectation-v1

Expectation format

query

object

Suite-save rows only

Absent from the other rows

The saved Suite query metadata that the Suite database must hold

identity

object

Yes

Exactly the nine fields identity.*

The work identity

identity.overlaps

integer

Yes

0 to 250,000

Overlap pairs

identity.duplicates

integer

Yes

0 to 250,000; with overlaps, at most 250,000 pairs

Duplicate pairs

identity.records

integer

Yes

overlaps to overlaps times the sample count, at most 4,000,000

Pair records over all samples

identity.elements

integer

Yes

At least records

Sum of the element counts of all records

identity.sample_records

array of integers

Yes

One entry per sample, each at most overlaps, summing to records

Records per sample

identity.pair_types

object

Yes

{"0": overlaps}, or {} without overlaps

Pairs per overlap type

identity.sample_grid_sha256

string

Yes

Lowercase SHA-256 hex; must match the timeline

Hash of the exact sample times

identity.membership_sha256

string

Yes

Lowercase SHA-256 hex

Hash of every pair with its type and each of its (sample, elements) rows

identity.duplicates_sha256

string

Yes

Lowercase SHA-256 hex

Hash of the duplicate pair inventory

Because membership hashes each pair’s samples and element counts, missing, extra or shifted work fails even when the totals match. KPI also checks the native mesh stats, the report volume of the canonical API (report_bytes), the Suite logical BLOB volume (logical_blob_bytes) and the saved Suite query metadata (expected.query). The Cockpit Static workload row, for example:

{
  "expected": {
    "format": "ovclash-kpi-benchmark-expectation-v1",
    "identity": {
      "duplicates": 10,
      "duplicates_sha256": "a8ff0cb91752236ad76f8adc6a23160e9f7f9889ffb1180385a1dd994aac4a88",
      "elements": 217321,
      "membership_sha256": "17944fa31adde2cdab19cadeb336e75961762e942efccc7698946f4d937f961a",
      "overlaps": 3027,
      "pair_types": {"0": 3027},
      "records": 3027,
      "sample_grid_sha256": "af5570f5a1810b7af78caf4bc70a660f0df51e42baf91d4de5b2328de0e83dfc",
      "sample_records": [3027]
    },
    "schema_version": 1
  },
  "volume": {"report_bytes": 6883872},
  "stats": {"nb_cooked_meshes": 1270, "nb_meshes": 1642, "nb_point_clouds": 0, "nb_shared_meshes": 372}
}

A mismatch fails the attempt as a product failure (exit 1; see reports and verdicts). Its recorded reason names each differing field, for example:

controller replay: benchmark membership_sha256 differs; benchmark report volume differs

A changed mesh statistic adds selected geometry differs for nb_meshes (or the other stats field). These checks do not validate geometric payloads; Sentinel owns correctness. The physical SQLite file length is the database_bytes metric, not an expected value, because it differs between platforms. The contract files supply no timing, budget or approval.

Workload digests#

Every workload row has a workload digest. Budgets, coverage and calibration match workloads by this digest. It covers the whole row except run provenance: the stage and bundle paths, the run manifest, the build digest and the measurement-identity hash are left out. So the same frozen workload compares different builds, and a code edit keeps installed packages usable. Packages identify a workload only by its ID and workload digest; they hold no producer revision and no measurement digest.

Each row binds the recipe identity, its bundle and entry digests, its settings, scope, timeline, expected work and the digest of its contract. A contract edit changes these digests:

Changed file

Workload digests that change

reference_fixtures/recipe.json

All nine

representative_expectations.json

All nine

representative_extensions.json

Dynamic depth, Static clearance and duplicates-only

representative_depth.json

Dynamic depth

representative_arm_expectations.json

All nine, on Linux AArch64 only

representative_arm_clearance_expectations.json

Dynamic depth, Static clearance and duplicates-only, on Linux AArch64 only

representative_arm_depth_expectations.json

Dynamic depth, on Linux AArch64 only

A Python source file

None; see measurement identity

After a digest changes, installed packages no longer cover that workload. Check mode then runs no workload and exits 3 with the reason Compatible baseline coverage is unavailable; no workload executed. until new packages are installed; see stale packages.

Nine-workload contract#

The nine workloads form one frozen set. Eight run on the Body and Cockpit bundles. Dynamic depth runs on its own full-motion Body bundle. The nine workloads and their settings list their schedules and settings.

The run manifest has schema 3 and format ovclash-kpi-representative-run-v3; run admits no other manifest. Inside it, the six base workload rows keep the marker kind ovclash-kpi-representative-run-v2 and bind the base contract digest. The three extension rows carry ovclash-kpi-representative-run-v3. These are row kinds, not manifest formats. The extension rows never relabel the six base workloads.

Extension references#

representative_extensions.json binds the base contract (base_expectations_sha256) and holds two references. Each reference’s query_binding_sha256 hashes the derived workload row’s id, settings, scope, timeline and stats, not its bundle. A reference names no commit of the source history: the build and artifact digests identify the producer, and the file is published source. Every field is required, and the loader refuses any other field:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

File schema

format

string

Yes

ovclash-kpi-representative-extensions-v1

File format

base_expectations_sha256

string

Yes

Lowercase SHA-256 hex: the digest of representative_expectations.json

Binds the base contract

queries

array of objects

Yes

Exactly the three rows of the one-setting table in frozen workloads and profiles, in its order. Each row holds profile, id, base_query and settings, the changed setting only

The extension inventory

clearance_reference

object

Yes

A reference with expected and volume

The reviewed Clearance reference

depth_reference

object

Yes

A reference with expected and no volume

The 65-sample depth reference

Both references hold these fields:

Field

Type

Required

Default or values

Description

status

string

Yes

verified

The review state; any other value fails the load

backend

string

Yes

openusd

The producer backend

build_digest

string

Yes

Lowercase SHA-256 hex

The validated OpenUSD Release producer

summary_sha256, geometry_review_sha256, validation_receipt_sha256

string

Yes

Lowercase SHA-256 hex

The digests of the reference’s review artifacts

query_binding_sha256

string

Yes

Lowercase SHA-256 hex; equal to the binding of the derived row

Binds the reference to the workload row

expected

object

Yes

Clearance: a compact expectation; see expected-work identity. Depth: a depth descriptor; see depth rows

The expected work

volume

object

Clearance only

report_bytes: an integer from 0 to 64 GiB

The expected report volume

  • The Clearance reference supplies the expected work and report volume of Static clearance.

  • The 65-sample depth reference validates the extension definition only. The 10-sample reference in representative_depth.json replaces it, and its counts are never reused.

  • Duplicates-only needs no reference. It keeps the 353 Body duplicates and expects no pairs, records, elements or report bytes.

The references are regression references, not an independent mathematical oracle for the full scene, MEDIUM depth included. They define expected work only and approve no budget.

Depth bundle#

benchmarks/kpi/representative_depth.py generates the depth bundle and derives its workload row. Its constants are pinned data: DURATION_SECONDS = 1.125, SAMPLES_PER_SECOND = 8.0 and the recipe identifier representative-depth-v1. The depth bundle uses the common recipe identity, like the other bundles. KPI checks it three times:

  • the fixture descriptor in representative_depth.json must match the constants, the bundle path and the current recipe source;

  • preparation requires the generated bundle.json SHA-256, closure digest and root.usda to match the pins;

  • admission of a prepared run requires the recipe identifier, duration and probe rate in the bundle metadata.

The depth query_binding_sha256 includes the fixture descriptor. It changes whenever the depth bundle pins change. The 10/65 sample ratio is a workload reduction, not a runtime claim.

representative_depth.json holds these fields. Every field is required, and the loader refuses any other field:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

File schema

format

string

Yes

ovclash-kpi-representative-depth-v1

File format

status

string

Yes

verified

The review state

backend

string

Yes

openusd

The producer backend

build_digest

string

Yes

Lowercase SHA-256 hex

The validated OpenUSD Release producer

summary_sha256, geometry_review_sha256, validation_receipt_sha256

string

Yes

Lowercase SHA-256 hex

The digests of the review artifacts, which are not in the repository

query_binding_sha256

string

Yes

Lowercase SHA-256 hex

The binding of the depth workload row: id, settings, scope, timeline, stats and fixture

fixture

object

Yes

The fixture descriptor below

The depth bundle pins and schedule

membership_expected

object

Yes

A compact expectation; see expected-work identity

The expected membership of the 10 samples

expected

object

Yes

A depth descriptor; see depth rows. Its records, pairs and sample_grid_sha256 equal the membership’s

The expected depth stream

volume

object

Yes

report_bytes: an integer from 0 to 64 GiB

The expected report volume

The fixture descriptor holds these fields, all required:

Field

Type

Required

Default or values

Description

source

object

Yes

Equal to the current recipe identity, policy, sha256 and recipe; see refresh pinned fixture identities

Binds the descriptor to recipe.json

bundle

object

Yes

path (body-representative-depth/bundle/bundle.json), sha256 and closure_digest (lowercase SHA-256 hex)

The bundle pin

entry

object

Yes

path (root.usda) and sha256 (lowercase SHA-256 hex)

The pin of the stage’s root layer

duration_seconds

number

Yes

1.125

The motion duration, DURATION_SECONDS

probe_samples_per_second

number

Yes

8.0

The sample rate, SAMPLES_PER_SECOND

Depth rows#

The depth reference pins a compact membership, a report volume and a packed depth stream. The stream benchmark-depth.bin holds one 20-byte little-endian <IIQf row per record:

Field

Type

Meaning

Pair index

uint32

Index in the canonical pair order

Sample index

uint32

Index in the exact sample grid, strictly increasing per pair

Element count

uint64

The record’s elements, at least 1

Depth

float32

Native maximum local depth, finite and nonnegative

The reference describes the stream with this descriptor. Every field is required, and the reader refuses any other field:

Field

Type

Required

Default or values

Description

format

string

Yes

ovclash-kpi-depth-expectation-v1

Descriptor format

schema_version

integer

Yes

1

Descriptor schema

row_format

string

Yes

<IIQf

The Python struct format of one row

records

integer

Yes

1 to 300,000

Rows in the stream, one per record

pairs

integer

Yes

1 to records, at most 250,000

Pairs in the canonical pair inventory

sample_grid_sha256

string

Yes

Lowercase SHA-256 hex

Hash of the exact sample grid

pair_inventory_sha256

string

Yes

Lowercase SHA-256 hex

SHA-256 of the canonical JSON of the pair inventory

sha256

string

Yes

Lowercase SHA-256 hex

SHA-256 of the whole stream

For the 10-sample depth reference:

{
  "format": "ovclash-kpi-depth-expectation-v1",
  "pair_inventory_sha256": "bc90df85414fa4da4b48bc46ffe87fa81e7d3a7ce2f8e04191e5b1ac2cd5648b",
  "pairs": 4221,
  "records": 21959,
  "row_format": "<IIQf",
  "sample_grid_sha256": "22c3e08251405b571d1fb4ee229ac9eb01bd269e66a7caa8bfbd3f3116b49045",
  "schema_version": 1,
  "sha256": "0414182c810e80192ee3ff1eecfaf380a0ac0d32689a3c379d325416f71a1aa6"
}

Replay reads every row and checks it against the pair, sample and element membership. Then the SHA-256 of the whole stream must equal sha256. The digest covers every byte, so it also pins zero depths and the sign of a zero. Aggregate depth totals or approximate comparisons cannot replace this check. To read a retained stream, save this script as read_depth.py in the directory that holds benchmark-depth.bin, an attempt directory of a retained private execution tree (see attempt directories), and run it there with "$TEST_PY" -B read_depth.py, giving $TEST_PY as an absolute path. It needs only the Python standard library:

import struct
from pathlib import Path

data = Path("benchmark-depth.bin").read_bytes()
rows = list(struct.iter_unpack("<IIQf", data))  # (pair, sample, elements, depth)
print(len(rows), rows[0])

Depth timing#

MEDIUM computation runs inside the timed pipeline. The child copies the depth metadata after result_ready, outside timed report extraction and the operation and memory boundary. It requests no extra report payload. After the child’s cleanup, the controller reads and validates the real rows before it qualifies the observation. Calibration evidence carries receipts of the depth content (byte count and SHA-256), not the rows. Its offline reader checks those receipts and the work contract without rehashing absent rows.

Why Linux AArch64 has its own expectation files#

KPI work checks are exact: metadata and report volume must equal the frozen reference, with no tolerance. The native Linux AArch64 Release build finds the same pairs and samples as x86-64. For a few records, however, it reports slightly different element counts or report geometry, such as other outline segment counts. For the Cockpit Static borderline pair, the cause is architecture-specific SDK quaternion-to-matrix arithmetic.

The check is not loosened. Each difference was captured on AArch64, compared with the x86-64 reference and pinned exactly in an AArch64-only file. The review object of each file records the comparison evidence and the digests of the captured artifacts. Rules for these files:

  • Each file binds the contracts it overlays, so a changed reference invalidates it.

  • They name no commit, CI job or pipeline. The build and artifact digests identify the captures, and the loaders refuse any other review field.

  • x86-64 contracts and their digests never read them.

  • They supply no timing observation or budget (timing_baseline: false).

  • OpenUSD and ovstage results must be identical. One same-platform OpenUSD capture is the AArch64 reference, and the ovstage run must reproduce it.

  • Local Windows validation does not qualify Linux or AArch64.

AArch64 loader requirements#

The loader accepts a file only when its proof is complete:

File

Overlays

Loader requires

representative_arm_expectations.json

Cockpit static: membership_sha256 and report_bytes

base_contract_sha256, bundle and entry bind the current base contract and Cockpit bundle. Pair, sample and duplicate keys are equal. Exactly 8 changed records, each by one element, net zero. Each changed record’s report delta equals 4 bytes per changed face index plus 24 bytes per changed outline segment, and the deltas add up to the volume change (4 bytes fewer)

representative_arm_clearance_expectations.json

Cockpit static-clearance: elements, membership_sha256 and report_bytes

Besides base_contract_sha256, bundle and entry, it binds extension_contract_sha256 and query_binding_sha256. Pair, sample and duplicate keys are equal. Exactly 7 changed records with a net change of +6 elements. Exactly 80 report rows that change only outline segments, -17 in total (408 bytes fewer). The matrix comparison is recorded with numerical_equivalence_proven: false

representative_arm_depth_expectations.json

Body dynamic-depth: report_bytes

base_contract_sha256, depth_contract_sha256 (the digest of representative_depth.json), bundle and entry of the depth bundle. expected_sha256 and membership_sha256 equal the reference’s, so rows and membership are unchanged. At least three deterministic OpenUSD runs. report_byte_delta is a nonzero multiple of 4 that equals the volume change (24 bytes more)

AArch64 file fields#

The three files share one top-level layout. Each loader requires exactly the fields its file column marks, and refuses any other field:

Field

Type

Required

Default or values

Description

schema_version

integer

All three

1

File schema

format

string

All three

The file’s format from frozen workloads and profiles

File format

runtime_axis

string

All three

linux-aarch64

The only axis that reads the file

profile

string

All three

cockpit-representative (Static, Clearance) or body-representative (depth)

The bundle of the overlaid row

query

string

All three

static, static-clearance or dynamic-depth

The id of the overlaid workload row

base_contract_sha256

string

All three

Lowercase SHA-256 hex

Digest of representative_expectations.json

extension_contract_sha256

string

Clearance

Lowercase SHA-256 hex

Digest of representative_extensions.json

query_binding_sha256

string

Clearance

Lowercase SHA-256 hex

The query binding of the Static clearance row

depth_contract_sha256

string

Depth

Lowercase SHA-256 hex

Digest of representative_depth.json

bundle, entry

object

All three

Equal to the bundle and entry pins of the overlaid row

Binds the file to the bundle

expected_membership_sha256

string

Static, Clearance

Lowercase SHA-256 hex

The AArch64 membership_sha256

elements

integer

Clearance

The reference’s elements plus 6

The AArch64 element total

expected_sha256, membership_sha256

string

Depth

Equal to the depth reference’s sha256 and membership_sha256

Proof that rows and membership are unchanged

report_bytes

integer

All three

0 to 64 GiB; equal to the reference volume plus the proven byte change

The AArch64 report volume

review

object

All three

Proof fields that the loader fixes

The comparison evidence

AArch64 review fields#

The review of the Static and Clearance files holds the per-record proofs that AArch64 loader requirements describes. The Required column names the files whose review holds the field; the loader refuses any other field:

Field

Type

Required

Default or values

Description

reference_backend

string

Static, Clearance

openusd

The backend of the reference capture

scope

string

Static, Clearance

Nonempty

What the qualification covers and does not prove

timing_baseline

boolean

Static, Clearance

false

The file supplies no timing observation

native_sha256

object

Static, Clearance

ovstage and openusd: lowercase SHA-256 hex each

The native digests of the two producers

reference_summary_sha256, paired_summary_sha256

string

Static, Clearance

Lowercase SHA-256 hex; equal

The summary digests of the OpenUSD reference capture and of the paired capture

pair_keys_equal, sample_keys_equal, duplicates_equal

boolean

Static, Clearance

true

Pair, sample and duplicate keys equal the x86-64 reference

changed_metadata_rows

array of objects

Static, Clearance

Exactly 8 rows (Static) or 7 (Clearance), one per changed record

The element proofs; see the row fields below

changed_report_rows

array of objects

Static, Clearance

Static: one row per changed record. Clearance: exactly 80 rows

The report-volume proofs; see the row fields below

mathematical_correctness_claimed

boolean

Clearance

false

No geometric correctness is claimed

scalar_metadata_equal, nonmatrix_payload_equal, raw_repeats_equal, canonical_repeats_equal, native_cleanup_verified, report_cleanup_verified, process_cleanup_verified, private_cleanup_verified, original_windows_summary_equal, original_windows_volume_equal, full_nine_inventory_verified

boolean

Clearance

true

The capture, cleanup and Windows-reference checks

helper_sha256, paired_evidence_sha256, artifact_validation_sha256, comparison_sha256, windows_native_sha256, windows_observation_sha256

string

Clearance

Lowercase SHA-256 hex

The digests of the review artifacts that the field names

reference_nonmatrix_payload_sha256, paired_nonmatrix_payload_sha256

string

Clearance

Lowercase SHA-256 hex; equal

The report payloads without the matrices

portable_manifest_sha256, producer_context_sha256, provenance_sha256

object

Clearance

ovstage and openusd: lowercase SHA-256 hex each

The input and producer digests of the two captures

original_reference

object

Clearance

The clearance_reference of representative_extensions.json without status, expected, volume and query_binding_sha256

Binds the original x86-64 reference

matrix_comparison

object

Clearance

Exactly matrix0_different_records: 3585, matrix1_different_records: 3605, records_with_difference: 3610 and numerical_equivalence_proven: false

The recorded matrix differences, which KPI does not treat as work

Each changed_metadata_rows row holds these fields, all required:

Field

Type

Required

Default or values

Description

pair_sha256

string

Yes

Lowercase SHA-256 hex, unique in the list

The changed pair

reference_elements, actual_elements

integer

Yes

Static: 0 or more. Clearance: 1 to 2^64 - 1

The element count on x86-64 and on AArch64

element_delta

integer

Yes

actual_elements - reference_elements. Static: 1 or -1, net zero over the rows. Clearance: nonzero, +6 over the rows

The element change

reference_metadata_sha256, actual_metadata_sha256

string

Yes

Lowercase SHA-256 hex

The record metadata on x86-64 and on AArch64

records_equal, samples_equal

boolean

Yes

true

The pair’s records and samples are unchanged

Each changed_report_rows row holds these fields, all required:

Field

Type

Required

Default or values

Description

pair_sha256

string

Yes

Lowercase SHA-256 hex, unique in the list. Static: a pair of changed_metadata_rows

The changed pair

sample

integer

Yes

0

The sample of the record

reference, actual

object

Yes

Static: faces0, faces1, outline_segments, source_points0, elements and source_points_canonical_side (0 or 1). Clearance: faces0, faces1, outline and points0 (0). Nonnegative integers

The report buffer counts on x86-64 and on AArch64

delta

object

Static

The nonzero differences of actual minus reference; no point change

The count changes

outline_delta

integer

Clearance

Nonzero: actual.outline - reference.outline, -17 over the rows; the other counts are equal

The outline-segment change

report_byte_delta

integer

Yes

Static: 4 bytes per changed face index plus 24 per changed outline segment. Clearance: 24 * outline_delta

The report-volume change of the record

The depth review has these fields, all required:

Field

Type

Required

Default or values

Description

reference_backend

string

Yes

openusd

The backend of the reference capture

build_digest

string

Yes

Lowercase SHA-256 hex

The OpenUSD Release producer

runs

integer

Yes

3 or more

Captures that agree

deterministic, depth_rows_equal, membership_equal

boolean

Yes

true

The capture checks

report_byte_delta

integer

Yes

A nonzero multiple of 4, equal to report_bytes minus the reference volume

The proven volume change

record_attribution

string

Yes

pending

Which record carries the change; not attributed

timing_baseline

boolean

Yes

false

The file supplies no timing observation

scope

string

Yes

Nonempty

The scope of the capture

Counts and saved stage sizes lists the resulting AArch64 values. Each loader records the file’s digest in seed_evidence of the composed contract (runtime_qualification, runtime_clearance_qualification or runtime_depth_qualification). See workload digests for the digests each file affects.

For depth, the rows and membership are identical; only the full report is 24 bytes larger. The repository does not hold the x86-64 per-record cardinalities, so the record that carries those bytes is unknown. The file therefore records record_attribution: "pending", the only value its loader accepts.

Re-qualify Linux AArch64#

Re-qualify after a native change, or when an AArch64 KPI check reports a size or membership difference that x86-64 does not.

Before you begin, you need:

  • x86-64 still matching its reference. When it does not, the reference itself changed: that needs new reviewed references, as in refresh pinned fixture identities, not an AArch64 qualification. Stop here in that case.

  • A Linux AArch64 machine with a clean OpenUSD Release build and an ovstage Release build of the same committed source, each with its validated Release inputs; see prepare Release inputs. A build that fails stops the procedure; see troubleshooting.

  • $TEST_PY in ovclash/ of a checkout with that source.

Each kind of difference needs its own proof:

Difference

Proof

Only the Dynamic depth report volume, with identical expected.sha256 and membership

A volume-only qualification: the byte delta in the depth file’s review

Any other difference

A reviewed proof for each changed record, in the changed_metadata_rows and changed_report_rows of the Static and Clearance files; see AArch64 review fields

Two results stop the procedure, because nothing can be pinned:

  • Captures that disagree with each other. Investigate the nondeterminism instead.

  • An ovstage check that observes other values than the OpenUSD captures. Both backends must give identical results, so investigate the difference between them instead.

Then:

  1. Capture the affected workload with the OpenUSD build on the AArch64 machine at least three times.

  2. Check that all captures agree with each other.

  3. Compare the captures with the x86-64 reference.

  4. Record the proof that the difference needs, as the proof table of re-qualify Linux AArch64 gives it.

  5. Confirm that an AArch64 ovstage check observes the same values as the OpenUSD captures.

  6. Update the overlaid values in the AArch64 file.

  7. Update the file’s review: the scope of the capture, the build and artifact digests, the runs and the byte delta; AArch64 review fields lists every field. The file keeps sorted keys and two-space indentation.

  8. Run the contract check. It passes when it prints the three axis lines and exits 0; a ValueError names the stale binding.

  9. Re-pin the AArch64 digests in tests/python_tests/test_kpi_representative_runtime_contract.py.

  10. Run that test with "$TEST_PY" -B -m unittest discover -s tests/python_tests -t tests/python_tests -p test_kpi_representative_runtime_contract.py. The qualification is complete when it reports OK.

The AArch64 workload digests then change, so the AArch64 budgets of those workloads must be collected again.

Refresh pinned fixture identities#

The recipe identity is the canonical JSON of benchmarks/kpi/reference_fixtures/recipe.json and its SHA-256:

"$TEST_PY" -B -c "import json; from benchmarks.kpi.reference_fixtures import bundle; print(json.dumps(bundle.source_identity()))"
{"policy": "recipe-version", "sha256": "f33e9e5c9e368758758ad615e186e873a38c492e9bcfcdc7813af80fdaf20e85", "recipe": {"identifier": "reference-fixtures-v1", "version": 1}}

Python source hashes belong only to the measurement identity. Comment, docstring and formatting edits therefore need no pin refresh. Any change to the generator, profile, geometry or motion output requires a version bump in recipe.json, also for profiles without pins. Changed generated bytes fail preparation even without a bump.

For an intentional recipe change, work from ovclash/ of a source checkout. Before you begin, you need the KPI input Python $PY of staged Release inputs (see prepare Release inputs) and the Python test venv $TEST_PY that --validate creates. A change to geometry or motion also needs new reviewed references from a validated OpenUSD Release build. Each later pin file binds the digest of an earlier one, so update the files in the order of the refresh steps.

Refresh decisions#

Three refresh steps depend on what the change affects. Candidate results never supply replacement expectations. The expected work:

Geometry or motion

Action

Unchanged

Keep every expected value

Changed

Update the expected work of the affected workload rows from the new reviewed references

The files that the tests pin. A test that passes needs no update:

Failing test

File to update

test_kpi_representative_workloads.py

tests/python_tests/kpi_representative_prepare_golden.json

test_reference_fixture_body_representative_cut.py, when the Body output changed

The Body pins in that test

Each committed package of the affected workloads, in the same change; see stale packages:

CPU model of the package

Action

You can run a collection on it

Regenerate the package from a fresh collection; see collect a baseline

You cannot

Remove the package. Check mode on that CPU model then exits 3 until a new package is installed

Refresh steps#

  1. Bump version in recipe.json.

  2. Regenerate all three bundles with $PY, the packaged CPython 3.12; see generate and retain stages. generate prints each bundle’s manifest_sha256, which is its bundle pin sha256. Another Python writes other bytes, and preparation then fails with generated representative bundle differs from frozen bytes.

  3. Read the new closure digest and root.usda SHA-256 of each bundle. For the Body bundle:

    "$TEST_PY" -B -c "import json, sys; m = json.load(open(sys.argv[1], encoding='utf-8')); print(m['closure_digest'], next(x['sha256'] for x in m['members'] if x['path'] == m['entry']))" _build/reference-fixtures/body-representative/bundle.json
    
    5d7e7c425598b3fff2dad8fa67f8550523b38eb7133c886718b134ba3316f2ca c5b4925e7920c6bf3d94cff29a1dd869ce0ca0ee270eaa6d481342e588e198f4
    

    For the other bundles, replace body-representative in the path with cockpit-representative and body-representative-depth.

  4. Review the changed stage bytes.

  5. Settle the expected work as the expected-work table of refresh decisions gives it.

  6. In representative_expectations.json, update source and each profile’s bundle.sha256, bundle.closure_digest and entry.sha256.

  7. Print the digests that the remaining pin files bind. The output changes with each file you update, so print it again before you update each file:

    "$TEST_PY" -B - <<'EOF'
    from benchmarks.kpi import evidence, representative_depth as depth, representative_workloads as rw
    
    base = evidence.load_json(rw.FROZEN)
    reference = evidence.load_json(depth.REFERENCE)
    print("base contract       ", evidence.digest_json(base))
    print("extension contract  ", evidence.digest_json(evidence.load_json(rw.EXTENSIONS)))
    print("depth contract      ", evidence.digest_json(reference))
    print("depth query binding ", depth.query_binding(depth.query_template(base, reference["fixture"])))
    EOF
    
    base contract        048f496e7d36ebfc8fbae1adb76693bf700338aa4144940e1783ec9488f7c909
    extension contract   4863d166364ced5410aee4c818ec49483689dde4d5cdac462d545c8b748e1b92
    depth contract       4683123c45b9651b46cfabeeb5e35e757687ec92f58083db5dd3bf0bac809802
    depth query binding  b57fe491fa50278cfd9130e7108f084e3441eb8ad5409aa60a6c59b60d623a98
    
  8. In representative_extensions.json, set base_expectations_sha256 to the base contract digest.

  9. In representative_arm_expectations.json, set base_contract_sha256 to the base contract digest.

  10. Copy the Cockpit profile’s bundle and entry pins of representative_expectations.json into bundle and entry of representative_arm_expectations.json.

  11. In representative_arm_clearance_expectations.json, set base_contract_sha256 and extension_contract_sha256 to the base and extension contract digests.

  12. Copy the Cockpit profile’s bundle and entry pins into bundle and entry of representative_arm_clearance_expectations.json.

  13. In representative_depth.json, update fixture.source, fixture.bundle.sha256, fixture.bundle.closure_digest, fixture.entry.sha256 and query_binding_sha256.

  14. In representative_arm_depth_expectations.json, set base_contract_sha256 and depth_contract_sha256 to the base and depth contract digests.

  15. Copy fixture.bundle and fixture.entry of representative_depth.json into bundle and entry of representative_arm_depth_expectations.json.

  16. Run the contract check until it passes. The first stale binding names itself:

    Message

    Field to update

    representative contract or fixture recipe source differs

    source in representative_expectations.json

    representative extensions base contract differs

    base_expectations_sha256

    ARM representative qualification differs from frozen work

    base_contract_sha256 of the AArch64 Static file

    ARM representative fixture binding differs

    bundle or entry of the AArch64 Static file

    ARM clearance qualification differs from original authority

    base_contract_sha256 or extension_contract_sha256 of the AArch64 Clearance file

    ARM clearance fixture or query binding differs

    bundle, entry or query_binding_sha256 of the AArch64 Clearance file

    independent depth fixture source, path or schedule differs

    fixture.source in representative_depth.json

    depth reference query differs

    query_binding_sha256 in representative_depth.json

    ARM depth qualification differs from original authority

    base_contract_sha256 or depth_contract_sha256 of the AArch64 depth file

    ARM depth fixture binding differs

    bundle or entry of the AArch64 depth file

  17. Update the frozen-contract digests in tests/python_tests/test_kpi_representative_runtime_contract.py.

  18. Run the KPI and reference-fixture tests with the commands of tests and goldens.

  19. Update the files of the failing tests, as the failing-test table of refresh decisions gives them.

  20. Settle each committed package of the affected workloads, as the package table of refresh decisions gives it.

  21. Run test_kpi_preflight.py, which holds CommittedCatalogTests, with "$TEST_PY" -B -m unittest discover -s tests/python_tests -t tests/python_tests -p test_kpi_preflight.py. The refresh is complete when it reports OK.

Some values stay unchanged in a refresh:

  • The AArch64 depth file keeps expected_sha256, membership_sha256 and report_bytes; only its bindings change.

  • The Clearance and 65-sample depth bindings in representative_extensions.json, and the query_binding_sha256 of the AArch64 Clearance file, exclude the bundle.

  • In representative_depth.json, summary_sha256, geometry_review_sha256 and validation_receipt_sha256 identify review artifacts that are not in the repository. A refresh that keeps the generated stage bytes carries them over unchanged.

  • seed_evidence of representative_expectations.json stays unchanged. No check reads its previous_* fields.

Supported workflows#

KPI requires the passing validation receipt of the same build. --validate writes it as validation_receipt.json in the compile tree, and the driver selects it during input preparation (prepare_build() in scripts/kpi_ci.py), for check mode and for baseline collection. Prepare inputs explicitly gives the trees it reads and what happens when no receipt, a non-passing receipt or more than one passing receipt matches.

The controller takes the receipt with run --validation-receipt PATH; the driver passes the copy it selected. A run without that option reports Same-build workflow validation receipt is missing. and exits 3.

The receipt must name the build’s provenance digest, backend and configuration. It must list the build’s native closure and the SDK archive and wheel artifacts with their SHA-256. KPI reads these fields and refuses any other:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

Receipt schema

kind

string

Yes

ovclash-validation-receipt

Receipt kind

backend

string

Yes

The build’s backend, ovstage or openusd

Producer backend

configuration

string

Yes

The build’s configuration, Release for KPI

Producer configuration

provenance_sha256

string or null

Yes

SHA-256 of the build’s ovclash-build-provenance.json; null only in a RUNNING receipt that has not recorded it yet

Binds the receipt to the build

status

string

Yes

PASS, FAIL or RUNNING

Overall result

expected_steps

array of strings

Yes

Unique, nonempty step names

The validation plan

steps

array of objects

Yes

One per executed step, each named in expected_steps once

Step results

steps[].name

string

Yes

A name from expected_steps

Step name

steps[].status

string

Yes

PASS, FAIL, SKIP, NOT_RUN or SIMULATED

Step result

steps[].consumer_check_type

string

Yes

Nonempty, for example validation-step

Step type

steps[].elapsed_s

number

Yes

Finite, 0 or more

Step time in seconds

native_files

array of objects

Yes

path (normalized relative path) and sha256 (lowercase SHA-256 hex); equal to the build’s native closure, and nonempty unless the receipt is RUNNING

Installed native files

artifacts

array of objects

Yes

path (a unique file name) and sha256; must hold the build’s SDK archive and wheel unless the receipt is RUNNING and lists none

Packaged artifacts

signing_policy

object

No

mode (auto, on or off), protected_ref (boolean or null) and simulated (boolean)

The producer’s signing policy; see accepted signing skips

Its steps decide the result of run --validation-receipt:

Receipt state

Result

Exit code it adds to the campaign

Receipt FAIL, or any step FAIL

product-failure

1

A required step is missing, NOT_RUN, SIMULATED or SKIP (except an accepted sign_sdk skip), or the receipt is RUNNING

insufficient-evidence

3

Every required step PASS

pass

0

The product-failure and insufficient-evidence rows apply only to a direct run. Through the launchers, CI and baseline collection, preparation rejects a non-passing receipt with exit 4, so only a pass receipt reaches the controller. Reports and verdicts lists every exit code.

Accepted signing skips#

A sign_sdk step with status SKIP and type validation-step in a PASS receipt is accepted in two cases:

  • Not applicable. One of these holds, and the summary lists the step in not_applicable_steps:

    • the bound closure has lib/libovclash.so and no .dll, .exe or .pyd file in its native or binding inventory;

    • the build is OpenUSD, and the receipt records signing_policy with mode auto or off and simulated: false, on any ref.

  • Permitted development skip. The closure contains PE files (Windows Portable Executable files: .dll, .exe or .pyd), and the receipt records signing_policy with protected_ref: false, mode auto or off, and simulated: false. The summary lists the step in permitted_skip_steps.

A local Windows ovstage receipt with a permitted skip looks like this, with <seconds> in place of the measured step time:

{
  "kind": "ovclash-validation-receipt",
  "backend": "ovstage",
  "configuration": "Release",
  "status": "PASS",
  "signing_policy": {"mode": "auto", "protected_ref": false, "simulated": false},
  "steps": [
    {"name": "sign_sdk", "status": "SKIP", "consumer_check_type": "validation-step", "elapsed_s": <seconds>}
  ]
}

The same SKIP on a build with PE files gives these results:

signing_policy

Result

{"mode": "auto", "protected_ref": false, "simulated": false}

pass (permitted development skip)

protected_ref: true or null (unknown ref)

insufficient-evidence

simulated: true

insufficient-evidence

mode: "on" (signing required)

insufficient-evidence

No signing_policy

insufficient-evidence

scripts/validation_receipt.cmake records the policy of the producer build. Inside signing_policy, all three fields are required:

Field

Type

Required

Default or values

Source

mode

string

Yes

auto, on or off

OVCLASH_CODESIGN

simulated

boolean

Yes

true or false

OVCLASH_CODESIGN_SIMULATE

protected_ref

boolean or null

Yes

true, false or null

true or false from a defined OVCLASH_CI_REF_PROTECTED. Without it, the CI provider adapter in tooling/ci_providers/ supplies the ref state, unless OVCLASH_CI_PROVIDER or OVCLASH_CI_JOB_ID declares a provider-neutral context. Any other or missing value records null, an unknown ref, which never permits a skip

Ref protection reaches KPI only through this receipt field: the CI context that the KPI scripts read (tooling/ci_context.py) holds no ref state. Locally, OVCLASH_CI_REF_PROTECTED=false records an unprotected ref; see prepare Release inputs. run_kpi.bat sets it for its automatic preparation when no CI or ref-protection variable is set. The environment of the machine that imports the receipt cannot grant the skip. Applicability follows the bound artifact closure, the backend and the producer policy, not the OS that reads the receipt.

Authenticode signing is a publication requirement, and OpenUSD SDK archives are never published. Code signing describes when a build signs. An OpenUSD build can still sign when credentials and repo_codesign are available; that sign_sdk=PASS stays a PASS.

An accepted skip changes only the result. The raw SKIP, the step counts and the pass fraction stay unchanged. A permitted skip proves neither a signature nor release qualification: release_gate_complete is always false.

A compile or link check is not runtime execution. Validation qualifies only its declared checks. KPI adds no relocation, GPU, sanitizer or full-release claim. Sentinel runs keep their own correctness evidence and are not KPI prerequisites.

Measurement identity#

Two digests record which code measured a campaign. Neither is stored in a committed file.

Digest

Hashes

Used for

execution.measurement_digest()

The bytes of every *.py under benchmarks/kpi/ (subdirectories included) and tooling/; MEASUREMENT_VERSION (ovclash-kpi-v1); with empirical admission, the admission policy name

The campaign summary and every observation

benchmark_workloads.measurement_identity()

The UTF-8 text of benchmark_workloads.py, representative_workloads.py, representative_extensions.py, representative_depth.py, representative_depth.json, the three representative_arm_*.json files, benchmark_summary.py, benchmark_execution.py, benchmark_depth.py, benchmark_session.py, runtime_provenance.py, operations.py, sample_grid.py, correctness.py, pipeline_steps.py, run_settings.py and strict_json.py in benchmarks/kpi/; every *.py under benchmarks/kpi/reference_fixtures/

measurement_sha256 in the run context, the workload markers and the bundle generation receipts

The measurement digest is checked in three places:

  • When the campaign ends, a changed digest adds exit 4 with Measurement implementation changed during the campaign.

  • Calibration export refuses a campaign whose sources changed while it ran: measurement source changed during the campaign.

  • Budget derivation requires one digest for all its observations. Calibration from before and after an edit cannot be pooled.

Any edit to a hashed file, even to a comment or a label, therefore starts a new measurement identity. These executed files are not hashed: the driver scripts scripts/kpi_*.py, and the SDK archive dependency contract scripts/runtime_dependencies.py, which build-manifest verification imports. Neither digest changes a workload digest (see workload digests), so installed packages stay valid. Pool only campaigns that ran from the same sources.

To see the current values:

"$TEST_PY" -B -c "from benchmarks.kpi import benchmark_workloads, execution; print(execution.measurement_digest()); print(benchmark_workloads.measurement_identity())"

The command prints two 64-digit hexadecimal digests. They change with every edit to a hashed file.

Ordinary tests and dedicated workloads#

build_ovstage.* --validate and build_openusd.* --validate run the ordinary product checks. They do not run the full Body and Cockpit KPI workloads, full-profile bundle generation or the Sentinel checker tests. Small synthetic geometry, statistics, retries, formatting and bounded launcher and cleanup integrations stay in ordinary tests. Dedicated KPI runs measure the nine frozen workloads against their matching validated Release producer.

The opt-in target test_kpi_full_fixtures runs tests/kpi_tests/. The folder holds only these four checks; the ordinary KPI tests stay in tests/python_tests/ (see Tests and goldens). The four checks generate full profiles and compare their inventories:

  • the original and the cut body-representative, each with the pinned Body root.usda digest;

  • the Body fine cut;

  • the Cockpit mesh allocation against its triangle-budget search.

The tasks run one at a time with a 1,860-second timeout each. The target builds install_sdk first. validate_all never runs it. Run it from ovclash/. BUILD_DIR names an existing configured build tree, such as the Release tree of a build_ovstage --release build; see backends and trees.

Linux:

cmake -DBUILD_DIR=_build/compile/ovstage/ninja -DTARGET=test_kpi_full_fixtures -DCONFIG=Release -P scripts/build_target.cmake

Windows:

_build\deps\target-deps\cmake\bin\cmake.exe -DBUILD_DIR=_build/compile/ovstage/vs -DTARGET=test_kpi_full_fixtures -DCONFIG=Release -P scripts/build_target.cmake

The command exits 0 when the build and all four checks pass. It fails with:

  • No configured build tree at <path> (CMakeCache.txt is missing) when BUILD_DIR names no configured tree. Build that backend first, or name another tree.

  • Build failed (exit code: <code>) when install_sdk or one of the four checks fails, including a check that exceeds its timeout. Read the output printed before that line for the failure.

No ordinary test regenerates the real bundles, and no test compares the bundle digests with their pins. A check without compatible budget coverage stops before generation. After a change to the bundle generator, regenerate the three bundles with the KPI input Python $PY and compare their digests with the pins; see generate and retain stages.

Tests and goldens#

The KPI tests are tests/python_tests/test_kpi_*.py and tests/python_tests/test_reference_fixture_*.py. They are pure Python and need no native build. Platform-specific tests skip on other systems. The test_reference_fixture_*_native.py tests run only with OVCLASH_KPI_REFERENCE_GEOMETRY_NATIVE=1 and a configured runtime. Run them from ovclash/ with $TEST_PY:

"$TEST_PY" -B -m unittest discover -s tests/python_tests -t tests/python_tests -p "test_kpi_*.py"
"$TEST_PY" -B -m unittest discover -s tests/python_tests -t tests/python_tests -p "test_reference_fixture_*.py"

Each command reports OK when its tests pass. The full KPI set takes many minutes. While you iterate, run one module, for example -p test_kpi_representative_runtime_contract.py. Baseline collection tests lists the modules that cover the collection files, selection and publication.

File

What it pins

Refresh when

test_kpi_representative_runtime_contract.py

The frozen-contract digests, x86-64 and AArch64

A contract file or an AArch64 qualification changes

test_reference_fixture_body_representative_cut.py

ORIGINAL_ROOT_SHA256, the Body root.usda digest, and the full Body inventory that test_kpi_full_fixtures checks

The Body recipe output changes

kpi_representative_prepare_golden.json

The prepare_manifest output of the synthetic deployment in kpi_representative_fixture.py: file list, generation receipts and contract-file digests

Its test fails after a recipe, contract-format or preparation change

kpi_budget_package_goldens.json

Synthetic budget create and generated packages and a campaign selection (proposal, review, score), used by test_kpi_budget_cli.py and test_kpi_generated_baseline.py

The package format, the limit formulas or the selection changes

test_kpi_preflight.py (CommittedCatalogTests)

Every committed package still covers each current cell of its lane

A workload, metric, policy or format change while packages are committed

test_kpi_benchmark_workloads.py

The exact file list of measurement_identity()

A listed file is added, renamed or split

test_kpi_ci_context.py

Every tooling/ci_providers/*.py file is part of measurement_digest()

Nothing to refresh; it fails when a provider file leaves the digest

test_kpi_execution.py (MeasurementIdentityTests)

measurement_digest() covers nested reference-fixture recipes, the four benchmark helpers in benchmarks/kpi/ (correctness.py, pipeline_steps.py, run_settings.py, strict_json.py) and tooling/, and ignores benchmarks/backend_timings/ and tests/sentinel; benchmarks/kpi imports no other benchmark package, and benchmarks/__init__.py, which every KPI child runs unhashed, holds only its docstring

Nothing to refresh; it fails when a measurement source leaves the digest

test_kpi_runtime_metadata_producer.py

KPI rebuilds the external runtime metadata exactly as scripts/prepare_sdk.py writes it

Either serializer changes

test_validation_scope.py

test_kpi_full_fixtures and test_sentinel_checkers stay outside validate_all

The validation plan changes

test_kpi_publication_goldens.py (CurrentReleaseGoldenTests)

The public record projected from a synthetic Release campaign (PROJECTION), its SHA-256 (PROJECTION_SHA256) and its console summary (EMIT)

The public projection or the console summary changes. Update the three constants together

All these files are in tests/python_tests/. Byte-pinned outputs, such as review.txt, package bytes and the private summary, must not be reworded for readability. Their goldens and the review replay compare them byte for byte.

Source map#

Modules without a directory are in benchmarks/kpi/; the launchers are in ovclash/. Each module’s docstring states its role. The KPI harness code map lists the boundaries that a code change to the main controller modules must keep.

Launchers and driver#

Module

Role

run_kpi.sh, run_kpi.bat

Launchers: default inputs, automatic preparation, then the driver, run by the input Python with -I -B

scripts/kpi_startup.py

Decides whether the launchers must prepare the default Release inputs, and whether the diagnostic validation plan applies

scripts/kpi_windows_job.py

On Windows, outside CI, relaunches the driver with CREATE_BREAKAWAY_FROM_JOB before any KPI work or timer starts when its parent Job allows breakaway and is not the CI supervisor Job, and stays when Windows puts the relaunched driver back into the same Job; see Supervisor Job

scripts/kpi_ci.py

Driver: check mode, settings block, input preparation and receipt selection (prepare_build()), fixture generation and exit mapping

scripts/kpi_collect.py

collect-baseline: preparation and fixture generation once per collection, campaigns, selection and publication

scripts/kpi_preflight.py

Budget coverage check from build and CPU-topology metadata, before fixture generation. Check mode calls check_coverage(); baseline collection calls observe()

scripts/kpi_diagnostics.py

Mode and baseline lookup lines

scripts/kpi_outputs.py

Output directories of a driver command line

scripts/kpi_job_summary.py

The private job summary

Controller#

Module

Role

__init__.py

The package; defines MEASUREMENT_VERSION

__main__.py, cli.py

python -m benchmarks.kpi and its subcommands

execution.py

One campaign (run()) in check or collect-baseline mode: the campaign flow, the profiles, the workload and measurement digests, row qualification and the verdicts. It decides whether a collection workload is granted a restart. Re-exports the names of attempt.py, admission_guard.py, cpu_placement.py, campaign_budgets.py and campaign_retry.py

attempt.py

One owned child attempt (measure_one()): launches child.py, drains it and verifies its result

runner.py

The attempt loop (execute_inventory()): CPU retries, noise-adaptive sampling and the workload restarts that execution.py grants. Journals every attempt to attempts.jsonl and writes summary.json, metrics.csv and report.md. Imports no ovclash runtime

campaign_budgets.py

Approved-budget selection, adaptive smoke and the CPU-availability advisory

campaign_retry.py

Which rows a workload restart may supersede, and why a collection campaign may be retried

child.py

The measurement child. It starts with the build’s interpreter and -I -B, loads the build’s bindings, runs empirical admission when the policy asks for it, and records the runtime it loaded

operations.py

The public-API operations each workload times

benchmark_execution.py

Runs one canonical or Suite operation in the child and checks its compact work in the controller

benchmark_summary.py

Compact pair, sample and element summaries

benchmark_depth.py

MEDIUM depth row capture, retention and replay

benchmark_session.py

Admits bundle bytes for one session: hashes the selected bundles when the session begins and again at its close, after every writer has drained. Attempts check task tickets instead of rehashing

exit_codes.py

Maps a campaign summary to its exit code

failure_reporting.py

Bounded failure explanations

Sampling and CPU admission#

Module

Role

noise_sampling.py

The current sampling policy: the warm-up and noise gate (evaluate_warmup()), the run, attempt, CPU-retry and restart limits, each metric’s noise limit, and the final series of a restarted workload

noise_reporting.py

Noise-gate explanations, for display only

sample_grid.py

The dynamic sample grid

environment.py

Load policies, CPU load admission before an operation (admit()), the cohort capabilities, and the observation of the operation process’s load and memory up to result-ready (EnvironmentMonitor), with the Linux and Windows counter adapters

empirical_admission.py

Recorded-contention admission on shared runners and its replay from raw samples

cpu_allocation.py

CPU topology discovery, four-physical-core selection and affinity

cpu_placement.py

Four-core placement discovery for a campaign (_select_cpus) and the checks that a CPU-rejected attempt may be retried (cpu_retryable)

admission_guard.py

The campaign’s CPU placement and its reuse, the selection receipts, the stop reason and the shared CPU-wait allowance (_AdmissionGuard)

cpu_pool.py, cpu_identity.py

CPU pools of the observed cores, and the OS-reported CPU model identity

cpu_recovery.py

Replay of retained pre-run CPU evidence before a retry, and the proof of a pre-run clock-alignment rejection that lets a collection restart a workload

cpu_diagnostics.py

Bounded diagnostics of the controller’s CPU stages; they never change a verdict

contention.py

The recorded CPU contention of one attempt, replayed and projected into the attempt row and the public record; metadata only, never a verdict

windows_pdh.py

Windows per-CPU load frames from raw Performance Data Helper (PDH) counters

Workloads and fixtures#

Module

Role

representative_workloads.py

Contract composition, preparation and recorded-workload checks

representative_extensions.py

The three extension workload rows

representative_depth.py

The depth bundle and its reference

benchmark_workloads.py

Run-manifest admission, workload rows and measurement_identity()

fixture_bundle.py

Bundle manifests and closure digests

reference_fixtures/

The bundle generator package and its generate, inspect and measure commands; see its package layout

reference_capture.py, reference_census.py, reference_geometry.py, reference_intersection.py

Saved-bundle reading, the structural census, the geometry oracle and exact triangle intersection

Evidence, budgets and diagnostics#

Module

Role

evidence.py

Evidence validation, build manifests, validation receipts and digests

prepare.py

Build manifests from installed artifacts (prepare)

runtime_provenance.py

Loaded-runtime evidence

calibration.py

Runtime-free calibration evidence: export and offline validation

publication.py

The owned file I/O: the public record writer (Publisher), the private execution tree (ExecutionOwner) and after_script(), which prints the summary of a saved record. Re-exports the names of publication_schema.py, publication_projection.py and publication_console.py

publication_schema.py

The closed public schema and its strict reader, validate_public()

publication_projection.py

The projection of controller facts onto the public record (project(), progress_fields())

publication_console.py

The final console summary of a saved record (emit()) and the check that a record is a final saved pass (verified_pass())

comparison_bar.py

The percent columns and the position bar, centred on each budget’s baseline value, of saved comparisons, shared by the console summary and the job summary of scripts/kpi_job_summary.py

progress.py

Live console progress

startup_settings.py, console_style.py, campaign_context.py

The startup settings block, console colors and display-only campaign context

budgets.py

Proposed budgets for budget create from admitted calibration observations (derive_portable_budget()), never their approval, and the comparison of a candidate with compact budgets (compare_candidate())

compact_budget.py

Compact CPU-model package documents: creation, the CPU model key, and validation that recomputes each warning and failure limit from the retained statistics

budget_package.py, budget_catalog.py

budget create packages and catalog loading

baseline_selection.py

Campaign selection for a generated series (scan_campaigns()) and the pooled statistics, noise and budgets of the selected campaigns (pooled_statistics())

baseline_campaigns.py, baseline_series.py, baseline_files.py

Collection campaigns, generated series and atomic publication

observer_study.py, observer_protocol.py

Observer-overhead diagnostics

Shared benchmark helpers#

KPI owns these helpers. benchmarks.backend_timings imports them from benchmarks.kpi, and KPI imports nothing from backend_timings, so a change to that driver leaves the measurement identity unchanged.

Module

Role

correctness.py

Canonical result fingerprints, installed-runtime provenance checks and native step labels. Imports no native runtime

pipeline_steps.py

The canonical native pipeline of a static or sampled timeline: timeline validation, step validation and the sample count of the reference recurrence

run_settings.py

The 34 canonical run settings, their validation, and how a child applies them to ovclash.ClashRuntime and checks the readback

strict_json.py

Strict JSON reading (unique keys, finite numbers, encodable strings) and the exact-type field checks

KPI also uses shared repository tooling.

Reviewed static-analysis annotations#

SonarQube is the static-analysis service that scans this code. A NOSONAR comment marks a line whose finding a reviewer accepted, so SonarQube does not report it; the rule key in parentheses names the accepted rule. The measurement-identity sources, and the benchmarks.backend_timings benchmark that shares their helpers, carry rule-specific annotations at reviewed operations, not file-wide exclusions. They document existing trust boundaries. They do not change runtime guards or claim that a finding was resolved on the SonarQube server.

Annotation and source

Reviewed boundary

NOSONAR(S2083) at load_json, sha256_file and the archive open in _archive_hashes in benchmarks/kpi/evidence.py, and at file_sha256 in benchmarks/kpi/operations.py

Read-only local files: operator-selected artifacts, controller-bound stage paths, owned outputs or contained package members. Build artifacts may live outside the manifest directory. Path normalization, containment and size and hash checks stay with their owning readers. The child matches its stage locator to the controller argument on its own

NOSONAR(S5042) at the tar reader in _archive_hashes in benchmarks/kpi/evidence.py

The reader bounds parser and metadata access, member count, declared and decoded bytes, and XZ decoder memory. It hashes members without extracting them to filesystem paths

NOSONAR(S2245) at _token and _triangles in benchmarks/kpi/reference_fixtures/plan_model.py

A seeded random.Random produces public fixture names and a repeatable triangle allocation. Neither creates secrets or makes security decisions

NOSONAR (pythonsecurity:S6680) at the attempt loop of iter_run_schedule in benchmarks/backend_timings/matrix.py, outside the measurement identity

_validate_schedule_capacity() bounds repeats to the uint32 run_ordinal domain before the loop starts

NOSONAR(S4828) at _PosixGroup.alive() and _PosixGroup.terminate() and in _owned_linux_child in tooling/process_tree.py

Signals reach only the dedicated process group that the owned child created, or the kernel-listed children of the Linux subreaper. Signal 0 only checks existence. No process is selected from command input or an unrelated inventory

NOSONAR(S5443) at _remove_linux_rstring in tooling/process_tree.py

The path names a Carbonite RString IPC object, a shared-memory name or semaphore (carb-RStringInternals-*) that the ovstage parser can leave behind, of one exact, exited, owned PID under /dev/shm. The function only unlinks it, and only when the effective user owns it

An annotation-only edit under benchmarks/kpi/ or tooling/ changes the measurement identity but not the nine workload digests. New annotations follow the Python code style.