Integrity

Run QDB checking definitions from `reference_checks` and review recent runs written to `admin_checks`. SQL checks can be run here now; program and external checks are listed for management and future wiring.

Queue limit
53
queue / pending
417
response / open
1
response / resolved
5
response / review
17
run / complete

Runnable SQL Checks

Check Scope Workflow Run
RUN_MISSING_SP
Run missing starting price
Flags post-race run rows where starting price is empty.
SQL
SELECT 'run' AS entity, r.id AS record_id, 'missing_sp' AS issue_key, 'data-blocker' AS severity, CONCAT('Run ', r.id, ' has no starting price.') AS message, 'Enter starting price, or confirm this race has no SP market.' AS suggested_action, r.race_id, r.race_date, r.race_number, r.tab_number, r.runner_name, r.runner_id, r.course_id, c.display_name AS course, c.country_id, co.name AS country, co.racing_code AS country_racing_code, r.discipline, r.starting_price FROM run r LEFT JOIN courses c ON c.id = r.course_id LEFT JOIN country co ON co.id = c.country_id WHERE (%(record_id)s IS NULL OR r.id = %(record_id)s) AND (%(record_id)s IS NOT NULL OR %(date_from)s IS NULL OR r.race_date >= %(date_from)s) AND (%(record_id)s IS NOT NULL OR %(date_to)s IS NULL OR r.race_date < DATE_ADD(%(date_to)s, INTERVAL 1 DAY)) AND (%(discipline)s IS NULL OR r.discipline = %(discipline)s) AND (%(country_id)s IS NULL OR c.country_id = %(country_id)s) AND r.finish_position IS NOT NULL AND (r.starting_price IS NULL OR TRIM(r.starting_price) = '')
run data-blocker
required / last_month
Batch run requires: date_from, date_to.
Run over a date range, optionally filtered by discipline and country. Use record id only for drilling into one run.
Parameters: Date range required, Discipline filter, Country/racing-code filter, Run ID optional drill-in
Events: run.created, run.updated, race.results_loaded
Fields: starting_price, race_id, finish_position
Date range required, Discipline filter, Country/racing-code filter, Run ID optional drill-in
PRE_POST_TRAINER_MISMATCH
Pre/post trainer mismatch
Compares racecard trainer against post-race run trainer for the same race and runner.
SQL
SELECT 'run' AS entity, r.id AS record_id, 'pre_post_trainer_mismatch' AS issue_key, 'review' AS severity, CONCAT('Run trainer differs from racecard trainer for ', r.runner_name, '.') AS message, 'Review trainer identity in racecard and post-race run data.' AS suggested_action, r.race_id, r.race_date, r.runner_name, r.runner_id, r.course_id, c.display_name AS course, c.country_id, co.name AS country, co.racing_code AS country_racing_code, r.discipline, r.trainer_id AS post_trainer_id, r.trainer_name AS post_trainer_name, rc.trainer_id AS pre_trainer_id, rc.trainer AS pre_trainer_name FROM run r JOIN racecard_runner rc ON rc.race_id = r.race_id AND rc.runner_id = r.runner_id LEFT JOIN courses c ON c.id = r.course_id LEFT JOIN country co ON co.id = c.country_id WHERE (%(record_id)s IS NULL OR r.id = %(record_id)s) AND (%(record_id)s IS NOT NULL OR %(date_from)s IS NULL OR r.race_date >= %(date_from)s) AND (%(record_id)s IS NOT NULL OR %(date_to)s IS NULL OR r.race_date < DATE_ADD(%(date_to)s, INTERVAL 1 DAY)) AND (%(discipline)s IS NULL OR r.discipline = %(discipline)s) AND (%(country_id)s IS NULL OR c.country_id = %(country_id)s) AND COALESCE(r.trainer_id, 0) <> 0 AND COALESCE(rc.trainer_id, 0) <> 0 AND r.trainer_id <> rc.trainer_id
run review
optional / last_month
Batch run requires: date_from, date_to.
Run over a date range, optionally filtered by discipline and country. Use record id only for checking one post-race run.
Parameters: Date range required, Discipline filter, Country/racing-code filter, Run ID optional drill-in
Events: run.created, run.updated, racecard_runner.updated
Fields: trainer_id, race_id, runner_id
Date range required, Discipline filter, Country/racing-code filter, Run ID optional drill-in
RUNNER_POSSIBLE_DUPLICATE
Possible duplicate runner
Flags runner master rows with same name, foal year and country.
SQL
SELECT 'runner' AS entity, r.id AS record_id, CONCAT('possible_duplicate_runner:', LEAST(r.id, r2.id), ':', GREATEST(r.id, r2.id)) AS issue_key, 'review' AS severity, CONCAT('Runner ', r.runner_name, ' may duplicate runner ', r2.id, '.') AS message, 'Open Compare / View and review whether the runner records should be merged.' AS suggested_action, r.runner_name, r.country_code, r.year_of_foal, r.id AS runner_id, r2.id AS duplicate_runner_id, r2.runner_name AS duplicate_runner_name, r2.country_code AS duplicate_country_code, r2.year_of_foal AS duplicate_year_of_foal, r.sire_name, r.dam_name, r2.sire_name AS duplicate_sire_name, r2.dam_name AS duplicate_dam_name FROM runner r JOIN runner r2 ON r2.id <> r.id AND COALESCE(r2.runner_name, '') = COALESCE(r.runner_name, '') AND COALESCE(r2.year_of_foal, 0) = COALESCE(r.year_of_foal, 0) AND COALESCE(r2.country_code, '') = COALESCE(r.country_code, '') WHERE (%(record_id)s IS NULL OR r.id = %(record_id)s) AND r.runner_name IS NOT NULL AND TRIM(r.runner_name) <> '' AND COALESCE(r.year_of_foal, 0) <> 0 AND r.id < r2.id
runner review
full-history / record-only
Record id required.
Run for one runner id. This finds possible duplicates for that specific runner master record.
Parameters: Runner ID required
Events: runner.created, runner.updated
Fields: runner_name, year_of_foal, country_code
Runner ID required

Program / External Checks

CheckTypeEntityStatus
INGEST_FIELD_DIFFERENCE
INGEST_FIELD_DIFFERENCE
Punters supplied a different canonical value for name.
external racecard_race active
RACE-003
RACE-003
Scheduled race time is not a valid date/time
external racecard_race active
CTX-002
CTX-002
TAB number is duplicated within the race
external racecard_runner active
DEMO_MEETING_RESULTS_NOT_OFFICIAL
Demo: meeting official results not confirmed
Example meeting-level data blocker for post-race workflows where official results are not confirmed.
manual meeting active
DEMO_MEETING_MISSING_WEATHER
Demo: meeting weather missing
Example meeting-level review issue for missing weather or condition data.
manual meeting active
DEMO_MEETING_JURISDICTION_REVIEW
Demo: meeting jurisdiction review
Example meeting-level review issue showing how country or jurisdiction metadata can be surfaced.
manual meeting active
DEMO_MEETING_TAB_FLAG_REVIEW
Demo: meeting TAB flag review
Example meeting-level informational issue for checking a meeting flag.
manual meeting active

Recent Runs

RunCheckStatusRowsDurationStartedError
453 RUN_MISSING_SP complete 0 1250 ms July 11, 2026, 12:38 p.m.
452 RUNNER_POSSIBLE_DUPLICATE complete 0 2903 ms July 11, 2026, 12:17 p.m.
451 PRE_POST_TRAINER_MISMATCH complete 0 1289 ms July 11, 2026, 12:17 p.m.
450 RUN_MISSING_SP complete 1 2186 ms July 11, 2026, 12:17 p.m.
449 RUN_MISSING_SP complete 0 1277 ms July 11, 2026, 12:17 p.m.
448 RUN_MISSING_SP complete 0 1291 ms July 11, 2026, 12:17 p.m.
447 RUN_MISSING_SP complete 1 2177 ms July 11, 2026, 8:57 a.m.
446 RUN_MISSING_SP complete 1 2194 ms July 11, 2026, 8:56 a.m.
409 RUN_MISSING_SP complete 1 2197 ms July 11, 2026, 1:54 a.m.
408 RUN_MISSING_SP complete 1 2120 ms July 11, 2026, 1:50 a.m.
407 PRE_POST_TRAINER_MISMATCH complete 0 1520 ms July 11, 2026, 1:48 a.m.
406 RUNNER_POSSIBLE_DUPLICATE complete 0 2541 ms July 11, 2026, 1:48 a.m.
405 PRE_POST_TRAINER_MISMATCH complete 0 2324 ms July 11, 2026, 1:46 a.m.
402 RUN_MISSING_SP complete 1 2179 ms July 11, 2026, 1:46 a.m.
203 RUN_MISSING_SP complete 200 127510 ms July 11, 2026, 1:44 a.m.
202 PRE_POST_TRAINER_MISMATCH complete 10 1334282 ms July 11, 2026, 1:44 a.m.
1 RUN_MISSING_SP complete 200 126458 ms July 11, 2026, 1:42 a.m.
QWebHub Integrity v1.0.1