feat(formats): implement author attribution service and propagate spec tests

Book metadata extraction previously handled author parsing naively by taking only the first raw dc:creator string, ignoring MARC relator roles, multi-creator ordering, deduplication, and structured author fallbacks.

Define the formal author attribution model in specs/book-author-parsing.allium and propagate the specification into a comprehensive test suite (AuthorAttributionTest) covering all 23 obligations across value equality, lifecycle state transitions, contract invariants, and surface exposure.

Implement AuthorAttribution, AuthorAttributionService, and BookMetadataSurface to fulfill:
- Dublin Core precedence over structured author elements
- MARC role code resolution (aut -> Author, edt -> Editor, trl -> Translator, ill -> Illustrator, custom capitalized)
- Grouping creators by resolved role in order of appearance with deduplication
- Fallback formatting for structured author fields (first, middle, last, nickname)
- Complete status lifecycle enforcement (unparsed to parsed)

Register AuthorAttributionTest in CMakeLists.txt and update AGENTS.md documentation.
This commit is contained in:
Agel committed 2026-10-29 15:21:06 +01:00
1 parent 306d4cac5c
commit bde4e310b5
6 files changed
+1005

No files matched your search

+1
View File
@@ -225,6 +225,7 @@ src/
Book.h/cpp
formats/
AsyncImageResponse.h/cpp
AuthorAttribution.h/cpp
EntryImageProvider.h/cpp
EpubReader.h/cpp
FileIconProvider.h/cpp