Skip to content

The agent that grows with you

fix(code-health): read replay manifests BOM-tolerantly

Teknium00361a69ced8
diff --git a/scripts/code_health/replay.py b/scripts/code_health/replay.py
index 2c6a04bf74d..4879d1a8e42 100644
--- a/scripts/code_health/replay.py
+++ b/scripts/code_health/replay.py
@@ -111,7 +111,7 @@ def main(argv: list[str] | None = None) -> int:
out_dir = Path(args.out)
out_dir.mkdir(parents=True, exist_ok=True)
if args.manifest:
- manifest = json.loads(Path(args.manifest).read_text(encoding="utf-8"))
+ manifest = json.loads(Path(args.manifest).read_text(encoding="utf-8-sig"))
else:
manifest = build_manifest(repo, args.merged, args.limit)
(out_dir / "manifest.json").write_text(json.dumps(manifest, indent=1) + "\n", encoding="utf-8")