# ------------------------------------------------------------
# PSUT IoT Engineering Studio · E05
# Defensive analysis of synthetic records only; no network I/O.
# ------------------------------------------------------------
"""A supplied capture contains 2400 incident response bytes and 1700 confirmed removed bytes; 800 legitimate bytes remain."""
import json

# Editable defensive setting (only the documented choices are permitted).
CHOICES = [100, 300, 500, 700, 900]
DEFAULT = 500

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 {
        'Residual incident bytes': 700,
        'Residual total bytes': 1500,
        'Residual above limit': int(700>x),
        'Removed share (%)': 170000/2400
    }

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