Skip to content

Validation with CORE (CDISC Rules Engine)

Fleet's conformance validation is built on CORE — the open-source CDISC Rules Engine, the official executable implementation of CDISC's conformance rules. Fleet manages the engine lifecycle (download, discovery, health check) and wraps execution behind one CLI command and one namespace verb, so validation runs with the same rules a regulator's reviewer tooling references.

One-time setup

uv run fleet install-engine     # downloads the CORE binary to ~/.fleet
uv run fleet doctor             # confirms engine + extras are healthy

fleet install-engine installs CORE 0.15.0 (GitHub tag v0.15), the version that Fleet is tested with. --version latest installs the newest CORE release, but Fleet prints a warning, because that version is not tested with Fleet. Newer releases can fail on data that 0.15.0 validates.

fleet doctor prints the engine that validation will use, where it came from, and its version. It takes them from the same run setup as the verb and fleet validate.

Teams can pin a shared engine instead via validation.engine_path in study_config.yaml. Inside a study, validation.engine_path beats the FLEET_RULES_ENGINE environment variable, so that every programmer runs the same engine build. Outside a study, FLEET_RULES_ENGINE still applies.

validation.engine_path names a program, so treat a received study config like code. fleet validate, the .validate() verb and fleet doctor start the pinned engine. fleet check only prints its path. The MCP tool fleet_validate refuses an engine that a study config names unless the server was started with fleet mcp --trust-study-engine: an assistant can pass any dataset path.

Engine version

Every report header prints the engine version, so a QC programmer can check that two runs used the same rule build. Fleet takes the version from the first source that gives it:

  1. the engine's own core version command (0.15.0),
  2. the fleet-release-tag.txt file that fleet install-engine writes next to the managed binary (tag v0.15, printed as 0.15),
  3. else unknown.

Running validation

Everything resolves from the discovered study_config.yaml:

uv run fleet validate                          # all datasets in <sdtm_data> and <adam_data>
uv run fleet validate data/sdtm/ae.parquet     # one dataset
uv run fleet validate --report findings.html   # HTML findings report
  • Sweep: the engine runs once for all SDTM datasets and once for all ADaM datasets, so rules that span several datasets of one standard can execute. The report shows one result per dataset.
  • Standard detection: a dataset in the configured sdtm_data or adam_data directory takes the standard of that directory. For any other path, AD* datasets validate as ADaM and everything else as SDTM. --standard overrides both.
  • IG versions come from the config's sdtm.ig_version / adam.ig_version (--version overrides).
  • Custom rules load automatically from validation.custom_rules (--custom-rules overrides). They run in a second engine run next to the official rules, so a sweep of both standards with custom rules makes four engine runs. See Custom Validation Rules.
  • Define-XML: --define outputs/define_sdtm.xml gives the define to CORE (-dxp), so the define rules (for example CG0010 on the ItemRef Role) run. It is opt-in: Fleet never passes a define by default (ADR 0042).
  • The report header of each dataset shows every input with its source, as on the verb.
  • HTML report: --report findings.html writes one page: a status row per dataset, then one row per finding and per dataset that could not run. ValidationResult.save_html_report() writes the same page for one dataset. Every cell is HTML-escaped.
  • Could not run: a dataset whose directory and file name disagree (data/sdtm/adsl.parquet), or an unsupported IG version, is not validated. The reason is printed, and the other datasets still run. An engine that crashes, writes no report, or does not finish within the timeout also gives "could not run", not a data failure.
  • Timeout: --timeout SECONDS, else validation.timeout in the study config, else 300 s. On timeout Fleet stops the engine and its workers.
  • Every finding blocks (ADR-0017). CORE gives no severity, so Fleet does not invent one. A finding stops blocking only when validation.accepted lists its rule and dataset with a reason, as an SDRG explanation does:
validation:
  accepted:
    - rule: CORE-000767
      dataset: AE
      reason: No FA domain in this study; see SDRG section 4.2.
  • Status words: PASS (at least one rule executed, no finding), FINDINGS (n) (every finding accepted), NOT ASSESSED (no rule executed), FAIL (a finding blocks), COULD NOT RUN. Study-level findings (dataset STUDY) get their own block in a sweep. In a single-dataset run (the verb, the MCP tool) they are information only, because one dataset cannot show what the study lacks.
  • Exit codes: 0 nothing blocks, 1 a finding blocks, 2 a dataset could not run. So fleet validate drops straight into CI. The last line counts each status and the findings.
  • Rule counts: each report states, per engine run (official, custom), how many rules executed, were skipped and could not run, for example Rules (engine run, official): 90 executed, 313 skipped, 27 could not run. The counts belong to the engine run, not to one dataset. A rule that could not run (status EXECUTION_ERROR, often because a dataset it needs is absent) is a rule problem, not a data finding: its rows are left out of the findings, and it does not change the status or the exit code. The rows are chosen by the rule status in Rules_Report, never by the message text. fleet validate and the HTML report also list the IDs of these rules; the verb prints the count line only.
  • Engine version: fleet install-engine installs the newest tested CORE release. The report header and fleet doctor name a version Fleet is not tested with. A weekly CI job runs Fleet on the newest CORE release.

The CI gate: fleet check

fleet check builds the same run setup for SDTM and ADaM, with no datasets. It catches a setup error before delivery, without an engine: it starts no program and runs no study code (codelists.py is read as data):

  • sdtm.ig_version: 3-5, or any IG version not in the supported list, fails the gate.
  • A validation.custom_rules directory that does not exist fails the gate.
  • A codelists.py that disagrees with ct.package, ct.adam_package or the define.yaml files fails the gate; each row names the fix command. See controlled terminology in the spec path.
  • No engine found is a warning only, because CI installs no engine.

The MCP tool

fleet_validate(dataset_path, standard=None, version=None, custom_rules=None) builds the same run setup. It looks for study_config.yaml from the directory of the dataset, not from the working directory of the server. A refused setup returns {"outcome": "could not run", "reason": ...} and does not raise. See IDE tooling.

The same run from Python, chainable at the end of a pipeline:

result = (
    raw_df.sdtm.assign("DOMAIN", value="AE")
    # ... derivations ...
    .validate("AE")  # runs CORE on the materialised frame
)

Where the verb takes its inputs

The verb builds a run setup before the engine starts. Each input comes from the first source that gives it:

Input Argument Study config Environment Default
Standard (none) (none) (none) the namespace: .sdtm or .adam
IG version version= sdtm.ig_version / adam.ig_version (none) SDTMIG 3.4, ADaMIG 1.3
Custom rules custom_rules= validation.custom_rules (none) none
Engine rules_engine_path= validation.engine_path FLEET_RULES_ENGINE managed install

The verb looks for study_config.yaml from the working directory, then each parent. version= accepts "3-4" and "3.4". The supported versions are SDTMIG 3.2, 3.3, 3.4 and ADaMIG 1.0, 1.1, 1.2, 1.3.

The report header prints each input with its source and the study config used:

Standard:     SDTMIG (namespace)
IG version:   3.3 (study config)
Custom rules: /study/metadata/custom_rules (study config)
Engine:       /study/tools/core/core (study config)
CORE version: 0.15.0
Study config: /study/study_config.yaml

Could not run

Some setups are refused before the engine starts. The verb then raises ValidationSetupError in every on_fail mode, because no rule ran:

  • the dataset name belongs to the other standard: adae.adam.validate("AE") or ae.sdtm.validate("ADAE"),
  • the IG version is not supported, for example SDTMIG 3.1.3,
  • the custom rules directory does not exist.

What a PASS does not cover: controlled terminology

CORE checks only a few controlled terminology values. A PASS or a FAIL for other rules does not mean that the codelist values are correct. Fleet checks a value against its codelist at the line that assigns it (assign(..., ct=SEX)), and warns.

Example: a DM with SEX = "X", AGEU = "DECADES", RACE = "MARTIAN" and ETHNIC = "UNKNOWN ETHNIC", and an AE with AESER = "YES", AESEV = "HORRIBLE", AEOUT = "BETTER" and AESTDTC = "2020-13-45". fleet validate (CORE 0.15.0) reports only CORE-000087 and CORE-000266 (AESER) and CORE-000726 (ETHNIC) for these values. It names no finding for SEX, AGEU, RACE, AESEV, AEOUT or the bad ISO 8601 date.

Which rules actually exist upstream

CORE executes the rule sets CDISC has published to its Library. As of mid-2026 that means:

Standard Published executable rules
SDTMIG 3.2 / 3.3 / 3.4 ✅ full SD-series rule sets
SENDIG 3.0 / 3.1 / 3.1.1 (+DART, GENETOX, AR) ✅
FDA Business Rules ✅ (SDTM/SEND-oriented)
TIG 1.0 (incl. its ADaM substandard) ✅
USDM ✅
ADaMIG 1.0–1.3 ⚠️ selection plumbing exists (engine ≥ v0.13.0), but no executable ADaMIG rule set is published yet — ADaM Conformance Rules v5.0 remains a document, not machine rules

Practical consequence: an ADaM fleet validate run today executes your custom rules (plus any TIG-ADaM rules you opt into), while SDTM runs get the full official battery. Fleet tracks the upstream catalog — when CDISC publishes executable ADaMIG rules, the same command picks them up through the engine's standard/version selection with no Fleet change.

Where CORE sits in Fleet's validation stack

Validation is layered — each layer fires at a different moment and catches a different error class:

Layer When What it catches
Spec registry models from_spec() load time unknown algorithms, misspelled/missing derivation fields
fleet check on demand / CI gate Define-XML generation in strict mode (schema, codelists, method text, Length, SignificantDigits), run setup (IG versions, custom rules directory)
Trial-design audit (fleet tdd audit) on demand, offline P21-style SD-series + FDA TS profile for TDD domains
CORE (fleet validate) after datasets materialise official CDISC conformance rules against the data itself

See Custom Validation Rules for extending CORE with sponsor-, study-, or TCG-specific checks — they run next to the official rules, report in the same format with their source, and live in version control next to the study.