Repository navigation
fix(hardcover): carry author-work language from default editions (#2241) - #2246
Conversation
…allee#2241) Signed-off-by: Kevin Atlee <175901901+kevinatlee@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Follow-up from real-world testing after #2246: the original blank-language fix was necessary, but we found that Hardcover's default edition can itself be a translation, so using that edition's language as authoritative work-level language can produce false non-English classifications. Penelope Douglas reproduced this strongly: 49/78 author works were rejected by an English-only profile, including No files were deleted; #2247's preview/safeguards exposed the bad evidence before apply. I've documented the reproduction in #2753 and submitted #2754 to resolve language from safer edition evidence while preserving the strict-profile behavior #2246 originally fixed. |
Summary
Hardcover author-work queries now select language through the default ebook and audio edition relations, allowing the existing
hcBook/toBook()path to populateBook.Language. This prevents strict unknown-language profiles from rejecting matching Hardcover works while continuing to reject known non-allowed languages.Closes #2241.
Why minimal
Checklist
git commit -schangelog.d/Test plan
go test -race ./internal/metadata/hardcover -count=1go test ./internal/metadata/... -count=1go build ./...go vet ./...golangci-lint run --timeout=5m(v2.11.4; 0 issues)A repository-wide race run was also attempted locally. The changed Hardcover package passed, but the overall command did not complete cleanly on macOS:
internal/apireached its 30-minute timeout and an existing downloader test hit the/var→/private/vartemporary-directory symlink safety guard. Neither failure exercised this diff; the focused race test and all metadata tests pass.