Skip to content

Suite: run Differ per diagram and judge against tolerances - #212

Merged
HassanAkbar merged 1 commit into
mainfrom
lane/81-03-suite-run-differ-per-diagram-and-judge-a
Nov 17, 2026
Merged

HassanAkbar merged 1 commit into
mainfrom
lane/81-03-suite-run-differ-per-diagram-and-judge-a

Conversation

@HassanAkbar

Copy link
Copy Markdown
Member

Suite: run Differ per diagram and judge against tolerances

Part of #54: EA parity: generated SVGs must be fully identical to EA's own SVG export (fonts, connectors, geometry)

Problem

Parity::Suite only runs the count-based Checker, so it cannot fail on geometry, font or connector deltas.

Fix

  • Run Differ alongside Checker in Suite#measure_one and attach a per-diagram delta summary (moved/missing/extra text, wrong font/size/weight, shape geometry, connector endpoint counts)
  • Add a Tolerances value object (default epsilon 0.51) and DiagramReport#clean?(tolerances)
  • Add Report#failures(tolerances)

Done when

  • new spec/ea/svg/parity/suite_spec.rb builds a tiny document plus temp reference dir and asserts clean? is true for identical SVG and false when a font size differs
  • rake spec green

check.rb:
Warning! PATH is not properly set up, /Users/umerhassan/.rvm/gems/ruby-3.4.8/bin is not at first place.
Usually this is caused by shell initialization files. Search for PATH=... entries.
You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
To fix it temporarily in this shell session run: rvm use ruby-3.4.8
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
specs: PASS 12 examples, 0 pending (1 files, 2s)
rubocop: PASS (2 files)

@HassanAkbar
HassanAkbar merged commit c72b91b into main Nov 17, 2026
29 of 31 checks passed
@HassanAkbar
HassanAkbar deleted the lane/81-03-suite-run-differ-per-diagram-and-judge-a branch November 17, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant