5b8707e21e
LastSent scanned MAX(sent_at) into a bare int64. MAX over an empty set is one row holding NULL, so it errored where its own doc promised a zero time. ack_sends is written only by MarkSent, which runs only after a repeat has been sent, so the first repeat for every rule read an empty table and RepeatUnacked returned on the error and aborted the whole sweep. The sev4 repeat-til-ack loop could never take its first step for any rule. nudges.go:213 documents this exact trap for MIN; ack.go never got the same treatment. EnqueueDigestEntry deduped on status='pending' alone. A row past its expires_ts stays pending until the sweep marks it, and tick.go enqueues before it sweeps, so on the tick after an expiry a suppressed nudge deduped against a row PendingDigestEntries will never return, and the phrasing already paid for was discarded. The read side already treated not-yet-swept as not-deliverable; the write side did not. It also treated any read error as no-row and inserted anyway. ack.go had no test file at all. It has one now. internal/memory was read and is clean, and every embedder call site correctly passes EmbedPassage for a stored text. (V-617)