diff --git a/CHANGELOG.md b/CHANGELOG.md index 34a4030..b7a59e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/RELEASE_NOTES_TEMPLATE.md b/RELEASE_NOTES_TEMPLATE.md index bf845dc..5c2e1d6 100644 --- a/RELEASE_NOTES_TEMPLATE.md +++ b/RELEASE_NOTES_TEMPLATE.md @@ -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 diff --git a/code/scripts/validate_theme_fast_path.py b/code/scripts/validate_theme_fast_path.py index 0987861..ce5852d 100644 --- a/code/scripts/validate_theme_fast_path.py +++ b/code/scripts/validate_theme_fast_path.py @@ -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