Learn R Programming

DCC (version 1.2.1)

dcc_reconcile: Reconcile findings against logged changes (closed loop)

Description

Verifies DCC's closed-loop guarantee on the exact finding identity: every audit-log row must join back to a finding by finding_id, and every finding is assigned exactly one terminal status. There is no loose record_id + check_id matching, so a change can never be attributed to the wrong finding and an unhandled finding can never be reported as handled. An audit row whose finding_id is absent from the findings table, or a handled disposition without matching audit evidence, raises a dcc_reconcile_error.

Usage

dcc_reconcile(x)

Value

The findings table extended with the recorded action, status, message, and handled. Status is one of "changed", "excluded", "flagged", "skipped", "failed", or "unhandled".

Arguments

x

A dcc_result from dcc_execute.

Examples

Run this code
df <- data.frame(sid = "S1", q1 = 9)
f <- dcc_findings("S1", variable = "q1", check_id = "C",
                  evidence = "legacy code")
res <- dcc_execute(df, f, actions = list(C = "set_na"), id_var = "sid")
dcc_reconcile(res)

Run the code above in your browser using DataLab