meta: pass community characters + recaps through the /meta envelope - #38
Merged
Conversation
metaserve now returns characters + recaps on works/{id} (the CC BY-SA expressive
layer: spoiler-tagged, position-keyed). Surface them in the enrichment envelope
the player consumes.
- client.go: mirror the upstream shape - upstreamPosition/upstreamCharacter/
upstreamRecap + Characters/Recaps on upstreamWorkDetail (previously decoded-
and-dropped as unknown fields).
- service.go: outward MetaPosition/MetaCharacter/MetaRecap + Characters/Recaps
on MetaWork (additive, omitempty), mapped by toCharacters/toRecaps and wired
into compose. Work-level (edition-independent, keyed on logical work chapters).
Character xref is intentionally not carried across the seam (an internal
cross-linking concern, not player display data).
Tests: extend the composition fixture + assertions (order, aliases, reveal,
scope, through) and the api-handler TestMetaMatch substrings so the fields are
verified end-to-end through the handler JSON.
Three-repo seam (CROSS-REPO §17): audiosilo-meta already ships these on
works/{id}; the frontend BookMeta render is the paired change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Player-side of Stage 2 for the community expressive layer (audiosilo-meta shipped characters/recaps on
works/{id}; the meta-repo schema + site render already merged). This surfaces them in the server'sGET /libraries/{id}/metaenrichment envelope so the player can render them. Paired with an audiosilo-frontendBookMetarender change (CROSS-REPO §17).Change
client.go- mirror the upstream shape:upstreamPosition/upstreamCharacter/upstreamRecap+Characters/RecapsonupstreamWorkDetail(previously decoded-and-dropped as unknown JSON fields).service.go- outwardMetaPosition/MetaCharacter/MetaRecap+Characters/RecapsonMetaWork(additive,omitempty), mapped bytoCharacters/toRecapsand wired intocompose.Design calls (reviewed)
xrefis intentionally not carried across the seam - an internal cross-linking concern for metaserve's graph, not player display data. Dropped cleanly by omission at decode.Reveal/Throughhave noomitempty(chapter:0= "front matter / prior-book" is meaningful and must serialize).Tests
Extended the composition fixture + assertions (order, aliases, reveal, scope, through) and the api-handler
TestMetaMatchsubstrings, so the fields are verified end-to-end through the handler JSON. Full gate green (go build/vet/test -race,golangci-lint0 issues). Also verified the real data path live: local metaserve/lookup?asin=->works/{id}returns exactly the character/recap field shape the new decode structs expect.Reviewed via /simplify (reuse+altitude - applied a
MetaPosition(...)struct-conversion nit; confirmed the xref drop + work-level home + no-omitempty-on-position are correct) and /code-review (clean).