H38 Inspect run history and incidents
Use your current course session. Preparation and course runner · R script ↓
H38 Inspect run history and incidents
Goal: Write persistent run evidence deliberately.
Prerequisites: H06; independent of the lake.
write=FALSE also suppresses persistent evidence. Here a product without a data target uses write=TRUE and an explicit evidence directory to write run metadata.
training_step(
"H38",
{
evidence_path <- file.path(training_root, "run-evidence")
evidence_good <- dr_run(policy_product, evidence = evidence_path)
evidence_bad <- dr_run(
policy_product,
data = bad_policies,
evidence = evidence_path,
stop_on_failure = FALSE
)
print(dr_run_history(evidence_path))
print(dr_incidents(evidence_path))
stopifnot(
nrow(dr_run_history(evidence_path)) == 2L,
evidence_bad$status == "blocked"
)
},
needs = c("H06")
)Expected result: One successful and one blocked run.
Task: Does the evidence directory contain every source row?
Show solution
No. It contains descriptive metadata and check counts, not the complete source data.