Got isProductive working properly, and all tests pass. Weirdly sorted-isort is now taking ~500sec as opposed to ~160s earlier and I can't remember what I changed.