Skip to content

Harden sparse Hardcover and LOC book metadata; quiet verbose mapping logs - #1

Draft
HadNutz wants to merge 4 commits into
mainfrom
fix/seerrng-book-metadata-failures-20261107
Draft

HadNutz wants to merge 4 commits into
mainfrom
fix/seerrng-book-metadata-failures-20261107

Conversation

@HadNutz

@HadNutz HadNutz commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Scope

Targeted, non-deploying ChaptarrNG hardening after SeerrNG book-request diagnostics on 2026-11-07.

Observed failures

  • LOC records sometimes have description: [], and the mapper falls through to an invalid (string)JArray cast ("Can not convert Array to String").
  • Hardcover catalog work 374551 repeatedly raises ArgumentNullException (input) while book/edition title fields are sparse. The BookInfo mapper passed nullable titles to title-cleanup / regex paths.
  • Native book lookups remain slow (Alice test: ~14–17 s after disabling supplemental sources). Information-level [PERF] logs generated thousands of lines during repeated mapping.

Changes

  • Normalize LOC text fields from scalar, empty, nested and mixed-shape JSON tokens; preserve valid record URL validation.
  • Guard missing edition/book titles in BookInfo mapping, preserve provider identity, and skip null edition objects.
  • Move five per-record [PERF] BookInfo messages from Info to Debug.
  • Add regression tests for empty/nested LOC fields and a native Hardcover work/edition with null titles.

Validation / limitations

  • Source change and regression fixtures committed; branch compare: four files, four commits.
  • Not yet executed: NUnit suite / Docker build (this environment does not contain a .NET SDK; this fork's trusted CI requires separate runner authorization).
  • Not a measured speed fix: upstream Hardcover API calls remain serialized/rate-limited; SeerrNG's repeated multi-provider fallbacks and request-modal behavior require an upstream SeerrNG patch.
  • Does not touch database schema, identity dialect, the user's deployed custom image, docker networking, or download clients.

Please run targeted NUnit tests in trusted CI and review sparse work-title handling before considering a new image.

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.

1 participant