fix(ned): surgical daemon stability and validation improvements #98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pr/ned-stability-fixes"
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?
Applies 5 backwards-compatible stability fixes to NED without changing wire protocols or client behavior:
sync.run_sync()calls (ned/sync.py): Add a non-blocking single-flight_sync_lockso overlapping scheduler/manual/startup syncs cannot racembsyncon.mbsyncstateand Maildirs.tag:trashon partial expunge failures (ned/actions.py): Track failed/skipped files inexpunge_trash()so-trashis not stripped globally when any file fails to unlink/rename or lives outside Trash.ned/handler.py): Return clean HTTP 400/413 JSON errors on invalidlimit/offset/part_id, malformed JSON, or non-object JSON payloads.msmtpon timeout and close probe sockets (ned/service.py,ned/daemon.py,ned/main.py): Terminate and reap timed-out sendmail subprocesses, and use context-managed sockets for Unix socket liveness probes.ned/client.py): Retry onssl.SSLWantReadError/ssl.SSLWantWriteError, drainraw_sock.pending(), and unify SSE line parsing.Verification
QT_QPA_PLATFORM=offscreen ~/.local/share/pipx/venvs/lazarus-mail/bin/python -m pytest -p no:cacheprovider→ 573 passeduvx --from mypy mypy --config-file mypy.ini ned→ Success: no issues found in 26 source filesuvx pyflakes ned/sync.py ned/actions.py ned/handler.py ned/service.py ned/daemon.py ned/main.py ned/client.py→ clean