Skip to content

meta: pass community characters + recaps through the /meta envelope - #38

Merged
KodeStar merged 1 commit into
mainfrom
meta/player-characters-recaps
Jul 12, 2026
Merged

meta: pass community characters + recaps through the /meta envelope#38
KodeStar merged 1 commit into
mainfrom
meta/player-characters-recaps

Conversation

@KodeStar

Copy link
Copy Markdown
Owner

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's GET /libraries/{id}/meta enrichment envelope so the player can render them. Paired with an audiosilo-frontend BookMeta render change (CROSS-REPO §17).

Change

  • client.go - mirror the upstream shape: upstreamPosition/upstreamCharacter/upstreamRecap + Characters/Recaps on upstreamWorkDetail (previously decoded-and-dropped as unknown JSON fields).
  • service.go - outward MetaPosition/MetaCharacter/MetaRecap + Characters/Recaps on MetaWork (additive, omitempty), mapped by toCharacters/toRecaps and wired into compose.

Design calls (reviewed)

  • Work-level, not recording-level: characters/recaps are edition-independent (keyed on logical work chapters), and mirror where metaserve returns them.
  • Character xref is 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/Through have no omitempty (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 TestMetaMatch substrings, so the fields are verified end-to-end through the handler JSON. Full gate green (go build/vet/test -race, golangci-lint 0 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).

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.
@KodeStar
KodeStar merged commit e5864d9 into main Jul 12, 2026
2 checks passed
@KodeStar
KodeStar deleted the meta/player-characters-recaps branch July 12, 2026 12:10
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