Expand assistant-status phrase tolerance for cognitive routing
CI / test (push) Failing after 14s

This commit is contained in:
m
2026-08-18 16:45:32 +03:00
parent b1a51a8e44
commit 1a62be1e34
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -567,7 +567,7 @@ func isAssistantStatusProbe(primary, secondary interaction.SpeechAct, tokens []s
return false
}
for index := 0; index < len(tokens)-1; index++ {
if tokens[index] == "не" && (containsStem(tokens[index+1], "вид", "понима", "ответ", "работа", "реагир", "слыш", "ищ", "уведом", "чувств")) {
if tokens[index] == "не" && (containsStem(tokens[index+1], "вид", "виж", "понима", "ответ", "работа", "реагир", "слыш", "ищ", "уведом", "чувств")) {
return true
}
}
+2 -1
View File
@@ -86,6 +86,7 @@ func TestDeterministicCandidateTreatsModalExplanationRequestsAsCognitionWorthWit
"про утро расскажешь",
"РАССКАЖИ ПОХОЖЕ ЧТО ПРОИСХОДИТ",
"можете обяснить почему база растет",
"ты не видишь ии",
} {
candidate := BuildDeterministicCandidate(message, "", time.Unix(10, 0).UnixMilli())
if !candidate.NeedsCognition {
@@ -116,4 +117,4 @@ func TestNewConversationRequiresActorAndPrincipal(t *testing.T) {
if err == nil {
t.Fatal("expected invalid principal")
}
}
}
@@ -145,6 +145,9 @@ func TestInterpretUtteranceNaturalRussianHelpflowUsesContextAwareCognitionInput(
{message: "кто ты вообще", wantSpeech: interaction.SpeechActQuestion, wantCognition: true},
{message: "что ты думаешь", wantSpeech: interaction.SpeechActQuestion, wantCognition: true},
{message: "расскажи подробнее", wantSpeech: "", wantCognition: true, allowNoMatch: true},
{message: "СЕЙЧАС ДОМОВОЙ НЕ ВИДИТ ИИ", wantSpeech: "", wantCognition: true, allowNoMatch: true},
{message: "не понимаю меня не понимает ии", wantSpeech: "", wantCognition: true, allowNoMatch: true},
{message: "домовой не вижит ии", wantSpeech: "", wantCognition: true, allowNoMatch: true},
}
for _, tc := range cases {
result := interpretForTest(t, tc.message, nil, "")