• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ossuminc / riddl / 28683473913 / 1
65%
main: 65%

Build:
Build:
LAST BUILD BRANCH: development
DEFAULT BRANCH: main
Ran 03 Jul 2026 09:12PM UTC
Files 140
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jul 2026 09:08PM UTC coverage: 65.248% (+0.5%) from 64.721%
28683473913.1

push

reid-spencer
Add compareRoots — Root-AST structural similarity API

Adds a deterministic, model-free similarity/diff API for comparing two
RIDDL Root ASTs, requested by ossum-gen for its compositional-fidelity
benchmark (regression guard: does a model generated from a README have
the same rough shape as the hand-authored corpus model?).

New in passes/analysis/RootComparison.scala (Native-safe, no regex or
java formatting):
- compareRoots(a, b) -> RootSimilarity: per-kind counts (Map[String,
  (Int,Int)]), fuzzy matched/unmatched name pairs per kind, structural
  metrics (max depth, breadth), and an overall weighted score in
  [0.0, 1.0] (exactly 1.0 for identical roots).
- similarityMarkdown(a, b): human/AI-readable report.
- Both surfaced on the RiddlLib trait and object (additive only; no
  existing signature changed).

Counts/names/breadth are taken from OutlinePass (records containers AND
leaves, so leaf kinds such as Invariant/Constant are included, and
counts stay consistent with the names being matched); depth is taken
from StatsPass.maximum_depth. Structural wrappers (Root, Nebula) are
excluded so breadth reflects real top-level containers. Matching is on
kind + fuzzy name (lowercase-alphanumeric normalization, greedy best
Levenshtein-ratio pairing) — location- and case-independent — never on
Definition.equals/hashCode (which include loc).

Scoring: per kind 0.6*countComparability + 0.4*nameOverlap; overall
0.7*weightedMean + 0.3*countVectorCosine, weighting DDD-structural
kinds above incidental ones.

10 tests (JVM + Native): identical=1.0, empty=1.0, counts match a manual
StatsPass reading, breadth counts domains not Root, depth matches
StatsPass, case/location independence, renamed-but-equal stays high,
ordering identical > case-only > renamed > unrelated, markdown render,
and a real-model pair (dokn vs rbbq).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

7679 of 11769 relevant lines covered (65.25%)

0.65 hits per line

Source Files on job 28683473913.1
  • Tree
  • List 140
  • Changed 25
  • Source Changed 0
  • Coverage Changed 25
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 28683473913
  • 802867ba on github
  • Prev Job for on development (#28611035274.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc