Skip to content

test: move positions_threshold fixture off the symmetry axis - #861

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/positions-threshold-fixture-off-axis
Nov 14, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/positions-threshold-fixture-off-axis

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

test__positions_threshold_from pinned a solver tie-break, not a threshold. The lens centre (0.1, 0.0) and source (0, 0) sat on the x = 0 grid axis, so the point solver's branch was decided by floating-point noise: a 1e-15 nudge moved the pinned threshold ×43 (PyAutoArray#519 flipped it once already, PyAutoLens#721). The lens now sits at (0.06, 0.08), off every grid symmetry line (x = 0, y = 0, y = ±x), and the two thresholds are re-pinned once.

Closes #860

API Changes

None — test-only change.

Test Plan

  • pytest test_autolens -x: 1021 passed, 1 xfailed
  • Witness: ±1e-6 nudges of the lens centre in y and x
lens centre threshold factor=5 1e-6 nudge: max rel change images unchanged
old (0.1, 0.0) 0.0009898320 0.004949160 9.77e-01 no
new (0.06, 0.08) 0.0012770598 0.006385299 2.51e-08 yes (bit-identical)

At ±1e-5 the new fixture still moves < 9.3e-7; at ±1e-4 it snaps to a neighbouring solver cell (pixel_scale_precision=0.001), as expected.

Not in scope

test__positions_likelihood_from__mass_centre_radial_distance_min uses the same on-axis tracer and carries its own knife-edge position pins. The Witness names only the threshold pins, so it is left as is; it can follow up.

Validation checklist (--auto run — plan was not pre-approved)

  • Effective level: safe (header: safe, cap: bug → safe)
  • Plan: on the issue (test: move positions_threshold fixture off the symmetry axis #860), written at start, unmodified since
  • Gate: tests 1021 passed / 1 xfailed (PyAutoLens; test-only diff, no public API → no downstream suites) · smoke n/a (test-only diff, no downstream script surface) · review CLEAN — independent Sonnet reviewer; claim "bit-identical and moves the thresholds by < 3e-8 relative." → basis-cited: its own ±1e-6 run (rel 2.51e-8, 1.01e-8, 9.0e-9, 1.74e-8; positions diff 0.0) · adversary (leg 5, Sonnet): nothing falsified; control confirmed the old fixture flips at 1e-15 · Heart dev-ship GREEN for PyAutoLens (shown, non-blocking: PyAutoLens main checkout 1 uncommitted change [another task's paper_jax/paper.md]; manifest drift ×2; PyAutoArray open PR 10d; no release rehearsal for current source — all within the shift's heart-ack)
  • Human: plan sound in hindsight?
  • Human: diff matches plan (no scope creep)?
  • Human: merge, amend, or reject — then log the outcome

🤖 Generated with Claude Code

The lens centre (0.1, 0.0) and source (0, 0) sat on the x = 0 grid axis,
so the point solver's branch was a sub-ULP tie-break: a 1e-15 nudge moved
the pinned threshold x43. Move the lens to (0.06, 0.08), off every grid
symmetry line, and re-pin once. A 1e-6 nudge now leaves both images
bit-identical and moves the thresholds by < 3e-8 relative.

Closes #860

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Nov 14, 2026
@Jammy2211
Jammy2211 merged commit d9a2274 into main Nov 14, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/positions-threshold-fixture-off-axis branch November 14, 2026 17:58
@pyautolabs-bot pyautolabs-bot Bot removed the pending-release PR queued for the next release build label Nov 19, 2026
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.

test: move positions_threshold fixture off the symmetry axis

1 participant