Verify a build and enforce quality gates
Verification and quality gates answer different questions:
verifychecks whether cached artifacts and database metadata still match the source manifest.- build quality gates check whether parser warnings and unresolved relationships remain within thresholds you chose.
Use both for a release-quality local database.
Verify source and database provenance
Section titled “Verify source and database provenance”EDITION=2025e # Replace with your concrete edition.uv run dicom-kb verify \ --edition "$EDITION"With an explicit database:
EDITION=2025e # Replace with your concrete edition.uv run dicom-kb verify \ --edition "$EDITION" \ --cache-dir /data/dicom-standard-kb \ --db /data/dicom-standard-kb/custom.sqliteReview:
- top-level
status; manifest_sha256;- every artifact’s expected and actual digest;
- database status;
- database edition;
- database source-manifest digest;
- schema version;
- warnings.
A missing database does not invalidate otherwise intact source artifacts, but it is reported. Checksum and metadata mismatches fail verification.
Inspect build metrics
Section titled “Inspect build metrics”Every build and build-fixture summary contains metrics, including:
- loaded parts;
- data-element and UID counts;
- IOD, module, macro, and relationship counts;
- attribute-use and condition counts;
- resolved and unresolved include rows;
- total and unresolved cross-references;
- parser warnings, including per-part counts;
- source-reference count.
Keep the whole summary when establishing a baseline for a new edition.
Set explicit gates
Section titled “Set explicit gates”EDITION=2025e # Replace with your concrete edition.uv run dicom-kb build \ --edition "$EDITION" \ --max-unresolved-xref-rate 0.05 \ --max-unresolved-include-rate 0.0 \ --max-parse-warnings 0Allowed rate values are between 0 and 1. The warning maximum must be zero or greater.
When a threshold is exceeded:
- the completed build summary is printed;
- the human-readable reason appears in
gate_failures; - the command exits nonzero.
Establish a baseline without hiding failures
Section titled “Establish a baseline without hiding failures”EDITION=2025e # Replace with your concrete edition.uv run dicom-kb build \ --edition "$EDITION" \ --max-unresolved-xref-rate 0.05 \ --max-unresolved-include-rate 0.0 \ --max-parse-warnings 0 \ --allow-gate-failuresThis exits successfully but retains failures in gate_failures and appends
them to warnings. Use it while tuning thresholds, not as a permanent release
bypass.
Compare editions deliberately
Section titled “Compare editions deliberately”Do not copy thresholds blindly across editions. For each concrete edition:
- fetch and verify the source manifest;
- build without hiding parser warnings;
- retain the complete metrics summary;
- inspect per-part warning changes;
- investigate newly unresolved includes or cross-references;
- set or update thresholds with a recorded rationale;
- run official-edition integration and release gates.
Know what verification cannot prove
Section titled “Know what verification cannot prove”A successful verification proves local artifact and build provenance. It does not prove:
- that every standard structure was parsed;
- that every condition is mechanically decidable;
- that an application is DICOM conformant;
- that a model used tool output correctly.
Use parser coverage, response warnings, and the agent regression suite for those separate concerns.