Sentinel repository goldens#
Goldens are reviewed typed results that Sentinel compares with the output of the
candidate, the installed SDK under test. They live in
tests/sentinel/goldens/, together with historical SQLite databases that the current reader must
still decode. Ordinary Sentinel runs read the catalog and never change it. Only the goldens
commands on this page write it.
The Sentinel guide describes how a run uses goldens, and its
glossary defines the Sentinel terms used here, such as case, variant,
snapshot, cell, build tuple, shard and tuple file. The
Sentinel reference describes the run’s evidence files. Paths on this
page are relative to the ovclash directory.
What the ZIP files represent#
A golden is the reviewed expected result of one Sentinel case, variant and snapshot, for one set of frozen inputs and one build tuple. Sentinel captures the candidate’s typed result and compares it with that golden. Goldens are neither performance measurements nor the budgets of KPI, the performance benchmark.
The catalog keeps selection separate from storage:
Path in |
Format |
Required |
Contents |
|---|---|---|---|
|
JSON |
Yes |
Root catalog. Lists the input families, the tuple files and |
|
JSON |
One per family that |
Frozen inputs of one case family, such as |
|
JSON |
One per approved build tuple |
The tuple file, for example |
|
JSON |
Yes |
The generating revision and tool and the review reason of each review record. Attribution only. |
|
ZIP |
Each one that a row references |
Immutable typed engine results. One ZIP can serve many rows. |
|
Directory |
One per database entry of |
One historical fixture: |
An engine ZIP holds these members at its root:
Member |
Format |
Required |
Contents |
|---|---|---|---|
|
JSON |
Yes |
The bundle’s |
|
JSON Lines |
Yes |
Expected typed records: field names, types, shapes, nullness, and values or payload references. |
|
Binary files |
No |
Exact binary data that the records reference. |
The scenario folder is the case ID without its engine- prefix, in lowercase, with every run of
other characters replaced by _, at most 64 characters long. For example,
engine-optimization-fresh-schedulers stores its results in
engine/optimization_fresh_schedulers/.
The archive number is a storage label. It is not a revision, a run order or an acceptance order.
A ZIP name does not identify the platform, backend, configuration or variant it serves. Follow the
bundlepath of the golden row.Rows for different variants, schedulers and build tuples share one ZIP when their expected contents are identical. Each row is still approved separately.
Catalog files#
Every catalog file holds exactly the fields that its table lists, and readers reject any other
field. The root manifest.json (schema 2) lists every shard with its revision:
{
"schema_version": 2,
"input_families": [{"family": "options", "path": "inputs/options.json", "revision": 4}],
"expectations": [
{
"axes": {"architecture": "x86_64", "backend": "ovstage", "configuration": "Release", "platform": "linux"},
"path": "expectations/linux-x86_64-ovstage-release.json",
"revision": 5
}
],
"provenance": {"path": "provenance.json", "revision": 33},
"databases": [{"id": "historical-synthetic", "database": "databases/historical_synthetic/historical.ovclashdb", "...": "..."}]
}
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
integer |
Yes |
|
Catalog schema. |
|
array of objects |
Yes |
One per family, each with |
The input family shards. |
|
array of objects |
Yes |
One per approved build tuple, each with |
The tuple file shards. |
|
object |
Yes |
|
The provenance shard. |
|
array of objects |
Yes |
One per historical fixture; see import historical databases |
The historical database entries. |
A shard revision is a positive integer. axes holds exactly platform (windows or
linux), architecture (x86_64 or aarch64), backend (ovstage or openusd) and
configuration (Release or Debug).
A tuple file holds one engine row per approved snapshot:
{
"bundle": "engine/reports_floating_point/result_005.zip",
"case_id": "engine-reports-floating-point",
"id": "engine-0004298dee1c4f3fab05d79dbca50039",
"input": "reports/mesh_static_028",
"provenance": "review_014",
"snapshot": "snapshot_bundles.oracle",
"variant": "mesh-static"
}
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
integer |
Yes |
Equal to the root’s |
Catalog schema. |
|
integer |
Yes |
Equal to the root’s descriptor |
Shard revision. |
|
object |
Yes |
Equal to the root’s descriptor |
The build tuple. |
|
array of objects |
Yes |
The golden rows. |
Each golden row holds:
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
string |
Yes |
Unique in the catalog |
Stable entry identifier. Replacing a golden keeps it. |
|
string |
Yes |
A case ID that |
The case. |
|
string |
Yes |
The case variant. |
|
|
string |
Yes |
Such as |
The snapshot that the row approves. |
|
string |
Yes |
|
The frozen input profile in |
|
string |
Yes |
A path relative to the catalog |
The ZIP that holds the expected typed result. |
|
string |
Yes |
A key of |
The review record. |
An input family file holds common_inputs shared by all its profiles and one entry per profile:
{
"family": "options",
"schema_version": 2,
"revision": 4,
"common_inputs": {"api_surface": "canonical", "state_sequence": "fresh"},
"profiles": {
"any_hit_all_001": {
"derive": ["seed", "task_count", "detection_mode"],
"values": {"fixture": {"generator": "options", "kind": "generated", "recipe": "any-hit-all", "seed": 0, "version": 1}, "...": "..."}
}
}
}
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
integer |
Yes |
Equal to the root’s |
Catalog schema. |
|
integer |
Yes |
Equal to the root’s descriptor |
Shard revision. |
|
string |
Yes |
The family name of the root’s descriptor |
The case family. |
|
object |
Yes |
Only |
Inputs shared by every profile. A profile must not repeat them. |
|
object |
Yes |
Profile ID to an object with exactly |
The frozen input profiles. |
values stores the frozen inputs: fixture, scopes, settings, timeline, actions, report mask,
floating-point mode and the optional identity fields. derive names the fields, out of seed,
task_count and detection_mode, that loading reconstructs from saved values; see
catalog identity and storage. A profile ID starts with a letter
or digit and holds only letters, digits, _ and -.
provenance.json holds schema_version, revision and entries, an object that maps each
review record, such as review_014, to exactly these fields:
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
object |
Yes |
Exactly |
Who generated the reviewed results. |
|
string |
Yes |
Nonempty |
What was reviewed. |
The catalog is published source and names no commit, CI job, pipeline or merge request of the
internal history: commit is verified-source for a verified clean candidate build, and a
review reason describes what was reviewed instead of where it ran.
Rows per tuple file:
Tuple |
Rows |
|---|---|
Windows or Linux x86-64, ovstage, Release or Debug |
1003 |
Windows or Linux x86-64, OpenUSD, Release or Debug |
819 |
Linux AArch64, ovstage, Release or Debug |
811 |
Linux AArch64, OpenUSD, Release or Debug |
627 |
The twelve files hold 10,164 rows. The counts change whenever goldens are added or retired.
The loader also accepts schema 3, a catalog with one expectations.json shared by every tuple.
No command creates one, and the repository catalog uses schema 2.
Understand a golden failure#
Independent checks verify a case’s geometry or API contract, and serialization checks verify round trips. A golden comparison asks only whether the candidate still produces the reviewed typed result. Passing one kind of check does not excuse a failure in the other.
Golden status |
Meaning |
Next step |
|---|---|---|
|
The candidate’s typed result matches the selected golden. |
None for this snapshot. The run passes only when all its other checks pass too. |
|
No golden exists for this identity and build tuple. |
Review the candidate run, then propose only the intended additions. Never copy another tuple’s golden. |
|
A golden exists, and the typed contents differ. |
Read the differences. Decide whether this is a regression or an intended behavior change before you accept a replacement. |
|
A bundle cannot be decoded or breaks the typed contract, for example with a missing or extra field. |
Check |
A run’s golden_status is its most severe comparison status, in the order INVALID,
DIFFERENT, MISSING, PASS.
A golden-only failure prints no failed check line: every engine cell passes, and so does
Engine completion. The Sentinel guide shows the console
output. To find the failing snapshots, open <evidence>/gate-summary.json, where <evidence> is
the run’s evidence/ directory. Each golden_snapshots entry holds:
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
object |
Yes |
The frozen cell, including |
|
|
string |
Yes |
Such as |
The compared snapshot. |
|
string |
Yes |
|
The comparison result. |
|
string |
Yes |
An absolute path |
The candidate’s typed bundle. |
|
array of objects |
Yes |
Empty for |
The typed differences. |
|
string |
Only when no golden exists |
Why no golden was found, for |
|
|
string |
Only for |
|
The malformed bundle. |
Each difference holds these fields, all required:
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
string |
Yes |
A case ID, or |
The case of the differing record |
|
string |
Yes |
A record entity, or |
The kind of the differing record |
|
integer |
Yes |
0 or more; |
Which record of that case and entity |
|
string |
Yes |
A field name, or a marker such as |
The differing field |
|
integer or null |
Yes |
An array index, or |
The differing element of an array field |
|
any JSON type |
Yes |
The golden’s value and the candidate’s value |
|
|
string |
Yes |
Such as |
Why the values differ; the reasons below decide the status |
A difference with one of these reasons makes a comparison DIFFERENT; any other reason makes
it INVALID:
case contract changedmissing or extra record occurrenceID policy changedfield policy changedtype/shape/count/null changedparent identity changedpayload bits changed
A malformed candidate bundle fails its engine cell outright. An INVALID comparison in a
completed run therefore has invalid_side set to expected and points at the stored
golden.
This script, run from the run’s results directory, prints the run’s statuses and every snapshot that did not pass:
import json
with open("evidence/gate-summary.json", encoding="utf-8") as stream:
report = json.load(stream)
print("checks:", report.get("checks_status"), "goldens:", report.get("golden_status"))
print("golden update error:", report.get("golden_update_error"))
for snapshot in report.get("golden_snapshots", []):
if snapshot["status"] != "PASS":
cell = snapshot["cell"]
print(snapshot["status"], cell["case_id"], cell["variant"], snapshot["snapshot"], len(snapshot["differences"]))
For a golden-only failure of a changed depth case, it prints lines like these, where
<variant> is the variant ID and <count> the number of typed differences:
checks: PASS goldens: DIFFERENT
golden update error: None
DIFFERENT engine-options-depth <variant> snapshot_bundles.snapshot <count>
<evidence>/junit.xml, the CI test report, marks each engine cell whose golden status is not
PASS as failed.
Comparison has no numerical tolerance. A changed nbCollidingSegments value or array shape is a
change in correctness output, not noise. Each of the twelve build tuples has its own
goldens, and a proposal covers only the tuple of the run it comes from. A new case
therefore needs an accepted golden from a run of every tuple; see
changes that affect tuples you cannot run.
Do not regenerate or accept every current output just to make a run pass. Review the
frozen inputs and the implementation change, keep unaffected goldens, and use the
proposal and acceptance workflow. A run whose only failures are
MISSING or DIFFERENT comparisons can supply a proposal, and writes a proposal of its changed
snapshots to golden-proposal/. That eligibility does not approve its output.
Catalog identity and storage#
A golden’s identity is its case ID, variant, snapshot, frozen inputs and build axes. Sentinel
reads the candidate’s platform, architecture, backend and configuration from the
verified build manifest and loads only the tuple file of that exact tuple. There is no
fallback to another tuple or to current output. The twelve approved tuples are Windows x86-64,
Linux x86-64 and Linux AArch64, each with both backends,
ovstage and OpenUSD, in Release and Debug.
A tuple without a tuple file still runs every independent engine and serialization check,
including the historical database reads. It records every golden comparison as
MISSING, so the run fails until results for that tuple are accepted. A malformed catalog or an
inconsistent selected shard fails the run before any comparison.
Input families store the approved inputs as facts. They do not follow later edits to
tests/sentinel/engine_cases.json or to setting defaults. A changed input gives the candidate a
new identity, which has no golden yet. Loading derives only three fields from saved values:
seed from the fixture, and task_count and detection_mode from the settings.
tests/sentinel/golden_inputs.py defines these derivations.
For canonical cells, the resolved_settings mapping is not part of the identity. A change that
affects only the mapping therefore needs no new golden. The run still checks the mapping
against the requested and effective native settings it captures. Suite cells, the cells of a
case that drives the Suite API, keep resolved_suite in
their identity.
FAMILY_CASES in tests/sentinel/golden_catalog.py assigns every case ID to an input family.
Add a new case there before you accept its results. Otherwise goldens accept fails with
Unmapped golden case: <case>.
The two native floating-point cases, engine-reports-floating-point and
engine-reports-floating-point-kernel0, check all eight runtime snapshots. Each backend compares
only four representatives with goldens: sync, alternate, oracle and matched. Independent
checks require each of the other four snapshots to equal its representative; see the
floating-point matrix. Snapshots with the same names in
other cases are not aliases and keep their own comparisons. Reports list the runtime checks in
snapshot_checks and required_snapshot_checks, and the golden comparisons in
golden_snapshots and required_golden_snapshots.
Comparison extracts each ZIP into its own sentinel-golden-* directory under _build/test_tmp,
or under OVCLASH_TEST_TEMP_ROOT when it is set. It removes only that directory afterwards. It
compares the case list, record occurrences, ID and field policies, types, shapes, counts,
nullness, parent identities and payload bits. For records with generated IDs, such as those read
from a live fixture, the ID value is not compared, and each generated timestamp must lie inside
the recorded generation window.
Storage rules:
Catalog metadata is JSON with LF line endings, below 1,048,576 bytes per file, stored in ordinary Git.
A publish writes each new or changed metadata file as compact, deterministic JSON. A file whose value does not change keeps its bytes, so an indented shard stays indented until its content changes.
Engine ZIPs are deterministic and stored as ordinary Git binary files. Payloads and historical databases keep their exact bytes.
Paths are relative to the catalog.
generated_byand the review reason are attribution only. They select no source checkout or SDK, and no fingerprint or receipt authenticates any file.
Propose and accept results#
Before you begin, you need the Python runtime of an existing build or staged portable input
bundle; the goldens commands never start a build. Run them from ovclash, with
test_sentinel.bat on Windows or ./test_sentinel.sh on Linux. Every example on this page uses
test_sentinel.bat; on Linux, replace it with ./test_sentinel.sh and keep the arguments.
In the commands, RUN is the results directory or the report of a completed run, CASE an
engine case ID such as engine-options-depth, PROPOSAL a new directory outside the catalog,
such as _build/proposal-depth, and OTHER_PROPOSAL a second proposal, such as the one of
another build tuple.
A run that fails only on MISSING or DIFFERENT comparisons has already written a proposal of
those snapshots, and its console names the accept command for it; see
the proposal of a golden-only failure. Use propose
to select other snapshots or to propose from a saved run.
Windows (cmd.exe):
test_sentinel.bat goldens propose --from-run RUN --case CASE --output PROPOSAL
test_sentinel.bat goldens propose --from-run RUN --all --output PROPOSAL
test_sentinel.bat goldens propose --from-run RUN --changed --output PROPOSAL
test_sentinel.bat goldens accept --proposal PROPOSAL --reason "Reviewed intentional change"
test_sentinel.bat goldens accept --proposal PROPOSAL --proposal OTHER_PROPOSAL --reason "Reviewed intentional change"
Linux:
./test_sentinel.sh goldens propose --from-run RUN --case CASE --output PROPOSAL
./test_sentinel.sh goldens propose --from-run RUN --all --output PROPOSAL
./test_sentinel.sh goldens propose --from-run RUN --changed --output PROPOSAL
./test_sentinel.sh goldens accept --proposal PROPOSAL --reason "Reviewed intentional change"
./test_sentinel.sh goldens accept --proposal PROPOSAL --proposal OTHER_PROPOSAL --reason "Reviewed intentional change"
The three propose commands are alternatives: propose named cases, every eligible case, or only
the MISSING and DIFFERENT snapshots. The two accept commands are alternatives too: accept
one proposal, or several, such as one per build tuple, in one catalog update. A failed command
prints Golden update failed: <error> and exits 1; invalid arguments exit 2.
Propose#
propose selects snapshots from a completed run and copies their typed bundles into a review
directory. It never edits the catalog.
Repeat
--caseto select every snapshot of several cases, or use--allfor every snapshot of every eligible case.--changedselects everyMISSINGandDIFFERENTsnapshot and nothing that passed, so the accepted entries of unchanged snapshots keep their review reason; it fails when the run has no such snapshot.--outputmust be a directory that does not exist yet, outside the catalog.--from-runtakes the combined report or a results directory. In a directory, it uses the first ofevidence/gate-summary.json,gate-summary.json,summary.json,evidence/differential/summary.jsonanddifferential/summary.jsonthat exists. When it selects a differentialsummary.jsonand an enclosinggate-summary.jsonexists, it uses that instead, so a child report cannot hide the controller’s failure. An engine-only report is not enough.
A run can supply a proposal only when all of these hold:
The run completed, and every serialization execution and planned engine cell passed its independent checks.
The runtime snapshot-check and golden-comparison ledgers agree between the cells, the engine report and the combined report.
Every golden comparison is
PASS,MISSINGorDIFFERENT, and the run status isPASSonly when all of them arePASS.Repeated inputs produced equal typed results.
Failed controls, timeouts, INVALID comparisons and incomplete runs are not eligible. When the
independent checks pass but the run is still not eligible, evidence/gate-summary.json sets
checks_status to FAIL and records the reason in golden_update_error. Floating-point
proposals accept only the representative snapshots. eligible_run_snapshots in
tests/sentinel/goldens.py holds the exact run checks.
propose prints the path of the new proposal.json. The proposal directory holds:
File |
Contents |
|---|---|
|
The proposal that |
|
An array with each entry’s |
|
One line per entry: case, snapshot and previous status. |
|
The selected typed bundles. Identical bundles are stored once. |
proposal.json holds:
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
integer |
Yes |
|
Proposal schema. |
|
string |
Yes |
The report that the proposal came from. |
|
|
object |
Yes |
|
Attribution of the proposed results. |
|
array of objects |
Yes |
Nonempty |
One entry per selected snapshot. |
|
object |
No |
|
Present when |
Each entry of entries holds these fields, all required:
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
object |
Yes |
The run’s frozen cell, including |
The cell that produced the snapshot |
|
string |
Yes |
Such as |
The proposed snapshot |
|
object |
Yes |
Projected from the cell’s frozen inputs and axes |
The catalog identity. |
|
string |
Yes |
A |
The proposed typed bundle |
|
string |
Yes |
|
The run’s comparison status |
|
array of objects |
Yes |
The run’s typed differences; empty for |
The differences to review; see understand a golden failure |
For example, summary.md of a proposal for a changed depth case reads:
# Sentinel golden proposal
Review the typed differences before accepting.
- engine-options-depth / snapshot_bundles.snapshot: DIFFERENT
The proposal of a golden-only failure#
When every independent check of a run passes and its only failures are MISSING or
DIFFERENT comparisons, the run proposes those snapshots itself, as goldens propose --changed
would, into golden-proposal/ beside evidence/ in its results directory. The verdict stays
FAIL. After the Sentinel summary block the console prints the proposal’s path, its snapshot
count per status and the accept command:
Golden proposal: <results>/golden-proposal (1 DIFFERENT, 2 MISSING)
It covers this run's build tuple only. Review its summary.md and differences.json; to accept
an intended change, run from ovclash:
test_sentinel.bat goldens accept --proposal "<results>/golden-proposal" --reason "<what changed and why>"
A proposal that cannot be written, for example because golden-proposal/ already exists, prints
WARN Golden proposal not written: <error> and leaves the verdict unchanged. A proposal holds
its own copy of every selected bundle, so another machine can accept it without the run’s
evidence.
Accept#
Review summary.md, differences.json, the case behavior and the implementation change before
you accept. accept takes one or more proposals, such as one per build tuple, and publishes
them in one catalog update. It:
refuses an identity that two selected proposals both hold;
checks the typed structure of each bundle;
takes the catalog writer lock;
replaces the catalog entry with the same identity, or adds a new one;
records the review reason on every accepted entry;
records
verified-sourceasgenerated_by.commitwhen the candidate was a verified clean build, whose 40-digit source revision only the proposal keeps; any other candidate identity, such asunversioned-sdk-sha256:<digest>of an unversioned SDK, is recorded as it is. A candidate revision that is an abbreviated commit ID (7 to 39 hexadecimal digits with at least one letter and one digit) is refused withCandidate revision must not be a commit ID; the catalog is published sourcebefore anything is written, asadd-databaserefuses a commit-like writer revision;reuses a ZIP that the catalog already references, or that this update already added, when its bundle
manifest.jsonfields,records.jsonlbytes and payload bytes are identical;otherwise writes the lowest unused
result_NNN.zipin the case’s scenario folder.
It never overwrites a stored ZIP, never removes an unreferenced one and never changes historical databases. Unreferenced ZIPs are never reused. It prints the number of accepted entries and the catalog root:
{'updated': 4, 'manifest': '<ovclash>/tests/sentinel/goldens/manifest.json'}
Include the resulting catalog and data changes in normal code review. Proposals trust the local reports: they neither rerun semantic checks nor authenticate saved results directories.
Propose from a run on another machine#
A run on another machine, such as a CI job, can supply a proposal for its own tuple. Its
MISSING or DIFFERENT comparisons fail the run, and its complete independent checks are the
evidence that goldens propose needs. Do not copy another tuple’s goldens to make the
first run pass. Before you begin, you need a local build or staged bundle whose Python runtime
the goldens commands can use, and either the run’s golden-proposal/ directory or its complete
evidence/ directory.
When the run left a golden-proposal/ directory, copy that directory and accept it as it is; it
needs no relocation. Keep it with the proposals of the other affected tuples and accept them
together.
To propose from the evidence instead, for example to select other snapshots:
Copy the run’s complete
evidence/directory, includinggate-summary.json, to the machine where you propose. Run Sentinel in CI lists what a CI job keeps.EVIDENCEis the copied directory. A copy withoutgate-summary.jsonor a recorded bundle makesgoldens proposeprintGolden update failed: <error>and exit 1; copy the whole directory again.Find the recorded root. The report records absolute bundle paths from the machine that ran it.
RECORDED_ROOTis the part of eachactualpath before itsdifferentialcomponent. From the copiedevidence/directory, run this with any Python 3:import json import re with open("gate-summary.json", encoding="utf-8") as stream: actual = json.load(stream)["golden_snapshots"][0]["actual"] print(re.split(r"[\\/]differential[\\/]", actual)[0])
It prints
RECORDED_ROOT.Propose from
ovclashwith the copied directory and its recorded root. Windows:test_sentinel.bat goldens propose --from-run EVIDENCE --original-run-root RECORDED_ROOT --case engine-options-depth --output _build/proposal-linux-ovstage-release
Linux:
./test_sentinel.sh goldens propose --from-run EVIDENCE --original-run-root RECORDED_ROOT --case engine-options-depth --output _build/proposal-linux-ovstage-release
Review
summary.mdanddifferences.jsonin the proposal directory.Accept the proposal with a reason that names the change.
Repeat steps 1 to 5 for every affected tuple.
Run
goldens verify --report _build/goldens-verify.json.
The catalog is consistent when goldens verify prints a verification-only: PASS line; see
verify and recover a catalog.
With --original-run-root:
--from-runmust be the directory that contains the report.Only bundle paths are remapped. Each recorded path must be absolute and lie under the original root, and its mapped path must stay inside the copied directory. Any mismatch fails without trying the original location.
Recorded POSIX, drive-letter and UNC (Windows network share) paths keep their own syntax, so a Linux run can be reviewed on Windows.
proposal.jsonrecords both roots in itsrelocationobject.
Without --original-run-root, absolute actual paths are used as recorded, and relative ones
resolve against the report’s directory.
Changes that affect tuples you cannot run#
Each of the twelve build tuples has its own tuple file, and a proposal covers only the tuple of the run it comes from. A change that alters a typed result, changes a frozen input or adds a case therefore needs an accepted result from a run of every affected tuple. When you can run all of them, follow propose and accept results for each.
When you can run only some of them, for example only Linux x86-64 ovstage Release, follow these
steps. Before you begin, you need a source checkout of the change and, for each tuple that you
can run, a local build or staged bundle whose Python runtime the goldens commands can use, as
in propose and accept results.
Run Sentinel on every affected tuple you can run.
Collect the proposal of each run: the
golden-proposal/that a golden-only failure wrote, as in the proposal of a golden-only failure, or one you propose from the run, as in propose.Accept the reviewed proposals together in one
accept, with one--proposalper run, as in accept.Leave the tuple files of the other tuples unchanged. Never copy, edit or derive their rows from a tuple you ran: Sentinel loads only the exact tuple’s file, and a copied row is no evidence for that tuple.
Submit the change with the catalog updates of the tuples you ran.
In the change description, name the tuples you ran and the tuples that still need results.
In the change description, list the entries of each proposal’s
summary.md, so that reviewers know which comparisons to expect on the other tuples.
Your part is complete when goldens verify prints a verification-only: PASS line and the change
description names every tuple that still needs results.
Until a run of a remaining tuple supplies its results, Sentinel on that tuple still runs every independent check and records:
MISSINGfor a new case or a changed frozen input: the new identity has no golden yet;DIFFERENTfor an existing identity whose typed result changed.
Either status fails that tuple’s run, but the run stays eligible for a proposal when every
independent check passed. Someone who can run the tuple then proposes from that run, reviews the
differences against your description, accepts them and runs goldens verify. A run with a
failed independent check or an INVALID comparison cannot supply a proposal: that is a defect
to fix, not a result to accept.
Verify and recover a catalog#
Before you begin, you need the Python runtime of an existing build or staged portable input
bundle, as for propose and accept results. The two commands are
independent: verify checks the catalog, and recover finishes or undoes an interrupted
publication. From ovclash:
Windows (cmd.exe):
test_sentinel.bat goldens verify --report _build/goldens-verify.json
test_sentinel.bat goldens recover
Linux:
./test_sentinel.sh goldens verify --report _build/goldens-verify.json
./test_sentinel.sh goldens recover
verify checks the complete catalog without changing it:
every shard and reference, every referenced typed bundle and the representative set of each floating-point case;
for each historical database: the declared schema, SQLite
quick_check, the typed structure of the expected bundle and a readable live manifest;that rewriting the catalog would change no reference or revision.
It runs no reader; the next normal run checks decoding. It writes only the --report JSON, which
must be outside the catalog. A relative --report resolves against the current directory, and
_build/ is ignored by Git. A passing check prints one line:
verification-only: PASS; engine 10164 -> 10164; retired 0; publication unchanged; report: <ovclash>/_build/goldens-verify.json
accept, add-database, migrate --write and compact --write are the only commands that
publish catalog changes. Each of them:
takes exclusive ownership through
.catalog-writer.lockand creates.catalog-transaction/;reloads the complete catalog;
renders the changed metadata, incrementing the revision of each changed shard by one;
stages that metadata and backups of the replaced files in
.catalog-transaction/;replaces
manifest.jsonlast, as the commit point.
Git ignores both the lock file and the transaction directory. A revision is a positive integer that keeps the root and its shards coherent. It is not a Git pin, a content hash or authentication. Readers reject a pending transaction and mismatched shard revisions.
After an interrupted publication, every read fails with
Pending catalog transaction; run goldens recover --golden-root "<catalog>". recover then
prints one outcome:
Outcome |
Meaning |
|---|---|
|
Nothing to recover. |
|
The writer stopped before it journaled any change. |
|
The root was not replaced; the replaced files are restored. |
|
The root was replaced; only the cleanup is finished. |
recover changes files only to finish or undo such a publication. Ordinary runs never write or
recover the catalog.
goldens migrate converts a schema 1 catalog to schema 2. goldens compact converts loose
engine bundle directories to ZIP archives. Both require --report and only audit unless
--write is given. Review the audit report before you rerun with --write. accept,
add-database and compact refuse a schema 1 catalog until migrate --write converts it. The
repository catalog already uses schema 2 and ZIP storage, so these commands matter only for an
older catalog. compact prints
compaction: PASS; files <before> -> <after>; bytes <before> -> <after>; publication <state>; report: <path>.
Import historical databases#
Before you begin, you need a real database written by a historical writer, its reviewed decoded records as a typed bundle and a metadata file that describes both, and the Python runtime of an existing build or staged portable input bundle. In the command:
OLD.ovclashdbis the closed database file;EXPECTED_BUNDLEis the typed bundle of its reviewed decoded records;METADATA.jsonis the metadata file that this section describes;FIXTUREis the new fixture ID, such ashistorical-synthetic;VERSIONis the writer’s ovclash version, such as0.2.0;REVISIONis the writer revision, such asverified-source.
From ovclash, on Windows (cmd.exe):
test_sentinel.bat goldens add-database --database OLD.ovclashdb --expected EXPECTED_BUNDLE --metadata METADATA.json --fixture-id FIXTURE --writer-version VERSION --writer-revision REVISION --reason "Reviewed historical fixture"
On Linux:
./test_sentinel.sh goldens add-database --database OLD.ovclashdb --expected EXPECTED_BUNDLE --metadata METADATA.json --fixture-id FIXTURE --writer-version VERSION --writer-revision REVISION --reason "Reviewed historical fixture"
add-database checks the declared schema, runs SQLite quick_check and checks the typed
structure of the expected bundle. It runs no historical writer or reader. The next normal run
checks that the current reader decodes the database to the expected records. The writer revision
is attribution only; a commit ID is refused. The command cannot replace an existing fixture ID.
On success it prints {'imported': '<fixture id>', 'manifest': '<catalog>/manifest.json'}; a
failure prints Golden update failed: <error> and exits 1.
The fixture folder is databases/<folder>/. <folder> is the fixture ID in lowercase, with
every run of other characters replaced by _. For example, historical-synthetic is stored in
databases/historical_synthetic/. When that folder is taken, a numeric suffix such as _002 is
added, and existing fixtures stay where they are. The folder name is a storage location, not a
comparison key.
The metadata file contains exactly these two objects:
{
"schema_identity": {
"user_version": 0,
"tables": {"sample": ["id", "value"]}
},
"reader_options": {
"case": "example",
"verify_models": true,
"live_manifest": "live-validation.json"
}
}
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
object |
Yes |
Exactly |
The declared database schema. |
|
integer |
Yes |
0 or more |
The database’s |
|
object |
Yes |
Nonempty; table name to a nonempty array of column names |
Every table with its columns in order, including generated and hidden columns. Tables whose names start with |
|
object |
Yes |
Only |
Options of the current reader. |
|
string |
No |
Nonempty |
The expected bundle must hold exactly one case. Import records that case and rejects a different |
|
boolean |
No |
|
|
|
string |
No |
A path relative to the metadata file, inside its directory |
Needed by a fixture written by live detection: its |
A live fixture records the recording user in
audit.userand in everylast_modified_byit writes. The user name comes fromLOGNAME,USER,LNAMEorUSERNAME, in that order, before the OS account, so record withLOGNAME=sentinel: the public-reference test,tests/python_tests/test_public_references.py, refuses a developer login in the published catalog. ItsSentinelDatabaseUserTestsalso reads the user columns (clash_info.last_modified_by,clash_info.person_in_chargeandclash_query.last_modified_by) of every committed golden database and fails on a value that itsSENTINEL_DATABASE_USERSdoes not list.
The catalog entry in the databases array of manifest.json holds exactly these fields:
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
string |
Yes |
Unique; one path component |
The fixture ID. |
|
string |
Yes |
|
The stored database. |
|
string |
Yes |
|
The reviewed expected records. |
|
object |
Yes |
Exactly |
The historical writer. |
|
object |
Yes |
As in the metadata file |
The declared database schema. |
|
object |
Yes |
As in the metadata file, with |
Options of the current reader. |
|
object |
Yes |
|
Attribution of the import. |
|
string |
Yes |
Nonempty |
The |
A database must be a materialized SQLite file, closed, with no -wal, -shm or -journal
sidecar. Each run checks the declared schema and gives the current reader a fresh copy in the
run’s results directory, so the repository fixture never changes. The console labels these checks
Golden database read: <fixture> and Compare: golden database <fixture>, where <fixture> is
the fixture ID without its historical- prefix.
Sentinel covers databases from a historical writer read by the current reader. Sentinel never
calls the schema migration API (migrate_data_structures_to_latest_version). The migration
tests in tests/python_tests/test_suite_api_store_migration.py and
tests/python_tests/test_suite_legacy_migration.py run in regular build validation. Older readers
that consume newly written databases are out of scope.
goldens command reference#
test_sentinel.bat goldens SUBCOMMAND and ./test_sentinel.sh goldens SUBCOMMAND forward to
scripts/update_sentinel_goldens.py. Its help therefore shows usage: sentinel_ci.py. Every
subcommand also accepts these options:
Option |
Default |
Meaning |
|---|---|---|
|
The repository root above the script’s |
Repository root that contains |
|
|
Golden catalog. |
|
|
Typed bundle contract. |
|
Version and help. |
Subcommand |
Options |
Prints |
|---|---|---|
|
|
The path of |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
None |
One recovery outcome. |
A failed command prints Golden update failed: <error> and exits 1. Invalid arguments exit 2.