mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-16 15:40:12 +01:00
fix: allow empty synergies in fast path validator
This commit is contained in:
parent
eb5281623a
commit
3b4ae36a11
3 changed files with 11 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning
|
|||
### Changed
|
||||
- Theme catalog schema now accepts optional `id` values on entries so refreshed catalogs validate cleanly.
|
||||
- CI installs `httpx` with the rest of the web stack and runs pytest via `python -m pytest` so FastAPI tests resolve the local `code` package correctly.
|
||||
- Relaxed fast-path catalog validation to allow empty synergy lists while still warning on missing or malformed data types.
|
||||
|
||||
### Fixed
|
||||
- Regenerated `logs/perf/theme_preview_warm_baseline.json` to repair preview performance CI regressions caused by a malformed baseline file and verified the regression gate passes with the refreshed data.
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
## Summary
|
||||
- Hardened theme catalog schema to accept optional IDs and refreshed the preview performance baseline to keep CI checks green.
|
||||
- CI updates install the missing `httpx` dependency and run pytest through `python -m` to ensure the web stack tests import the local package correctly.
|
||||
- Fast-path catalog validation now tolerates empty synergy lists while still flagging missing fields or non-string entries.
|
||||
- Delivered multi-theme random builds with deterministic cascade, strict match support, and polished HTMX/UI flows.
|
||||
- Added opt-in telemetry counters, reroll throttling safeguards, and structured diagnostics exports.
|
||||
- Expanded tooling, documentation, and QA coverage for theme governance, performance profiling, and seed history management.
|
||||
|
|
@ -31,6 +32,7 @@
|
|||
### Maintenance & CI
|
||||
- Theme catalog schema now accepts optional IDs and the preview performance warm baseline was regenerated to restore the regression gate.
|
||||
- GitHub Actions now includes `httpx` in the default dependency install and executes pytest via `python -m` so FastAPI TestClient suites run without import errors.
|
||||
- Fast path validator treats empty synergy arrays as acceptable and only warns on missing or malformed data, reducing noise during automated catalog generation.
|
||||
|
||||
## Detailed changes
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -62,8 +62,14 @@ def validate(data: t.Any) -> list[Problem]:
|
|||
if not th.get('theme'):
|
||||
probs.append(Problem('error', f'theme[{i}] theme missing'))
|
||||
syns = th.get('synergies')
|
||||
if not isinstance(syns, list) or not syns:
|
||||
probs.append(Problem('warn', f'theme[{i}] synergies empty or not list'))
|
||||
if syns is None:
|
||||
probs.append(Problem('warn', f'theme[{i}] synergies missing'))
|
||||
elif not isinstance(syns, list):
|
||||
probs.append(Problem('warn', f'theme[{i}] synergies not a list'))
|
||||
else:
|
||||
bad_types = [type(item).__name__ for item in syns if not isinstance(item, str)]
|
||||
if bad_types:
|
||||
probs.append(Problem('warn', f'theme[{i}] synergies contain non-string entries: {set(bad_types)}'))
|
||||
if 'description' not in th:
|
||||
probs.append(Problem('warn', f'theme[{i}] description missing'))
|
||||
return probs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue