sweep
Unweave every patch pick selects. An entry leaves the map only once its advice is really gone, so a sweep that threw leaves every patch it picked listed, woven and firing — and retryable.
Three phases rather than N removals, because the retransform is where the cost is and it batches: deregister everything first (free), drop all their advice in ONE pass, then let the bridge entries go. Removing serially spends a safepoint per patch; this spends one for the whole sweep.
Phase 2 owns the whole failure, being the only phase that can fail — 1 is a field write, 3 is two map removals. Stopping there is what keeps woven advice and its registered handler paired, the invariant PatchHandle.finish exists to protect.
Return
the ids removed, sorted.
Throws
if the retransform threw. Nothing came off; repeat the call to resume.