The SVG Badge Was Exactly 2 Units from Both Edges. Why Did the Test Fail? A developer testing an AI coding agent (Codex) driving IconVectors over MCP found that a badge-placement test failed even though the badge landed exactly at the expected bounds of [16, 16, 22, 22] with 2-unit margins on a 24×24 viewBox. The failure came from a structural comparison of the folder artwork, which had changed when the SVG was opened (scale folded into coordinates, a polygon converted to a path). A snapshot taken immediately after opening showed 64 of 230,400 rendered pixels differed at that point, while moving the badge changed zero additional folder pixels. We asked Codex to move a circular badge to the bottom-right corner of a folder icon using IconVectors over MCP. The icon had a 24 × 24 viewBox. The badge had to keep its diameter of 6 SVG units, leave exactly 2 units of clearance on the right and bottom, and preserve the folder artwork. The first test returned FAIL . We opened the saved SVG in Chromium and measured both gaps independently. Right gap: 2 units . Bottom gap: 2 units . The badge started inside a group with transform="translate 2 1 " . That matters because the circle’s cx and cy describe its center inside the group. The requested gaps were measured from the edges of the whole icon. We could work out the expected position on paper. On each axis, the far edge of the badge should land at 24 − 2 = 22 . With a diameter of 6, the near edge should land at 22 − 6 = 16 . That gives us an expected center of 19, 19 and bounds of 16, 16, 22, 22 . We measured the badge in Chromium and converted its screen coordinates back into viewBox units. The bounds were 16, 16, 22, 22 . The diameter was 6 units on both axes . The badge landed where we asked on the first attempt. Here’s the original assertion, formatted across lines for readability: assert close bounds, 16, 16, 22, 22 and close diameter, 6, 6 and close margins, 2, 2 and no stroke and folder unchanged and canvas unchanged Only folder unchanged was false. It compared the SVG structure and attributes of the folder. In the saved file, the scale had been folded into the coordinates, and a white polygon had become a path. That explained the FAIL . It still left two questions. Had any pixels changed? And if so, had they changed when we moved the badge? We had saved a copy immediately after opening the SVG in IconVectors, before moving anything. That gave us three files to compare. We hid the badge in each one and rendered the folder at 480 × 480 pixels . | Folder renders compared | Changed pixels | |---|---| | Original → just after opening | 64 of 230,400 | | Just after opening → after moving the badge | 0 of 230,400 | All 64 changed pixels lay along the slanted edge of the white detail. The largest difference was 5 on a 0–255 scale in any color channel. The yellow mask in the figure shows where those differences occurred. With only the original and final files, we might have attributed those 64 pixels to the badge move. The middle snapshot let us pin down the timing: the difference was already present immediately after opening the file. Moving the badge changed zero additional folder pixels at the tested size. We'd keep the snapshot taken immediately after opening the file and give each check its own result line. For this run, the report would read: That would have told us where to look on the first read. The badge was already in the right place. The detail worth inspecting was the white edge of the folder.