Closer/seed/questions/IMPORTER_SCHEMA_RECONCILIAT...

1.6 KiB

Importer and Question-Guide Reconciliation

Final authority

Production content must match the importer and Room model that ship today.

The guides now separate:

  1. Current production schema — required for content JSON now.
  2. Future schema direction — an engineering migration, not an authoring choice.

Correct current production rules

Aspect Production rule
depth integer 1, 2, or 3
pack wrapper { "category": {...}, "questions": [...] }
scale settings answer_config
written settings answer_config
this-or-that exactly two explicit options, mirrored into answer_config.options
Daily category id daily_fun_mc
Daily logical pack id daily_single_choice_weekly_v1 in metadata
Daily production file complete 511-question pack, never a patch manifest

Future string-depth migration

String depth is still documented as a possible future direction, but it is clearly marked not production-ready.

It becomes valid only after coordinated updates to the importer, Room schema/entity, database migration path, readers, routing, validation, tests, and existing content.

Catalog-wide build gate

A pack can be perfect by itself and still fail the catalog.

Before rebuilding the database, validate all production files together for:

  • duplicate IDs
  • duplicate exact or normalized question text
  • blocked near-duplicates
  • unknown categories
  • partial packs or patch manifests under production filenames
  • values that will be coerced or silently ignored

The known Comfort first or solutions first? collision must be resolved in one category before the catalog can pass.