router: Router.Route consumes NormalizedInput directly (slice 11)

Change Route from (ctx, utterance string, now) to (ctx, input NormalizedInput, now).
The ingress-constructed NormalizedInput now reaches the cascade intact — no
reconstruction downstream. TryFastPath receives the same input, not a rebuilt one.
All callers (production, eval framework, tests) updated to construct NormalizedInput.
This commit is contained in:
2026-09-07 01:32:45 +04:00
parent a1e4743492
commit dad3cd0738
5 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -214,7 +214,7 @@ func ScoreReach(ctx context.Context, name string, r Router, m router.ActMatcher,
for _, c := range f.Cases {
start := time.Now()
d, err := r.Route(ctx, c.Utterance, now)
d, err := r.Route(ctx, router.NormalizedInput{Text: c.Utterance}, now)
o := ReachOutcome{Case: c, Decision: d, Err: err, Latency: time.Since(start)}
lat = append(lat, o.Latency)