Parent
Architecture review (2026-06-21). Slice 3 of 6 from the deepening series. Documented at server/usbip-server/src/hotplug.rs:40-106 and CONTEXT.md:35-37.
What to build
HotplugSource, HotplugEvent, and HotplugMonitor are declared, exported, and tested — but no Server ever instantiates one. CONTEXT.md lists hot-plug detection as a v1.0 reliability primitive. The agent must pick one of two paths and execute end-to-end:
Path A — wire it. Server::new constructs a HotplugMonitor::new(rusb::Context::new()?) and spawns a task that subscribes to attach/detach events. Detach events close active client sessions with a structured error. Attach events refresh the advertised device list and re-broadcast over mDNS. Tests must include a fake libusb context producing a scripted attach/detach sequence.
Path B — delete it. Remove hotplug.rs, remove the tests/hotplug_integration.rs file, remove the symbols from lib.rs re-exports, and amend CONTEXT.md to demote hot-plug detection to "deferred to v1.1". Update any callers (ARCHITECTURE.md, CLAUDE.md) that reference it.
The choice belongs to the agent; the discipline is that one of the two lands, not both, not neither.
Acceptance criteria
Blocked by
Parent
Architecture review (2026-06-21). Slice 3 of 6 from the deepening series. Documented at
server/usbip-server/src/hotplug.rs:40-106andCONTEXT.md:35-37.What to build
HotplugSource,HotplugEvent, andHotplugMonitorare declared, exported, and tested — but noServerever instantiates one. CONTEXT.md lists hot-plug detection as a v1.0 reliability primitive. The agent must pick one of two paths and execute end-to-end:Path A — wire it.
Server::newconstructs aHotplugMonitor::new(rusb::Context::new()?)and spawns a task that subscribes to attach/detach events. Detach events close active client sessions with a structured error. Attach events refresh the advertised device list and re-broadcast over mDNS. Tests must include a fake libusb context producing a scripted attach/detach sequence.Path B — delete it. Remove
hotplug.rs, remove thetests/hotplug_integration.rsfile, remove the symbols fromlib.rsre-exports, and amend CONTEXT.md to demote hot-plug detection to "deferred to v1.1". Update any callers (ARCHITECTURE.md,CLAUDE.md) that reference it.The choice belongs to the agent; the discipline is that one of the two lands, not both, not neither.
Acceptance criteria
Serverconstructs aHotplugMonitorand the integration test runs end-to-end, or (b)hotplug.rsand its tests are deleted and CONTEXT.md is amendedgrep -r 'HotplugMonitor::new' server/usbip-server/src/returns at least one construction sitegrep -r 'hotplug\|Hotplug' server/usbip-server/src/returns zero matches andtests/hotplug_integration.rsno longer existscargo test -p usbip-server --releasepasses;cargo clippy --workspace -- -D warningscleanBlocked by