refactor: post-phase-3 consolidation (behaviour-preserving, witness-proven)#10
Merged
Merged
Conversation
…distortion) Phase-3 regression: covers_target broke the ACS path — FLC headers carry lookup-table distortion astropy can only resolve with fobj; JWST cal files don't, so the four-band integration never tripped it. Caught by the refactor witness baseline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
…rash Drifting stars at maxiters=10 hit a malformed overlap_slices inside photutils 2.3 when the fitting region overruns the +10 window; +20 restores its designed warn-and-skip handling. Broke the ACS path on main (star set changed by the phase-2/3 selection fixes); JWST ePSFs shift marginally with the wider window — disclosed on issue #8. edge_margin follows the window (46). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
- reduce_target decomposed into per-stage functions with a _StageContext; record layout and key order unchanged. - autoreduce/validation/parity.py extracts sub-pixel registration + ratio statistics; slacs0008 and cosmos_web_ring scripts thinned onto it (registered_ratios is a superset of both originals). - drizzle/_common.py: chdir_scratch context manager + combine_provenance (canonical key order preserved); both backends rewritten onto them. - reject_crowded vectorized (broadcasted distance matrix); randomized equivalence test against the original loop. 85 tests. Witness byte-comparison vs _baseline_refactor follows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
…eadroom Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
This was referenced Jul 9, 2026
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.
Behaviour-preserving consolidation after three fast instrument phases, per #8. Default present-and-wait run; maintainer approved plan and ship in-session (incl. Heart-YELLOW acknowledgement of the same pre-existing reason set as PRs #3/#5/#7).
Proof of preservation
End-to-end witnesses re-run after the refactor against baselines captured immediately before it (same cached inputs, offline):
slacs0008-000485/85 unit tests (incl. a new randomized equivalence test for the vectorized crowding rejection). Public API unchanged.
The refactor
pipeline.reduce_targetdecomposed into per-stage functions (_acquire…_evict) sharing a_StageContext; record layout/key order unchanged.autoreduce/validation/parity.py: sub-pixel registration + parity statistics extracted from the integration scripts (both thinned ontoregistered_ratios, a superset of the originals).drizzle/_common.py:chdir_scratchcontext manager +combine_provenance(canonical key order) shared by both combine backends.psf/stars.reject_crowdedvectorized (broadcasted distance matrix, identical selection semantics).Disclosed fix riders (found by the witness baselines themselves)
fobj: the footprint filter crashed on ACS FLC headers (lookup-table distortion needs the open HDUList) — a phase-3 regression on the ACS path that JWST data never trips.overlap_slices) when recentering drift overruns the +10 window; +20 restores its designed warn-and-skip. JWST ePSFs shift marginally with the wider window (disclosed on refactor: post-phase-3 consolidation (behaviour-preserving) #8); baselines were captured with both riders in, so the refactor's byte-identity claim is unaffected.Gate legs
🤖 Generated with Claude Code
https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3