% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pipeline.R
\name{wf_validate}
\alias{wf_validate}
\title{Compare calibrated weights against a reference release}
\usage{
wf_validate(
  new,
  reference,
  target = NULL,
  max_deff_delta = 1,
  max_ess_loss = 0.2,
  max_total_shift = 0.05,
  max_margin_delta = 0.01,
  max_ratio_p99 = 2,
  on_issue = c("warn", "error", "none")
)
}
\arguments{
\item{new}{New \code{wf_weights} object.}

\item{reference}{Reference \code{wf_weights} object.}

\item{target}{Optional \code{wf_target} used to compare margin residual drift.}

\item{max_deff_delta}{Maximum allowed increase in design effect.}

\item{max_ess_loss}{Maximum allowed fractional ESS loss.}

\item{max_total_shift}{Maximum allowed fractional group-total shift.}

\item{max_margin_delta}{Maximum allowed absolute margin-residual increase.}

\item{max_ratio_p99}{Maximum allowed normalized 99th percentile unit-weight
ratio; the reciprocal threshold is applied to the 1st percentile.}

\item{on_issue}{Reaction when drift is detected: \code{"warn"}, \code{"error"}, or
\code{"none"}.}
}
\value{
A \code{wf_validation} object.
}
\description{
Detects drift in recurring production weights by comparing group coverage,
design effect, effective sample size, total weight, optional margin
residuals, and per-unit weight ratios for matching IDs.
}
