Skip to content

prompt: complete covariance-interpolator-rng-seed (PyAutoFit#1451 merged) - #128

Open
Jammy2211 wants to merge 1 commit into
mainfrom
claude/covariance-interpolator-rng-seed-8zexp3
Open

prompt: complete covariance-interpolator-rng-seed (PyAutoFit#1451 merged)#128
Jammy2211 wants to merge 1 commit into
mainfrom
claude/covariance-interpolator-rng-seed-8zexp3

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Closes out the task now that PyAutoLabs/PyAutoFit#1451 is merged (282d8e1e,
auto-closing PyAutoLabs/PyAutoFit#1450). The Class B release blocker that killed
the 2026.8.2.1 live release is cleared
, green on Python 3.12 and 3.13.

Branch restarted from main — the previous PR (#127) is merged, so this is fresh
work rather than commits stacked on merged history. The force-with-lease that
repointed the branch discarded only e3419110, the commit squash-merged as
acc4a7dd; verified the tree diff against main for every touched path is empty
before pushing.

What changed

All four edits produced by scripts/lifecycle.py record ... --apply — the ship
skills' own primitive, not hand-editing:

  • complete/2026/08/covariance-interpolator-rng-seed.md — new rich completion
    record, with the original prompt folded in under ## Original prompt.
  • active/covariance_interpolator_test_unseeded_rng.md — removed (folded into
    the record).
  • active.mdcovariance-interpolator-rng-seed section removed.
  • complete/index.md — regenerated (890 records).

lifecycle.py check → OK · lifecycle.py index --check → OK.

Why the record leads with the finding, not the fix

The prompt's premise was wrong, and that is the part worth surviving:

  • It blamed the unseeded np.random.random() in the test body and called seeding
    "a one-liner". Seeding only that leaves std at 1.95 of 2.05 — the test still
    fails.
    The dominant source is dynesty's rstate
    (Generator(PCG64(None)), OS entropy, reachable from neither np.random nor a
    local Generator), with the stdlib random module used by initializer.py
    third. All three must be seeded.
  • Measured pre-fix failure rate 1.65% (33/2000, 95% CI 1.18–2.31%) — taken
    before any change, as the prompt's step 2 required.
  • The tolerance is not mis-calibrated. A full untruncated search recovers
    25.0496 ± 0.0039 — 500× tighter — so abs=5.0 is correct and must not be
    loosened. limit_maxcall is what turns the assertion into a coin flip.
  • The sibling was worse. test_single_variable has no random call of its own
    yet was flaking at 3.6%, more than double the test that got blamed.
  • The LinAlgError guards are a separate defect — rank-deficient fixture
    matrix (rank 6 of 9, cond 1.3e17), deterministic input — not the same
    nondeterminism in disguise.

The record also carries the known limitation, so nobody later reads "seeded" as
"the assertion is now meaningful": under maxcall=1 both are frozen-RNG
regression checks, with the measured cost of restoring real convergence.

It also notes this closes the "gate said GREEN, then the live release
contradicted it" question in draft/triage/nightly_release_blocked_eight_nights.md
— the gate's evidence was not stale; the release run drew a different random
sample. That removes the motive for a gate-vs-release redesign this evidence was
about to justify.

Still open

draft/feature/autofit/search_seed_reproducibility.md stays in draft/ — the
real fix. PyAutoFit has no supported way to seed a search, which is why the
merged change must monkeypatch a third-party module from a test, and why users
cannot reproduce a fit.

🤖 Generated with Claude Code

https://claude.ai/code/session_016vdGab4C5rWumTCXkWHPyh


Generated by Claude Code

…ged)

Advances the task to complete/2026/08/ and removes it from active.md.
PyAutoFit#1451 merged as 282d8e1e, auto-closing issue #1450; the Class B
release blocker that killed 2026.8.2.1 is cleared, green on 3.12 and 3.13.

The record leads with the finding rather than the fix: the prompt's premise
was wrong. The unseeded np.random.random() it blamed is a minor contributor
- seeding only it leaves std at 1.95 of 2.05 and the test still fails. The
dominant source is dynesty's rstate (Generator(PCG64(None)), OS entropy,
reachable from neither np.random nor a local Generator), with the stdlib
random module used by initializer.py third. Measured pre-fix failure rate
1.65% (33/2000, 95% CI 1.18-2.31%).

Also recorded: the tolerance is NOT mis-calibrated (a full search recovers
25.0496 +/- 0.0039, 500x tighter) so abs=5.0 must not be loosened; the
sibling test_single_variable was flaking worse at 3.6% with no random call
of its own; and the LinAlgError guards are a separate defect (rank-deficient
fixture matrix, deterministic input) rather than the same nondeterminism.

The known limitation is recorded so nobody later reads "seeded" as "the
assertion is now meaningful" - under maxcall=1 both are frozen-RNG
regression checks. The real fix stays open as
draft/feature/autofit/search_seed_reproducibility.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016vdGab4C5rWumTCXkWHPyh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants