Persist all collected per-article quality scores to
news/metadata/quality-scores.json.
Uses atomic write (write to temp file, then rename) to avoid leaving
truncated/invalid JSON on disk if the process is interrupted mid-write.
Per-run overwrite: Only the current run's scores are written. Previous
runs' data is replaced so that stale/test entries never accumulate and
Check 13's average score reflects the current generation only.
Call once at the end of the overall generation run (not per-article) to
avoid write amplification when many articles are generated.
Persist all collected per-article quality scores to
news/metadata/quality-scores.json.Uses atomic write (write to temp file, then rename) to avoid leaving truncated/invalid JSON on disk if the process is interrupted mid-write.
Per-run overwrite: Only the current run's scores are written. Previous runs' data is replaced so that stale/test entries never accumulate and Check 13's average score reflects the current generation only.
Call once at the end of the overall generation run (not per-article) to avoid write amplification when many articles are generated.