feat(packs): PackImporter stubs pass + IsEnabled gate in active-packs

PackImporter now runs a second pass over pack-stubs.json, inserting
PackConfigEntry placeholders for any pack_id NOT already present from
the live-capture packs.json pass. Synthesized stubs default
IsEnabled=false; live-capture rows default IsEnabled=true.

PackRepository.GetActivePacks filters by IsEnabled in addition to the
date window, so synthesized stubs stay hidden until an operator opts
them in (UPDATE Packs SET IsEnabled=true WHERE Id=...).

Bundles Task 6 + Task 11 because adding pack-stubs.json to the
test-fixture set surfaces an extra row in PackControllerFullCatalogTests'
35-pack count assertion; the filter is what makes the test resilient.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-05-30 21:52:27 -04:00
parent 72c8fe627b
commit f7407fe382
5 changed files with 197 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ public class PackRepository : IPackRepository
await _db.Packs
.Include(p => p.ChildGachas)
.Include(p => p.Banners)
.Where(p => p.CommenceDate <= now && p.CompleteDate >= now)
.Where(p => p.IsEnabled && p.CommenceDate <= now && p.CompleteDate >= now)
// parent_gacha_id DESC matches the prod /pack/info wire order. The tutorial pack
// UI runs with controls locked and auto-selects the FIRST entry in
// pack_config_list, so the legendary starter pack (99047) MUST be index 0 for the