fix(dispatcher): resolve handlers in registration order across closed and open generics

Handler/behavior resolution previously forced closed generics before open
generics regardless of registration order, which was surprising and fragile.
TypeIndex now tracks each registered type's index and orders matching
candidates by registration order, so closed/open ordering is deterministic
and follows registration.
This commit is contained in:
Louis Seubert 2026-07-12 19:22:50 +02:00
commit 8099898f3d
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
3 changed files with 45 additions and 10 deletions

View file

@ -55,6 +55,7 @@ To have a consistent experience across all packages, some public interfaces have
- **request.validation:** Return no problems when validating a `null` instance of a reference type instead of dereferencing it (`NullReferenceException`)
- **request.validation:** Make `Severity` meaningful — `Validation.IsValid` now only fails on `Error` problems; `Warning`/`Info` no longer invalidate. Added `Validation.IsValidFor(Severity)` to set the failing-severity threshold
- **request.dispatcher:** Throw `InvalidOperationException` listing candidates when multiple handlers match a request instead of silently resolving via `.First()`. Also throws when no handler is registered
- **request.dispatcher:** Resolve handlers/behaviors in registration order across closed and open generics instead of the fixed closed-before-open reflection order
### Removed