The check battery¶
Ten checks, each with a rationale, the exact query it runs, and a worked example on synthetic data. Every one has a matching injector that plants exactly the leak it looks for, which is how each is tested against ground truth rather than against an opinion.
| ID | Name | What it flags | Default |
|---|---|---|---|
| LK001 | post_index_features |
Events or features timestamped after the index date. | error |
| LK002 | same_encounter |
Outcome codes from the index encounter itself. | error |
| LK003 | outcome_proxy |
User-listed proxy codes occurring pre-index. | warning |
| LK004 | immortal_time |
Subjects who could not have had the outcome during follow-up. | error |
| LK005 | split_overlap |
Subject ids present in more than one split. | error |
| LK006 | temporal_split |
Test index dates that precede the training period's end. | warning |
| LK007 | label_definition |
Labels that depend on information outside the outcome window. | error |
| LK008 | encounter_group |
A group (encounter, provider) straddling two splits. | error |
| LK009 | duplicate_subjects |
Subjects that look like the same person under two ids. | warning |
| LK010 | horizon_violation |
Outcome occurrences beyond the declared horizon. | error |
Severity policy¶
error — the task is invalid as defined. Post-index features, split
overlap, a label built from future information. The default --fail-on.
warning — a suspicious pattern that needs a human. Proxies and temporal
edge cases, where whether it is a problem depends on your cohort.
info — descriptive statistics. These never fail a run, which is why
--fail-on info is refused rather than accepted as a synonym for
--fail-on warning.
Two things every check does¶
Carries its evidence. Each finding references the rows that triggered it and the query that found them. A count with no rows is rejected by a validator.
Says when it cannot run. A check with missing inputs reports a skip and a reason. It never reports a pass it did not earn.