Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/images/context-efficiency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/engraphis-benefit-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/evidence-backed-agent-examples.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions tests/test_benchmark_evidence.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import json
import struct
from copy import deepcopy
from pathlib import Path
from xml.etree import ElementTree

import pytest

Expand Down Expand Up @@ -101,6 +103,23 @@ def test_readme_makes_agent_benefits_and_visual_evidence_scannable():
assert (ROOT / "docs" / "images" / filename).is_file()


def test_readme_visual_pngs_match_their_svg_canvas():
"""README image exports must not carry hidden screenshot padding."""
image_dir = ROOT / "docs" / "images"

for stem in (
"engraphis-benefit-flow",
"evidence-backed-agent-examples",
"context-efficiency",
):
svg = ElementTree.parse(image_dir / f"{stem}.svg").getroot()
expected = (int(svg.attrib["width"]), int(svg.attrib["height"]))
png_header = (image_dir / f"{stem}.png").read_bytes()[:24]

assert png_header[:8] == b"\x89PNG\r\n\x1a\n"
assert struct.unpack(">II", png_header[16:24]) == expected


def test_example_visual_uses_the_checked_in_offline_fixture_results():
"""The new examples must not drift away from the commands readers can run."""
longdoc = ROOT / "eval" / "datasets" / "longdoc.jsonl"
Expand Down
Loading