Nudge the assessor and the embedder when a sync pass adds mail #47
No reviewers
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp!47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/nudge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Merge after #46. This branch is stacked on it, so the diff shows #46's commit until #46 merges.
Summary
Before this change, the assessor (and in #46 the embedder) looked for new rows every
poll_seconds(default 60). New mail could therefore wait up to a minute for its triage class, and so for a wake.AssessorandEmbedWorkereach get anudgeevent. Each tick clears it first, so mail that arrives during a tick starts the next tick at once.SyncWorker._loopsets every nudge after a pass that added at least one message. With IDLE, a pass runs as soon as INBOX changes, so triage and embedding now start seconds after mail lands.poll_secondsstays as the fallback, which retries a failed Jev call.syncshuts down at once instead of after up topoll_seconds.backlog_daysonly bounds the first enable: each message is sent to Jev once.Test plan
make check: 124 passed, audit clean.test_a_nudge_ticks_before_the_poll_and_a_stop_ends_the_wait: withpoll_seconds = 3600, a nudge runs a second tick at once, and stop plus nudge ends the thread.test_a_pass_that_adds_mail_nudges: a pass that adds 0 messages does not nudge, and a pass that adds 2 does.🤖 Generated with Claude Code
svc-agent-writer referenced this pull request2026-11-04 10:08:37 +00:00