Repository navigation
Description
Overview
fix: order grouped model labels by their numeric suffix
Plan
Update _find_groups in autofit/mapper/prior_model/representative.py to use numeric suffix ordering only with a shared prefix. Preserve bare integer compaction and lexical fallback. Test lens_0..29, source_0..19, nonnumeric/mixed names and singletons; run mapper and full suite.
Tier: glance — merge mode: human /prm.
Detailed implementation plan
Primary repository: PyAutoFit. Current branch: main, clean; no existing open PR or active Mind claim at selection. Suggested branch: feature/prior-summary-ranges. Each task uses an isolated branch and is handled sequentially within the four-task request. Tests must pass before shipping; report blockers honestly. User authorized implementation of four linked dashboard tasks; no merge or release authorization. Heart: STALE locally, published feed unreachable.
Original Prompt
Starting prompt
PyAutoFit prior-model summary header prints wrong range labels for grouped priors
Type: bug
Target: PyAutoFit
Repos:
- PyAutoFit
Difficulty: small
Autonomy: safe
Priority: normal
Status: formalised
Consequence: glance
Witness: a unit test over _find_groups (or its representative-key helper) with names lens_0..lens_29 asserts the collapsed key is 'lens_0 - lens_29', not 'lens_0 - lens_9'; same for source_0..source_19.
Review-minutes: 3
Unattended: ready
PyAutoFit prior-model summary header prints wrong range labels for grouped priors. It prints 'lens_0 - lens_9' and 'source_0 - source_9' despite there being 30 lens entries and 20 source entries. This is a real display bug, not a composition error: autofit/mapper/prior_model/representative.py:88 computes min(names)/max(names) on the full name strings, so 'lens_29' sorts below 'lens_9' lexicographically. The int fast-path (map(int, names)) raises ValueError for names like 'lens_29', so it falls through to the lexicographic branch, which then picks the wrong endpoints. The detailed dump and the N=290 total are correct — only the collapsed header range label is wrong. Fix should order by the numeric suffix when the names share a common non-numeric prefix, and leave genuinely non-numeric names on the existing lexicographic behaviour.
Activity
Jammy2211 commentedon Oct 17, 2026
Shipped
Merged #1706 at 6579ab8 on 2026-10-17, following the user's /prm authorization. fix: show correct numeric endpoints in grouped model summaries
All exact-head GitHub test legs passed (Python 3.12, 3.13, no-JAX); applicable docs checks passed. Model/search unique identifiers and exact output-folder paths were checked against unmodified main and remain unchanged. Pending release; merging does not publish a release.