e563831c

By: Michael Lynch <git@mtlynch.io>

Import Tinybeans comment threads without duplicating root comments

Tinybeans exports threaded conversations in comment-thread-*.json files,
but metadata.json only includes the root comments for each media item.
Little Moments does not support comment subthreads, so the importer needs
to read those extra files and flatten the replies into a single comment
list during conversion.

This change teaches tinybeans.Parse to read comment-thread-*.json files,
parse nested replies, and merge each thread back onto the matching root
comment from metadata.json by comment ID. If a thread file refers to a
root comment that is missing from metadata.json, parsing now fails with a
clear error instead of silently importing inconsistent data.

Convert now walks threaded Tinybeans comments and rewrites them into flat
Little Moments comments ordered by CreatedAt. That preserves the full
conversation while avoiding the duplicate-root bug described in DESIGN.md,
where the thread root appears both in metadata.json and in the matching
comment-thread-*.json file.

The test suite now covers:
- parsing comment-thread-*.json files directly
- merging thread replies into parsed entry comments
- flattening threaded comments during conversion without duplicating the
  root comment

Suite timing

Time to Start Worker time Duration Time to finish
Config 0s 1s 1s 1s
Eval - - - -
Build 2s 1m05s - -
Test - - - -
Deploy - - - -
Suite 0s 1m06s - -

Timeline

0s10s20s