v0.5.8 — upgrade_junos self-deadlock fix
What changed
Pre-v0.5.8, every real call to upgrade_junos with confirm=true hung indefinitely at Phase 2 (transfer) the moment preflight returned Proceed. Root cause: run() acquired the per-router transfer permit, then transfer_file::handle() tried to re-acquire the same permit on the same task — a self-deadlock.
The fix removes the redundant early acquire in run(). transfer_file::handle() is the sole owner of the per-router transfer-lock for the actual SCP critical section.
A same_task_reacquire_deadlocks regression test was added to lock in the expected (deadlock-producing) shape of TransferLocks.
Verification
- Live-tested on vSRX-test16 (2026-05-19):
lock_acquire_pre→lock_acquire_postcompletes in microseconds; full Phase 2 transfer flow proceeds normally. cargo test --workspace --release: 444 passed, 0 failed.cargo audit: 0 vulnerabilities.
Compatibility
- No API surface changes vs v0.5.7.
- No new env vars or config fields.
- Wire-protocol compatible.