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

jpedroh / last-merge / 29671372957
91%

Build:
DEFAULT BRANCH: main
Ran 19 Jul 2026 03:12AM UTC
Jobs 1
Files 36
Run time 1min
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

19 Jul 2026 03:11AM UTC coverage: 65.348% (+1.2%) from 64.125%
29671372957

push

github

web-flow
refactor: Separate matching orchestration from ordered/unordered matching algorithms (#83)

## Description

Refactor the matching module to centralize the matching calculation
logic and make ordered/unordered matching algorithms operate on subtrees
instead of complete node pairs.

## Changes

- Extract the top-level matching orchestration into a new `calculate`
module.
- `calculate_matchings` now owns the lifecycle of a matching
computation.
- Ordered and unordered matchers only calculate subtree scores and
populate discovered matchings.

- Rename the `Matches` trait to `CanMatch` to better represent its
purpose.
- The trait now exposes `can_match`, making it clear that it only checks
whether two nodes are compatible, not whether they are fully matched.

- Refactor ordered matching:
- `ordered::calculate_matchings` was replaced by
`ordered::calculate_subtree_matching`.
- The ordered matcher now returns the subtree score instead of creating
the complete `Matchings` structure.
- Root matching is now handled consistently by the top-level calculator.

- Refactor unordered matching:
  - Split unique-label matching into its own module.
  - `unordered::calculate_subtree_matching` now combines:
    - unique-label matching
    - assignment problem matching
- Assignment matching now returns only the calculated score and appends
child matchings into the shared `Matchings` instance.

- Improve `Matchings`:
  - Add capacity initialization to reduce reallocations.
  - Simplify extending and inserting matchings through `push`.
  - Prevent replacing an existing matching with a lower score.
  - Add `len` and `is_empty` helpers.

- Hide internal implementation modules (`ordered` and `unordered`) from
the public API.
  - Consumers now only interact with `matching::calculate_matchings`.

## Motivation

Previously, the matching algorithms were responsible for both:
1. calculating subtree similarities, and
2. managing the resulting matching collection.

This made the order... (continued)

115 of 152 new or added lines in 8 files covered. (75.66%)

3 existing lines in 2 files now uncovered.

1024 of 1567 relevant lines covered (65.35%)

2.35 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
46.15
-25.27% matching/src/unordered/mod.rs
9
84.21
matching/src/unordered/unique_label.rs
8
60.0
-3.33% matching/src/ordered/mod.rs
7
79.17
-6.55% matching/src/matchings.rs

Coverage Regressions

Lines Coverage ∆ File
2
79.17
-6.55% matching/src/matchings.rs
1
96.97
8.6% matching/src/unordered/assignment_problem.rs
Jobs
ID Job ID Ran Files Coverage
1 29671372957.1 19 Jul 2026 03:12AM UTC 36
65.35
GitHub Action Run
Source Files on build 29671372957
  • Tree
  • List 36
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6986c1cb on github
  • Prev Build on main (#29664497526)
  • Next Build on main (#29702205618)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc