prompt: route covariance-interpolator-rng-seed (#1450) → start_library - #127
Merged
Merged
Conversation
Issue PyAutoFit#1450 filed; prompt advanced draft/bug/autofit/ -> active/ and registered in active.md. Records the finding that the prompt's premise was wrong: the unseeded np.random.random() in the test body is not the dominant cause. The dominant source is dynesty's rstate (Generator(PCG64(None)), OS entropy), with the stdlib random module used by initializer.py as a third source. Measured pre-fix failure rate 1.65% (33/2000, 95% CI 1.18-2.31%), and the sibling test_single_variable - which has no random call at all - was flaking worse at 3.6%. Also files the follow-up the fix exposed: PyAutoFit has no supported way to seed a search, because AbstractDynesty.search_kwargs is a closed dict and rstate cannot be threaded through it. That is why the fix has to monkeypatch a third-party module from a test, and why users cannot reproduce a fit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016vdGab4C5rWumTCXkWHPyh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mind state for the PyAutoFit interpolator flake — the Class B release blocker
that killed the 2026.8.2.1 live release.
Paired with PyAutoLabs/PyAutoFit#1451 (fix) and PyAutoLabs/PyAutoFit#1450 (issue).
Normally this would land on
mainviaprompt_sync_push; this session isbranch-scoped, hence a PR.
What changed
draft/bug/autofit/covariance_interpolator_test_unseeded_rng.md→active/, header advanced toStatus: issuedwith the issue URL.active.md— newcovariance-interpolator-rng-seedentry.draft/feature/autofit/search_seed_reproducibility.md— new follow-upprompt (see below).
python3 scripts/lifecycle.py check→ OK.Why the registry entry is long
It records that the prompt's premise was wrong, which matters more than the
fix. The prompt attributed the flake to the unseeded
np.random.random()in thetest body. Measurement says otherwise:
touching anything, as the prompt's step 2 required.
np.randomleaves std at 1.95 of 2.05; the test still fails.The dominant source is dynesty's
rstate(Generator(PCG64(None)), OSentropy), with the stdlib
randommodule used byinitializer.pythird.25.0496 ± 0.0039, 500× tighter. The autouse
limit_maxcallfixture is whatturns the assertion into a coin flip.
test_single_variablewas flaking worse (3.6%) with no randomcall of its own.
LinAlgErrorguards are explicitly ruled out as a different root cause(rank-deficient fixture matrix, cond 1.3e17 — deterministic input).
The entry also records the known limitation the fix does not solve, so nobody
later reads "seeded" as "the assertion is now meaningful".
The follow-up prompt
search_seed_reproducibility.mdcaptures the real gap the fix exposed:PyAutoFit has no supported way to seed a search.
AbstractDynesty.search_kwargsis a closed dict, sorstatecannot be threadedthrough even though
dynestyaccepts it — which is why the fix must monkeypatcha third-party module from a test, and why users cannot reproduce a fit. It flags
the identifier/serialization trap (store the integer seed, not a
Generator;decide deliberately about
__identifier_fields__).Filed rather than folded in, to keep the release-unblocking change test-only.
🤖 Generated with Claude Code
https://claude.ai/code/session_016vdGab4C5rWumTCXkWHPyh
Generated by Claude Code