Skip to content

fix(mail): slice filesystem mail polling#862

Open
BatalloLu wants to merge 1 commit into
Lingtai-AI:mainfrom
BatalloLu:repairman/mailservice-poll-slicing-20260711
Open

fix(mail): slice filesystem mail polling#862
BatalloLu wants to merge 1 commit into
Lingtai-AI:mainfrom
BatalloLu:repairman/mailservice-poll-slicing-20260711

Conversation

@BatalloLu

Copy link
Copy Markdown

Summary

  • Poll subscribed pseudo-agent outboxes before and after bounded own-inbox slices so human/pseudo outbox delivery cannot be starved behind large historical inbox scans.
  • Keep own-inbox scan progress with an iterator cursor and configurable time/entry budgets.
  • Add slow-phase telemetry with message body/subject/content/attachment redaction.
  • Add focused filesystem-mail tests for pseudo-outbox rechecks between chunks and body-free telemetry.

Context

This targets the filesystem-mail starvation seen on large/external-disk .lingtai mailboxes: a full own-inbox scan can monopolize the mail listener loop long enough that a fresh human pseudo-agent outbox message waits for the next loop. The change keeps the listener responsive to pseudo outboxes while still making incremental progress through the agent's own inbox.

Validation

  • git diff --check
  • python3 -m py_compile src/lingtai/kernel/services/mail.py
  • uv run --with pytest python -m pytest tests/test_filesystem_mail.py -q (25 passed)

Not covered / follow-up

  • No live external-disk Wenda validation was performed in this PR.
  • No runtime wheel, installed venv, hotpatch, release, or Wenda mailbox/runtime state was changed.

Prioritize pseudo-agent outboxes around bounded own-inbox slices so large mailbox scans cannot starve human-outbox delivery. Add slow-phase telemetry with body/subject redaction and focused filesystem-mail tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant