"""Audit published LSE totals; this does not estimate field prevalence.""" import argparse from datetime import datetime, timezone from fractions import Fraction from hashlib import sha256 import json from pathlib import Path def nearest_enclosure(value, quantum): """Closed enclosure, conservative at both rounding ties.""" value, quantum = Fraction(value), Fraction(quantum) if value < 0 or quantum <= 0 or value < quantum / 2: raise ValueError("positive quantum and nonnegative interval required") return value - quantum / 2, value + quantum / 2 def encoded(value): return {"numerator": value.numerator, "denominator": value.denominator} def audit(): count = 53820 displayed_population = 1530000 displayed_percent = Fraction("3.45") population_lo, population_hi = nearest_enclosure(displayed_population, 10000) percent_lo, percent_hi = nearest_enclosure("3.45", "0.01") ratio = Fraction(100 * count, displayed_population) ratio_lo = 100 * count / population_hi ratio_hi = 100 * count / population_lo overlap = max(ratio_lo, percent_lo) <= min(ratio_hi, percent_hi) implied = 100 * count / displayed_percent return { "schema_version": 1, "kind": "published-number consistency audit; not field measurements", "reviewed": "2026-11-26", "status": "unresolved-source-inconsistency", "sources": [ { "id": "bairavasundaram-sigmetrics07", "title": "An Analysis of Latent Sector Errors in Disk Drives", "authors": ["Lakshmi N. Bairavasundaram", "Garth R. Goodson", "Shankar Pasupathy", "Jiri Schindler"], "year": 2007, "url": "https://research.cs.wisc.edu/adsl/Publications/latent-sigmetrics07.pdf", "locator": "Section 5.2; PDF page 4 (one-based); Table 1 repeats the percentage", "pdf_sha256": "bac4c1f6ef4656616d29c457fdeed6197165a27025f38eca04bf2085fa6b674d", "accessed": "2026-11-26", "role": "original reported totals", }, { "id": "mahdisoltani-atc17-pdf", "title": "Proactive error prediction to improve storage system reliability", "authors": ["Farzaneh Mahdisoltani", "Ioan Stefanovici", "Bianca Schroeder"], "year": 2017, "url": "https://www.usenix.org/system/files/conference/atc17/atc17-mahdisoltani.pdf", "locator": "Section 2.1; printed pages 392-393; Table 1", "accessed": "2026-11-26", "role": "cites the earlier NetApp percentage, not an independent NetApp sample", }, ], "reported": { "affected_disks": count, "population_text": "1.53 million", "affected_percent_text": "3.45", "study_window_months": 32, "window_note": "study collection window, not proof of equal follow-up for every disk", "endpoint": "at least one logged latent sector error", }, "arithmetic_not_estimates": { "printed_count_divided_by_printed_population_percent": encoded(ratio), "display_percent": format(float(ratio), ".6f"), "implied_population_if_count_and_percent_exact": encoded(implied), "implied_population_is_verified": False, }, "rounding_sensitivity": { "assumptions": [ "Treat the printed affected-disk count as exact for this diagnostic.", "Interpret 1.53 million as nearest rounding with quantum 10000 disks.", "Interpret 3.45 percent as nearest rounding with quantum 0.01 percentage points.", "Use closed interval enclosures to include both ties conservatively.", "The paper does not establish these rounding conventions.", ], "population_enclosure_disks": [encoded(population_lo), encoded(population_hi)], "printed_percent_enclosure": [encoded(percent_lo), encoded(percent_hi)], "count_ratio_enclosure_percent": [encoded(ratio_lo), encoded(ratio_hi)], "enclosures_overlap": overlap, }, "editorial_disposition": { "retain_reported_numeric_cell": "3.45", "corrected_prevalence": None, "exact_population": None, "reason": "Arithmetic cannot identify which source value or population definition needs correction.", "independent_netapp_cohorts_in_these_two_citations": 1, "not_established": ["AFR", "per-bit UBER", "rebuild loss probability", "fleet frequency ranking"], }, } def payload(): return {"generator_sha256": sha256(Path(__file__).read_bytes()).hexdigest(), "audit": audit()} def main(): parser = argparse.ArgumentParser(description=__doc__) mode = parser.add_mutually_exclusive_group() mode.add_argument("--write", action="store_true") mode.add_argument("--check", action="store_true") args = parser.parse_args() path = Path(__file__).with_name("lse-source-audit.json") expected = payload() if args.write: expected["generated_at"] = datetime.now(timezone.utc).isoformat() path.write_text(json.dumps(expected, indent=2) + "\n", encoding="utf-8") elif args.check: actual = json.loads(path.read_text(encoding="utf-8")) stamp = actual.pop("generated_at", None) if not stamp or actual != expected: raise SystemExit("source audit differs from its inputs or generator") datetime.fromisoformat(stamp) print("source audit replay matches; this is not a field-data reanalysis") else: print(json.dumps(expected, indent=2)) if __name__ == "__main__": main()