Skip to content

fix(routing): normalise task_type vocabulary (#2208)#2299

Merged
mrveiss merged 1 commit intoDev_new_guifrom
fix/task-type-vocabulary
Mar 24, 2026
Merged

fix(routing): normalise task_type vocabulary (#2208)#2299
mrveiss merged 1 commit intoDev_new_guifrom
fix/task-type-vocabulary

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Mar 24, 2026

Summary

  • Added normalize_task_type() to TaskPatternLearner — canonicalises to lowercase_underscore matching AgentType.value
  • Applied normalisation in both learn_from_outcomes and get_learned_strategy
  • Router now also normalises before lookup, ensuring both sides use the same Redis keys
  • Exported LEARNED_STRATEGY_CONFIDENCE = 0.7 constant with documented rationale (vs 0.8 quick_route threshold)
  • All 10 task_pattern_learner tests passing

Closes #2208

…2208)

TaskPatternLearner and AgentRouter used different task_type strings —
the learner stored whatever the caller provided while the router derived
task_type from AgentType.value. Added normalize_task_type() to
canonicalise both sides to lowercase_underscore format matching
AgentType values. Also exported LEARNED_STRATEGY_CONFIDENCE constant
and documented the 0.7 vs 0.8 threshold rationale.
@github-actions
Copy link
Copy Markdown

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss mrveiss merged commit 172897b into Dev_new_gui Mar 24, 2026
4 of 5 checks passed
@mrveiss mrveiss deleted the fix/task-type-vocabulary branch March 26, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant