Fix stale final screenshot export

This commit is contained in:
2026-04-03 05:59:06 +09:00
parent 37ae72a63e
commit 81b6289f80
30 changed files with 1300 additions and 1306 deletions

View File

@@ -1,6 +1,7 @@
from __future__ import annotations
import argparse
import base64
import asyncio
import json
import re
@@ -531,6 +532,10 @@ async def main() -> None:
json.dumps(ctx.measurement, ensure_ascii=False, indent=2),
encoding='utf-8',
)
if ctx.screenshot_b64:
screenshot_bytes = base64.b64decode(ctx.screenshot_b64)
(out_dir / 'final-screenshot-current.png').write_bytes(screenshot_bytes)
(out_dir / 'final-screenshot.png').write_bytes(screenshot_bytes)
(out_dir / 'context.json').write_text(
ctx.model_dump_json(indent=2, exclude={'screenshot_b64', 'rendered_html'}),
encoding='utf-8',