DEV-000065 assistant presence attention surface
CI / test (push) Successful in 16s
CI / test (pull_request) Successful in 15s

This commit is contained in:
m
2026-08-17 16:23:16 +03:00
parent 6e73318e49
commit 5d4e064a94
26 changed files with 1335 additions and 20 deletions
+15
View File
@@ -29,6 +29,21 @@ func TestBuildReminderRequestParsesTomorrowAtTen(t *testing.T) {
}
}
func TestBuildReminderRequestParsesRelativeMinutes(t *testing.T) {
now := time.Date(2026, 8, 17, 12, 0, 0, 0, time.FixedZone("MSK", 3*60*60))
request, err := buildReminderRequest("Напомни мне через 3 минуты проверить уведомление.", identity.CreatorSession{PrincipalID: "principal-1"}, interaction.OriginalHumanIntent{ID: "intent-1"}, interaction.HumanUtterance{ID: "utterance-1"}, now)
if err != nil {
t.Fatal(err)
}
trigger := time.UnixMilli(request.TriggerAtUnixMillis).In(now.Location())
if !trigger.Equal(now.Add(3 * time.Minute)) {
t.Fatalf("unexpected trigger: %s", trigger)
}
if request.Summary != "проверить уведомление" {
t.Fatalf("unexpected summary: %q", request.Summary)
}
}
func TestContinuityReminderClientDoesNotAcceptFalseSuccess(t *testing.T) {
upstream := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/v1/creator/reminders" || r.Header.Get("Authorization") != "Bearer session" {