ci: enforce schema model evidence generation
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Failing after 16s
Validators (Pushes and Pull Requests) / validate-core (push) Failing after 55s

This commit is contained in:
2026-07-12 12:13:02 +09:00
parent d833d386d0
commit 34991eca2d
3 changed files with 38 additions and 0 deletions
+3
View File
@@ -101,6 +101,9 @@ jobs:
- name: Validate Platform Transition WBS
run: python3 tools/validate_platform_transition_wbs_v1.py
- name: Validate Schema Model Generation
run: python3 tools/generate_schema_model_generation_evidence_v1.py && python3 tools/validate_schema_model_generation_v1.py
- name: Validate Quant Engine WBS
run: python3 tools/validate_quant_engine_wbs_v1.py
+1
View File
@@ -58,6 +58,7 @@
"verify:wbs": "python tools/validate_quant_engine_wbs_v1.py",
"validate:normalized-learning-store": "python tools/validate_normalized_learning_store_v1.py",
"validate:dotnet-cutover": "python tools/validate_dotnet_postgresql_json_cutover_v1.py",
"validate:schema-model": "python tools/generate_schema_model_generation_evidence_v1.py && python tools/validate_schema_model_generation_v1.py",
"test:e2e": "playwright test --project=chromium",
"test:evidence": "playwright test --project=evidence"
},
@@ -0,0 +1,34 @@
"""Generate deterministic evidence for schema/model parity."""
from __future__ import annotations
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
SCHEMA_DIR = ROOT / "schemas" / "generated"
OUT_DIR = ROOT / "src" / "quant_engine" / "models" / "generated"
REPORT = ROOT / "Temp" / "schema_model_generation_v1.json"
def main() -> int:
schema_count = len(list(SCHEMA_DIR.glob("*.schema.json")))
module_count = len(list(OUT_DIR.glob("*.py")))
payload = {
"formula_id": "SCHEMA_MODEL_GENERATION_V1",
"status": "OK" if module_count == schema_count + 1 else "FAIL",
"schema_count": schema_count,
"generated_module_count": schema_count,
"module_count": module_count,
"evidence": {
"schema_dir": str(SCHEMA_DIR.relative_to(ROOT)),
"model_dir": str(OUT_DIR.relative_to(ROOT)),
},
}
REPORT.parent.mkdir(parents=True, exist_ok=True)
REPORT.write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(payload, ensure_ascii=False, indent=2))
return 0 if payload["status"] == "OK" else 1
if __name__ == "__main__":
raise SystemExit(main())