Overview
Executes the remainder of the #1332 audit's recommended fix batch, now that the #1331 decision hub is resolved and shipped (#1345, #1348) and F3/F10 (#1349), F5 (#1334), F7(c) (#1345) have landed. Prompt: PyAutoMind/bug/autofit/ep_statistics_fix_batch.md.
Plan
- F1 / F7(a) —
MeanField.__truediv__ / __pow__ pass log_norm into the plates ctor slot (evidence silently dropped; a float lands in _plates). Fix the ctor calls; fix __pow__'s meaningless log_norm * other.log_norm branch.
- F2 (+extended) —
GammaMessage.kl and BetaMessage.kl compute KL(other‖self) while Normal/TruncatedNormal compute KL(self‖other); EPHistory.kl_divergence sums per-variable KLs, so mixed graphs mix directions. Contract: self.kl(other) = KL(self‖other), documented once on AbstractMessage.kl, aligned family-wide, enforced with a numerical property test (sample-based KL estimate per family).
- F4 —
AbstractMessage.update_invalid scalar branch is self-flagged broken (the BAD_PROJECTION recovery path). Fix + test both branches.
- F8 — delete dead/suspect quasi-Newton variants in
laplace/newton.py (diag_sr1_bfgs_update → returns None; bfgs1_update sign-disputed vs exported bfgs_update; diag_sr1_update_ unused).
Out of scope (parked with notes on #1332): F6 truncated-KL moments, F7(b) factor-evidence recording design, F9 private scipy import.
Validation: full suite; new unit tests per fix; autofit_workspace_test/scripts/graphical/ep_{parity,deterministic,exact}.py as integration smoke.
Branch survey
| Repository |
Current Branch |
Dirty? |
| ./PyAutoFit |
main (post #1349) |
clean |
Suggested branch: feature/ep-statistics-fix-batch. PyAutoFit claim-free (verified).
Autonomy: supervised (--auto chain, human directed "roll straight into the #1332 fix batch" 2026-07-10; heart-ack 6-reason set binds).
🤖 Generated with Claude Code
Overview
Executes the remainder of the #1332 audit's recommended fix batch, now that the #1331 decision hub is resolved and shipped (#1345, #1348) and F3/F10 (#1349), F5 (#1334), F7(c) (#1345) have landed. Prompt:
PyAutoMind/bug/autofit/ep_statistics_fix_batch.md.Plan
MeanField.__truediv__/__pow__passlog_norminto theplatesctor slot (evidence silently dropped; a float lands in_plates). Fix the ctor calls; fix__pow__'s meaninglesslog_norm * other.log_normbranch.GammaMessage.klandBetaMessage.klcompute KL(other‖self) while Normal/TruncatedNormal compute KL(self‖other);EPHistory.kl_divergencesums per-variable KLs, so mixed graphs mix directions. Contract:self.kl(other) = KL(self‖other), documented once onAbstractMessage.kl, aligned family-wide, enforced with a numerical property test (sample-based KL estimate per family).AbstractMessage.update_invalidscalar branch is self-flagged broken (the BAD_PROJECTION recovery path). Fix + test both branches.laplace/newton.py(diag_sr1_bfgs_update→ returnsNone;bfgs1_updatesign-disputed vs exportedbfgs_update;diag_sr1_update_unused).Out of scope (parked with notes on #1332): F6 truncated-KL moments, F7(b) factor-evidence recording design, F9 private scipy import.
Validation: full suite; new unit tests per fix;
autofit_workspace_test/scripts/graphical/ep_{parity,deterministic,exact}.pyas integration smoke.Branch survey
Suggested branch:
feature/ep-statistics-fix-batch. PyAutoFit claim-free (verified).Autonomy: supervised (
--autochain, human directed "roll straight into the #1332 fix batch" 2026-07-10; heart-ack 6-reason set binds).🤖 Generated with Claude Code