Live NAS investigation (test_dirsize_md5.py) revealed two bugs:
1. _poll_task() always slept 200ms before the first status call.
DirSize and MD5 complete near-instantly on small data, so the result
window closes before the first poll. Fix: add initial_delay parameter
(default 0.2s for CopyMove/Delete/Compress/Extract); DirSize and MD5
pass initial_delay=0.0 to poll immediately after start.
2. get_md5 used status version=2, but the NAS only serves the result on
status v1 (v2 always returns 599 regardless of timing). Fix: change
_poll_task version to 1 for SYNO.FileStation.MD5.
MD5 is one-shot: the result is consumed on the first successful status
read. Polling at 0ms ensures we catch it before it expires.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DirSize: _poll_task now uses status version=1 (v2 always returns 599)
- MD5: _poll_task keeps status version=2 (confirmed working via live NAS test)
Investigation notes documented in test_dirsize_md5.py:
both APIs use start v2; DirSize status needs v1, MD5 status needs v2;
tiny data causes one-shot race condition (no issue with real-world data).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>