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.
This commit is contained in:
Abdessamad Derraz committed 2026-11-12 18:56:41 +01:00
1 parent 82d134cd8b
commit 37aadbd4e0
1 file changed
+3 -1
+3 -1
View File
@@ -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