Counterfact

Root middleware is not executed

Middleware placed at the route root was skipped, although the same middleware ran when placed under a subroute.

Report
Issue #1515
Reporter
vglaeser
Reported
March 2, 2026
Reported version
1.5.0
Primary matched window
Outside primary window
First affected release entered primary window
No
Origin classification
Pre-existing before 2026
Classification confidence
High
Chronology confidence
High
Accepted correction
PR #1524
First fixed release
2.2.0
Report to release
17 days

Finding

The empty-string-versus-slash mismatch was introduced in February 2025 and released in 1.3.0. It remained present through the version named by the reporter.

Evidence trail

Origin

Exact origin: 59fda9f8, committed February 14, 2025; first affected release 1.3.0. A recursive middleware lookup stopped when it reached the empty root path instead of performing the existing '/' registry lookup.

Source history and behavioral evidence

The February 14 recursion change replaced the explicit '/' lookup and returned when the remaining path became empty. A later commit changed the recursion terminal value but did not create the behavior. The fix restores a normalized root lookup and includes a root-level middleware test.

Release chronology

The faulty commit first appears in 1.3.0. The correction shipped in 2.2.0, 17 calendar days after the report—the only 2026 product case that took more than five days to reach a release.

Primary sources

  1. Issue #1515
  2. Accepted correction, PR #1524
  3. Origin or earliest confirmed affected commit
  4. Release 2.2.0