Route local recovery by semantic intent
CI / test (push) Successful in 23s
CI / test (pull_request) Successful in 21s

This commit is contained in:
m
2026-08-22 03:00:15 +03:00
parent 39f9081b96
commit b097269df4
13 changed files with 189 additions and 103 deletions
+21
View File
@@ -103,6 +103,27 @@ func TestDeterministicCandidateTreatsModelRequestAsDirectiveNeedingCognition(t *
}
}
func TestInformationRequestsAreClassifiedOnceByInteraction(t *testing.T) {
cases := []struct {
message string
kind interaction.InformationRequestKind
}{
{"какие модели доступны?", interaction.InformationRequestCognitiveModelInventory},
{"что ты умеешь?", interaction.InformationRequestCapabilityInventory},
{"проверь состояние локального канала", interaction.InformationRequestCognitiveChannelStatus},
{"нет связи с ИИ, восстанови канал", interaction.InformationRequestCognitiveRecovery},
}
for _, test := range cases {
result, err := InterpretUtterance(interaction.HumanUtterance{Content: test.message}, nil, nil, time.Unix(10, 0))
if err != nil {
t.Fatalf("interpret %q: %v", test.message, err)
}
if result.InformationRequestKind != test.kind {
t.Fatalf("message=%q kind=%q want=%q", test.message, result.InformationRequestKind, test.kind)
}
}
}
func TestDeterministicCandidateKeepsFirstPersonCompletedWorkAsAssertion(t *testing.T) {
candidate := BuildDeterministicCandidate("Я всё уже настроил.", "", time.Unix(10, 0).UnixMilli())
if candidate.PrimarySpeechAct != interaction.SpeechActAssertion {