{
 "description": "Failures met while building AC87, kept so a reader can see what each check catches and what it misses.",
 "cases": [
  {
   "id": "mixture-sampler-shear",
   "what": "neural_posterior.sample_theta first drew z2 = m2 + shear*a*u1 + c*u2, but the trained density defines y2 = (z2 - m2 - shear*y1)/c, which needs z2 = m2 + shear*u1 + c*u2.",
   "caughtBy": "validate_sampler_matches_density(): largest error between sampler moments and quadrature moments of the density, 0.223 with the wrong sampler and 0.0038 after the fix (400000 draws).",
   "missedBy": "The marginal SBC run with the wrong sampler had passed: uniformity p = 0.4621 for f and 0.7808 for tau (2000 replications, 20 bins). One-dimensional rank histograms do not test the correlation term.",
   "status": "fixed; all neural validation outputs regenerated with the corrected sampler"
  },
  {
   "id": "coarse-quadrature-for-rank-prediction",
   "what": "The analytic rank-bin prediction first used 120 Gauss-Hermite nodes. The binomial pmf of the rank is sharply peaked in z, so the too-narrow and narrow-prior cases were mispredicted (chi-square against the prediction p < 5e-5, printed as 0.0).",
   "caughtBy": "Comparing the fixed prediction for the too-wide case with the mean of 100 independent simulated repeats: the largest bin difference is 1.2 counts against a Monte Carlo standard error near 0.9; 1 of 100 repeats is flagged at p < 0.01.",
   "status": "fixed by a dense trapezoid rule on [-9, 9] with 6001 points"
  },
  {
   "id": "single-run-false-alarm",
   "what": "With seed 8701 the exact conjugate posterior fails the uniformity test at p = 0.0093 and has 2 of 20 bins outside the 99% band.",
   "explanation": "An exact algorithm is still flagged about 1% of the time at a 1% threshold. The repeat study flags it in 2 of 200 independent runs; every wrong algorithm is flagged in 200 of 200.",
   "status": "kept as published output; the seed was not changed"
  },
  {
   "id": "fisher-limit-at-low-snr",
   "what": "At sigma = 0.6 (optimal SNR 4.3) the grid frequency width is 1.50 times the Fisher width and the damping width 0.82 times.",
   "explanation": "The posterior is not Gaussian and is cut by the prior box; the Fisher matrix is only a high-SNR limit.",
   "status": "expected; reported in grid-validation.json"
  },
  {
   "id": "invisible-overtone",
   "what": "With an unmodelled overtone of strength 0.6 at the default source, both posteriors cover the truth only about 74% of the time at nominal 90%, yet the importance-sampling efficiency stays near 0.98 and the residual test flags only about 6% of records.",
   "explanation": "Importance sampling tests the network against the assumed model, not the model against the data. The overtone is largely absorbed by shifting f and tau, so the residual is small.",
   "status": "open limitation of every check in this tutorial"
  },
  {
   "id": "accelerate-matmul-warnings",
   "what": "NumPy 2.0.2 with Apple Accelerate printed spurious divide-by-zero and overflow warnings in matmul for finite inputs.",
   "caughtBy": "Comparing with einsum: largest difference 7e-15.",
   "status": "matrix products in the scripts use einsum"
  }
 ]
}
