Skip to content

prompt: ship autofit-prior-support-clipper (PyAutoFit#1477) - #189

Closed
Jammy2211 wants to merge 8 commits into
mainfrom
claude/autofit-clipper-prior-support-o3jotv
Closed

prompt: ship autofit-prior-support-clipper (PyAutoFit#1477)#189
Jammy2211 wants to merge 8 commits into
mainfrom
claude/autofit-clipper-prior-support-o3jotv

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

The Mind ledger for the prior-support Clipper task, from intake through to
shipped. The code landed as PyAutoFit#1477 (1f4b66a, squash), closing
PyAutoFit#1476; this carries the workflow state that went with it.

What this changes

File Why
complete/2026/08/autofit-prior-support-clipper.md New completion record; the draft/ prompt folded in as a rename (R053)
complete/index.md Regenerated by lifecycle.py record
dashboard.md Regenerated via pyauto-brain intake --apply dashboard
draft/feature/autofit/clipper_validation_campaign.md Phase-2 prompt, updated with what phase 1 actually shipped

active.md nets to no change — the task was added on routing and removed on
completion, which is the intended lifecycle. lifecycle.py check is OK.

What the record holds

The completion record is deliberately heavy on traps, because several of them
were expensive and none are obvious from the diff:

  • The design decision: the bound-kind inset (two-sided / unbounded /
    half-open) rather than one relative margin. The obvious single-margin form is
    -inf + inf = NaN for a GaussianPrior, which would have made the feature
    actively harmful on exactly the models it targets, with a symptom
    indistinguishable from the bug being fixed.
  • bounds_from_model → scipy: minimize reads a (lower, upper) tuple as a
    sequence of (min, max) pairs, silently mis-fitting two-parameter models.
  • The process lesson: the first commit shipped an undefined optimize in
    LBFGS._fit, and the full 1790-test suite passed against it, because nothing
    in the library suite ever executes an LBFGS fit. A green suite is not coverage.
  • Harness traps for whoever runs phase 2: the .completed short-circuit,
    fit() rebuilding search.paths, the deleted search_internal folder, and
    the need to seed random and numpy before every comparison fit.

Phase-2 prompt update

The most load-bearing addition. Phase 1 verified that the clipper does not
enter the search identifier — no clipper / ClipperNone / ClipperPriorBox
all resolve to the same output directory. That is good for back-compat and
dangerous for the validation campaign, whose arms 1 and 2 differ in nothing else.
Stacked with the .completed short-circuit, arm 2 can silently return arm 1's
numbers and look like a clean run
. The prompt now says so, with the mitigation
and the open question of whether the clipper should enter the identifier.

Also recorded there: arm 3 (momentum reset) does not exist yet — phase 1 ships
the mask it would need but no reset; the new n_clipped_lane_steps counter to
record; and that the float32 save_json bug is unfixed, so counters must be
captured independently of the result object.

Follow-ups filed, not fixed

  1. float32 not JSON serializable in result output (paths/directory.py:80).
  2. A crashed run poisons the next run of the same name via JSONDecodeError.
  3. Declare LogGaussianPrior's (0, ∞) support on the prior itself.
  4. Decide whether the clipper belongs in the search identifier.

🤖 Generated with Claude Code


Generated by Claude Code

Jammy2211 added a commit that referenced this pull request Aug 16, 2026
…llow-ups filed (#194)

Two sessions independently wrote a completion record for the prior-support
Clipper. #189 was opened first, by the session that actually shipped
PyAutoFit#1477; #190 (mine) landed later because I never listed open PRs before
starting. This consolidates them so main holds one record, not two.

complete/2026/08/prior-support-clipper.md is now the union. The detailed body
comes from #189 and is materially richer than what I wrote: the bound-kind
design decision (why one relative margin is wrong in two silent ways), eight
traps measured against a running install, the verification log (bit-identity
10/10, core promise 8/8, guards verified by inversion), and the process lesson
-- a first commit shipped an undefined `optimize` in LBFGS._fit and the full
1790-test suite passed against it, because nothing in the suite executes an
LBFGS fit. My "what shipped after" section is appended, since #189 predates
#1478/#1479/#1480 and so records follow-ups 1 and 2 as open when they are now
fixed.

#189's phase-2 harness traps salvaged into the campaign prompt -- the
.completed short-circuit, fit() rebuilding search.paths so instance-level
patches are discarded, search_internal being deleted on success, seeding both
random AND numpy, and a box containing the optimum never exercising the
clipper. Also that arm 3 does not exist yet (phase 1 ships the mask, no reset)
and two phase-1 measurements to carry in as priors.

Follow-ups 3 and 4 filed as prompts rather than left in a record:
loggaussian_prior_declares_own_support.md and clipper_in_search_identifier.md.
The second is Autonomy: human-required -- both answers orphan or collide
someone's stored results, and it is best decided BEFORE phase 3 so the
re-baseline and any re-keying are not entangled.

One correction absorbed from #189: test_nautilus single_core_builds_no_pool
PASSES in CI and fails only in local venvs (both 3.12 and 3.13, two independent
sessions). "Not caused by this work" is right; "pre-existing on clean main" --
the looser phrasing used in #1479 and #1480's bodies -- is wrong. Recorded.


Claude-Session: https://claude.ai/code/session_01FzF2XmKQaqZRWZfZMxvTNR

Co-authored-by: Claude <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator Author

Closing as consolidated into main, not as rejected. Everything here landed; nothing was dropped.

Two sessions independently wrote a completion record for the prior-support Clipper. This PR was opened first, by the session that actually shipped PyAutoFit#1477. I opened #190 later without listing open PRs — that duplication is mine, and this PR's content is the better of the two.

Consolidated by #194 (3c6fc0a).

Where each piece landed

complete/2026/08/prior-support-clipper.md — the union. It keeps the other slug because six things already reference it, but the body is this PR's, verbatim: the bound-kind design decision, the eight traps measured against a running install, the verification log (bit-identity 10/10, core promise 8/8, 249 → 0 lane deaths with 252 clips, guards verified by inversion), the corrections section, and the process lesson — a first commit shipping an undefined optimize in LBFGS._fit while the full 1790-test suite passed, because nothing in the suite executes an LBFGS fit.

A "What shipped after this record was first written" section is appended, because this PR predates three further merges and so lists follow-ups 1 and 2 as open when they are now fixed:

PR merge closes
#1478 bbceff6 clip count + Constrained Lane-Steps in search.summary
#1479 b6e89cd follow-up 1 — the float32 save_json crash
#1480 5c9244b follow-up 2 — the poisoned rerun

draft/feature/autofit/clipper_validation_campaign.md — this PR's phase-2 additions, including all six harness traps (the .completed short-circuit, fit() rebuilding search.paths so instance-level patches are discarded, search_internal deleted on success, seeding random and numpy, and a box containing the optimum never exercising the clipper), that arm 3 does not exist yet, and the two phase-1 measurements as priors.

The arm-collision hazard was landed separately and urgently in #193, because the campaign was about to be handed to a GPU session. I re-verified it against main rather than relaying it — no clipper / ClipperNone / ClipperPriorBox all give 2bada4747f74bc46bf812605a762def9. Good catch; it would have silently invalidated the campaign's central comparison.

Follow-ups 3 and 4 are now prompts rather than lines in a record: draft/bug/autofit/loggaussian_prior_declares_own_support.md and draft/feature/autofit/clipper_in_search_identifier.md. The second is Autonomy: human-required — both answers cost something real, and it is best decided before phase 3 so the re-baseline and any re-keying are not entangled. Follow-up 5 (NUTS) stays out of scope in the campaign prompt.

One thing this PR got right that I got wrong

The correction here about test_nautilus.py::test__single_core_builds_no_pool is the accurate one. It passes in CI and fails only in local venvs — now confirmed on 3.12 and 3.13 from two independent sessions. I used the looser "pre-existing on clean main" phrasing in #1479's and #1480's bodies, which is wrong. Those are merged, so the correction is recorded in the consolidated file instead.

The branch claude/autofit-clipper-prior-support-o3jotv is safe to delete.


Generated by Claude Code

@Jammy2211
Jammy2211 deleted the claude/autofit-clipper-prior-support-o3jotv branch August 17, 2026 20:58
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