diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-28 09:08:22 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-28 09:08:22 +0300 |
| commit | 94479238557adcab33a95fefbf752a3742b8a8ba (patch) | |
| tree | 8a97bb2d616c58409617c4b5a3b5ed928246e827 /tests | |
| parent | fef68fe90d7f00d7d831c335b03119f11c2c927b (diff) | |
nr0: dry-run reuses real paging/redirect logic via shared helpers
collect_dry_run_page_plan re-derived page_count via the ceil formula and
redirect_count via a magic "*4+2", duplicating logic owned by
album_page_records (pagination) and render_page_view_redirects (redirect
files). The preview could silently drift from a real --generate.
Single source of truth:
- album_page_count_for_image_count (album-photo-select.source.sh) owns the
MAXPREVIEWS-per-page grouping count that album_page_records realises.
- ALBUM_REDIRECTS_PER_PAGE=4 / ALBUM_REDIRECTS_LAST_PAGE_EXTRA=2 +
album_redirect_count_for_page_count (album-render.source.sh) own the
per-page (4) plus last-page-extra (2) redirect tally that
render_page_view_redirects actually emits.
dry-run now predicts both counts through these helpers (no dist files
touched, side-effect free). Confirmed the real redirect count is
page_count*4+2, so output is byte-identical: partial-final-page (3 preview
pages / 14 navigation redirects) and empty album (0 / 0) unchanged.
Regenerated bin/shuriken; just test/shellcheck/check-generated all pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions
