Problem/Motivation
Disabled checks are reported loudly in live output (every format lists them; the report page names them) — but the stored history does not record that a check was disabled during a run. A disabled check is simply absent from that run's site_doctor_run_check rows, indistinguishable months later from "the module providing it wasn't installed yet". Consequences: "was the permission check disabled during that quiet period, or did it genuinely find nothing?" is unanswerable from the data, and a disabled check's frozen findings show as stale ("not checked since …") without the recorded reason.
Steps to reproduce
Disable a check, let cron run for a while, re-enable it, then try to explain the gap in that check's history from the stored data alone.
Proposed resolution
Persist one site_doctor_run_check row per disabled check per run, with a new status value disabled (severity NULL, like failed rows — "the tool was configured off" is not a severity). This stays entirely inside the existing schema's vocabulary: no new tables or columns, one new allowed status string.
Follow-through in the read paths:
- The report page's stale marker on frozen findings can then say "not checked since @date — the check was switched off", from data rather than inferring from current configuration.
- Resolution authority is unchanged:
disabledrows, likefailedandnot_applicable, never resolve findings. - Point-in-time honesty: which checks were off during any stored run becomes a recorded fact.
This is the same principle already applied everywhere else ("no news is not good news"; disabling is never silent) — extended to the historical record.
Remaining tasks
- Implement (write path + the report page's reason-aware stale marker) + kernel tests.
- Update the schema column description for the new status value.
User interface changes
The report page's stale note on frozen findings gains its reason. No new pages or elements.
API changes
One new site_doctor_run_check.status value (disabled).
Data model changes
No schema shape change — a new allowed value in an existing column. More rows per run (one per disabled check).
Issue fork site_doctor-3608691
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
amangrover90 commented