Skip to content

chore: sync develop with main#338

Merged
chodeus merged 11 commits into
developfrom
main
Jul 20, 2026
Merged

chore: sync develop with main#338
chodeus merged 11 commits into
developfrom
main

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated back-merge of main into develop. Sync direction is main -> develop and shared files are byte-identical, so this should merge cleanly. Review and merge to bring main's changes (releases, fixes, dependency bumps) onto develop. Opened by the sync-develop workflow.

github-actions Bot and others added 11 commits July 14, 2026 21:23
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…0e3 (#339)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…c66 (#344)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…727 (#348)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…2f3 (#350)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…8c9 (#353)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…91a (#354)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…y-state border churn (#356)

* fix(poster_renamerr): report only genuine Plex uploads and stop steady-state border churn

Audit of the plex apply path (apply_method == "plex") confirmed the
skip-unchanged pipeline is sound, but surfaced four fixes:

- Notifications: the scheduled run notified from the STAGED set and
  discarded the uploader's outcome, so skipped/failed posters (and
  per-run re-flow retries) appeared in Discord/Notifiarr as uploads
  every schedule. The uploader now returns a per-poster "uploaded"
  record (action == "updated" only) and the plex path notifies from
  that; when nothing genuinely uploaded a one-line heartbeat replaces
  the poster list ("No posters were uploaded (nothing changed)." /
  "(N failed — check the logs)."). Kometa path unchanged. The
  formatter also renders artist/album now, so music-only runs no
  longer misreport as "No files were renamed."

- Border churn + /tmp leak: the plex path ran the border pass with
  process_all=True, sweeping ALL matched rows. Layer-A-skipped rows
  point at prior runs' deleted staging dirs, so every poster was
  re-encoded into a recreated stale /tmp/chub_poster_plex_* dir that
  nothing cleans (RAM-backed /tmp on Unraid) — pure waste, nothing
  uploads from there. New manifest_only flag hard-restricts the plex
  border pass to this run's manifest, overriding every full-library
  trigger (process_all, holiday reset_all, missing manifest). Kometa
  keeps its full-library re-border.

- Wrong-year live upload: the live title-only fallback accepted a
  LONE candidate with no year check, so a poster could land on a
  same-title sibling of a clearly different year (e.g. a 2018 poster
  on the 1978 original) when the cache missed. The single-candidate
  branch is now year-guarded like the multi-candidate one; a
  candidate with NO year is kept (metadata gap must not reject the
  only candidate, mirroring PlexMediaIndex._disambiguate_by_year).

- Border-excluded assets: with borders enabled the border op is the
  sole file writer, so an excluded title never got a staged file —
  the plex uploader failed "Could not read poster file" on every run
  and the kometa destination stayed empty. Excluded assets now get a
  crash-safe unbordered copy staged (exclusion means no border, not
  no poster).

Also: structural dry-run guard on the hash-equal persist branch, and
a collection analogue of the media skip-column persistence test
(source_file_hash / uploaded_libraries / file_hash / file_mtime /
original_file must survive re-sync or collections would re-upload
every run — previously untested).

* fix(plex): fail closed on malformed candidate year in lone-hit guard

Review follow-ups: a non-empty malformed year on the lone title-only
candidate now rejects it (only genuinely missing years are treated as
a metadata gap), with a test locking it; shortened the year-guard
comment; closed the file handle in the excluded-asset staging test.
def _subset_harness(tmp_path, monkeypatch, exclusion_list=None):
"""Shared setup for manifest-mode runs: two real source posters (ids 1/2),
a fake DB, notifications stubbed. Returns (br, dest_dir, rows_by_id)."""
import backend.modules.border_replacerr as border_mod
@chodeus
chodeus merged commit 263fbfc into develop Jul 20, 2026
11 checks passed
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