fix(410): log scan cancellation below ERROR (user-initiated, not a failure) #453

Merged
timothy merged 1 commits from fix/410-scancancel-log-level into main 2026-07-18 18:18:10 +02:00
Owner

User-initiated scan cancellation (ScanCanceled) was logged at ERROR across all four library-scan handlers (Jellyfin/Emby/Plex/local), creating false-alarm noise. Split each to LogInformation for ScanCanceled and keep LogError for genuine failures. All sites enumerated via grep; LastScan-stamping behavior unchanged. Tests added for local + Jellyfin.

Review: backend log-level leaf, no behavior change; orchestrator inline review (verified if/else with braces, all cancellation sites covered). Build + 7 tests green. 2 pre-existing BOMs stripped.

fixes #410

User-initiated scan cancellation (`ScanCanceled`) was logged at ERROR across all four library-scan handlers (Jellyfin/Emby/Plex/local), creating false-alarm noise. Split each to `LogInformation` for `ScanCanceled` and keep `LogError` for genuine failures. All sites enumerated via grep; `LastScan`-stamping behavior unchanged. Tests added for local + Jellyfin. **Review:** backend log-level leaf, no behavior change; orchestrator inline review (verified if/else with braces, all cancellation sites covered). Build + 7 tests green. 2 pre-existing BOMs stripped. fixes #410
timothy added 1 commit 2026-07-18 16:57:47 +02:00
fix(410): log scan cancellation below ERROR (user-initiated, not a failure)
Build ErsatzTV Image / CI image pin matches docker/ci (pull_request) Successful in 6s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 5s
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 8s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 6m56s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 7s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 39s
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 14m20s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 19m2s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
7d71fb9f94
Scan cancellation surfaces as ScanCanceled, an ordinary BaseError, so all
four scan handlers (Jellyfin/Emby/Plex/local) logged it at ERROR alongside
genuine failures. A user cancelling a scan (or a container restart mid-scan)
is not an error; this was training operators to ignore scanner ERROR lines,
corrosive precisely because #264 showed scanner failures can be silent.

Each handler's Left-result loop now branches on `error is ScanCanceled`:
logs Information ("Scan of {Name} was canceled") for cancellation, keeps
LogError for every other BaseError. No behavior change to LastScan
stamping (still correctly skipped on any Left, cancellation included).

fixes #410

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
Owner

Review-verdict: MERGEABLE @ 7d71fb9f94
Backend log-level leaf, no behavior change. All four scan handlers' cancellation path → LogInformation (genuine failures stay LogError); orchestrator verified if/else-with-braces + full site enumeration. Build + 7 tests green.

Review-verdict: MERGEABLE @ 7d71fb9f94fa0b93c83bb5f2da67feb48cf16214 Backend log-level leaf, no behavior change. All four scan handlers' cancellation path → LogInformation (genuine failures stay LogError); orchestrator verified if/else-with-braces + full site enumeration. Build + 7 tests green.
timothy merged commit ebb9a40dc3 into main 2026-07-18 18:18:10 +02:00
Sign in to join this conversation.