fix(importer): assemble blog body from laddr's items array (closes #106)#107
Merged
Conversation
Earlier import populated 138 blog posts with titles/authors/summaries
but empty bodies — laddr's /blog?format=json doesn't expose a Body
field at all. Bodies live in a typed `items` array on Emergence
AbstractContent and are only surfaced when the request uses
`?include=*`.
Three item classes appear in production:
Emergence\CMS\Item\Markdown — Data is the raw markdown body
fragment. Append verbatim.
Emergence\CMS\Item\Media — Data is { MediaID, Caption }. Render
as . Eventually
images should migrate into the data
repo as attachments — separate concern.
Emergence\CMS\Item\Embed — Data is raw HTML (iframes, etc.).
CommonMark allows raw HTML blocks,
so append as-is.
Items are sorted by Order before joining with blank-line separators.
markdownlint (run on gitsheets serialize) will normalize any drift.
Drops the unused `Body` field from RawBlogPostSchema (laddr never
returned it anyway). Adds `items` + a new RawBlogPostItem type.
Tests: 5 new translator cases (interleaved item classes, order
sorting, missing items → empty body, unknown class warning + skip,
empty items array). Updated orchestrator mock to seed items and to
expect the `?include=*` query string.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 30, 2026
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.
Summary
The cutover-blog importer (PR #101) populated 138 blog posts but bodies came through empty. Root cause: laddr's `/blog?format=json` doesn't expose a `Body` field at all. The body lives in a typed `items` array on Emergence's `AbstractContent`, only surfaced when the request uses `?include=*`.
Three item classes appear in production:
Items are sorted by `Order` before joining with blank-line separators. `markdownlint` on gitsheets serialize normalizes any drift.
Drops the unused `Body` field from `RawBlogPostSchema` (laddr never returned it). Adds `items` + a new `RawBlogPostItem` type.
Closes #106.
Test plan
Ship plan
After merge:
🤖 Generated with Claude Code