# ------------------------------------------------------------
# PSUT IoT Engineering Studio · E08
# Defensive analysis of synthetic records only; no network I/O.
# ------------------------------------------------------------
"""Six fictional registration records: four valid and two rejected by input validation. x is the approved processing capacity for valid records."""
import json

# Editable defensive setting (only the documented choices are permitted).
CHOICES = [0, 1, 2, 3, 4]
DEFAULT = 3

def analyze(x):
    """Return independently interpretable defensive metrics."""
    if isinstance(x, bool) or x not in CHOICES:
        raise ValueError("Choose a documented defensive setting")
    return {
        'Processed valid records': x,
        'Valid deferred': 4-x,
        'Invalid rejected': 2,
        'Total remaining review': 4-x
    }

if __name__ == "__main__":
    for setting in CHOICES:
        print(json.dumps({"setting": setting, "metrics": analyze(setting)}))
