From 37aadbd4e052a66a4a06e8e8fdf5492fa9efb42d Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Thu, 12 Nov 2026 18:56:41 +0100 Subject: [PATCH] fix: write the verify excerpt whole generate_report_excerpt.py rewrote wiki/reading-reports.md with write_text, which test_atomic_artifacts refuses for a generator: an interrupted run left a truncated page. It now goes through write_text_atomic like the other generators. --- scripts/generate_report_excerpt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/generate_report_excerpt.py b/scripts/generate_report_excerpt.py index 0bf94c3ca..2763eabe3 100644 --- a/scripts/generate_report_excerpt.py +++ b/scripts/generate_report_excerpt.py @@ -22,6 +22,8 @@ import subprocess import sys from pathlib import Path +from artifacts import write_text_atomic + ROOT = Path(__file__).resolve().parent.parent PAGE = ROOT / "wiki" / "reading-reports.md" BLOCK = re.compile( @@ -77,7 +79,7 @@ def main() -> int: print(f"STALE {PAGE.relative_to(ROOT)}: the verify excerpt is not the run's. " "Run python scripts/generate_report_excerpt.py", file=sys.stderr) return 1 - PAGE.write_text(text[:found.start(2)] + body + text[found.end(2):], encoding="utf-8") + write_text_atomic(str(PAGE), text[:found.start(2)] + body + text[found.end(2):]) print(f"Wrote {PAGE.relative_to(ROOT)}") return 0