Every source goes into the queue before the first pop — then the levels come out right for free, with no per-source bookkeeping at all. The second half of the problem is the fresh counter, which is the only thing that tells finished apart from unreachable.
minutes - 1 because the sources themselves occupy level 1 and rot nothing; a fresh orange left at the end means it was never reachable, which is -1, not a larger number.