a reminder commits on what, what time and what day (V-579)

The owner's rule of 2026-08-06. Anything of the three that is missing is asked
for, and every ask states the current time so he can tell what she is reasoning
from. A bare hour is asked which half of the day it is. A time with no day named
is asked which day, because today being a valid reading is not him saying it.

Two things go straight through, both his call: a time that already reads only
one way, and an interval, which resolves to one instant and answers all three at
once.

An answer about the time is read against the whole request rather than alone.
"вечера" says which nine and names no hour by itself, so the answers accumulate
on the parked question and the newest statement wins.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-06 02:20:23 +04:00
parent 01c78ef369
commit 173531be8c
4 changed files with 231 additions and 26 deletions
+6 -1
View File
@@ -31,7 +31,12 @@ type PendingQuestion struct {
Slots Slots // what it already filled
Missing []Slot // what is still empty, in the order to ask about
Utterance string // the user's original raw words
Asked time.Time
// WhenText is every answer he has given about the time, joined in the order
// he gave them. Kept apart from Utterance because the utterance is the
// reminder's payload, and because a time answer has to be read against the
// request rather than alone: "завтра" names a day for an hour said earlier.
WhenText string
Asked time.Time
TTL time.Duration
Attempts int // questions already asked
// MaxAttempts caps Attempts. 0 ⇒ DefaultMaxAttempts.