Skip to content

Verify a build and enforce quality gates

Verification and quality gates answer different questions:

  • verify checks 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.

Terminal window
EDITION=2025e # Replace with your concrete edition.
uv run dicom-kb verify \
--edition "$EDITION"

With an explicit database:

Terminal window
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.sqlite

Review:

  • 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.

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.

Terminal window
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

Allowed 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”
Terminal window
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-failures

This exits successfully but retains failures in gate_failures and appends them to warnings. Use it while tuning thresholds, not as a permanent release bypass.

Do not copy thresholds blindly across editions. For each concrete edition:

  1. fetch and verify the source manifest;
  2. build without hiding parser warnings;
  3. retain the complete metrics summary;
  4. inspect per-part warning changes;
  5. investigate newly unresolved includes or cross-references;
  6. set or update thresholds with a recorded rationale;
  7. run official-edition integration and release gates.

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.