41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""Write a first-stage ROI validation report.
|
|
|
|
This pass records why ROI cannot pass yet: no Cocos-produced screenshot exists
|
|
because the Cocos 4 alpha CLI is blocked by a native ABI mismatch.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from datetime import datetime, timezone
|
|
from pathlib import Path
|
|
|
|
|
|
PROJECT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def main() -> None:
|
|
out_dir = PROJECT / "artifacts/visual_compare"
|
|
out_dir.mkdir(parents=True, exist_ok=True)
|
|
report = {
|
|
"generated_at": datetime.now(timezone.utc).isoformat(),
|
|
"module": "main_scene_first_milestone",
|
|
"status": "blocked",
|
|
"rois": ["world_static", "land_area", "decor_area", "bottom_buttons"],
|
|
"reason": "Cocos-produced screenshot is unavailable because Cocos 4 alpha CLI build fails on native webgl.node ABI mismatch.",
|
|
"diagnostic_preview": str(PROJECT / "artifacts/canvas_preview/stage1_source_preview.png"),
|
|
"target_thresholds": {
|
|
"static_bitmap_similarity": 0.99,
|
|
"object_center_delta_px": 2,
|
|
"object_size_delta_percent": 1,
|
|
},
|
|
}
|
|
path = out_dir / "stage1_roi_report.json"
|
|
path.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
|
print(path)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|