JSON Catalog Hot Reload Batch And Candidate Revalidation
Purpose
JSON catalog hot reload lets editor and local runtime workflows atomically replace authored catalog resources after parsing and cross-catalog validation succeed. Use this workflow when editing several catalog shards that must become visible together.
Steps
- Edit the authored JSON catalog files.
- Let the descriptor layer map each asset path to its catalog contract and runtime resource.
- Build hot-reload candidates for every changed catalog.
- Revalidate candidates as one batch before publishing any of them.
- Keep the last valid active state if parsing, loading, or downstream validation fails.
NPC-service reloads need current game-data context because service entries can project vendor stock, crafting recipes, item costs, and relationship gates.
Expected Outputs
A successful batch records active catalog state, source dependencies, dependency signatures, and runtime resources for every accepted candidate. Failed candidates should produce diagnostics while leaving previous active resources intact.
Common Mistakes
Common mistakes include editing dependent catalogs one at a time and expecting partial commits, forgetting NPC-service game-data context, treating a successful parse as a successful batch, or ignoring dependency signatures after moving catalog shards.
Recovery Paths
Fix the candidate that failed, then let the full batch reload again. If a downstream NPC-service revalidation error appears, inspect game-data catalog state as well as the service catalog. If state load fails, verify the descriptor path and resource ownership.