BUG-134 - Harden Final RC1 Shutdown, REST Bounds, And AICH Repair Edges¶
Summary¶
Fix the concrete RC1 stabilization findings selected from the final review pass
after BUG-133. The fixes address bounded UPnP shutdown, qBittorrent-compatible
queue polling bounds, native transfer bulk-add request caps, snapshot shared-file
scan cost, and large known2_64.met corruption repair.
Findings Addressed¶
- UPnP and PCP/NAT-PMP discovery shutdown could wait forever after the initial cooperative timeout if a third-party router/library call did not return.
- qBittorrent-compatible torrent-info cache refresh still built an unfiltered full-queue snapshot on the UI thread and had no row cap.
- Native
POST /transfersaccepted unboundedlinksarrays and unchecked link token lengths before dispatching one UI-thread bulk-add command. /snapshotbounded shared-file serialization but still walked the full shared map when the caller did not need an exact total count.known2_64.metcorruption repair stored the last verified recovery offset in a 32-bit integer even though the file format is explicitly 64-bit capable.
Acceptance Criteria¶
- [x] Shutdown no longer blocks indefinitely on stuck NAT discovery workers, and the owner object is intentionally abandoned instead of deleted while a raw worker owner may still be in use.
- [x] qBittorrent-compatible torrent-info refresh passes category filtering into the UI-owned queue walk and enforces a hard row cap.
- [x] Native transfer bulk-add validates link count and per-link length before UI-thread dispatch.
- [x] Snapshot shared-file polling can stop after the requested window when no exact total is requested.
- [x]
known2_64.metcorruption repair keeps the last verified truncation offset as a 64-bit value.
Implementation Evidence¶
474824c0BUG-134 harden final RC1 stabilization edges
Validation Evidence¶
git diff --check- Source normalization scan for touched app files.
- Debug x64 app build through
python -m emule_workspace build app --variant main --config Debug --platform x64 --build-output-mode ErrorsOnly - Release x64 app build through
python -m emule_workspace build app --variant main --config Release --platform x64 --build-output-mode ErrorsOnly