delete_folder checks that a directory exists, then calls os.listdir outside its retry handler. Another cleaner can remove that directory before listdir or rmtree, causing an otherwise successful cleanup to raise FileNotFoundError.
Reproduced on Linux / Python 3.12 against upstream commit 677d669ac48d878dbbb633f70c71995a294e2aa5. A deterministic regression and focused fix are prepared.
This report was prepared with AI assistance.
delete_folder checks that a directory exists, then calls os.listdir outside its retry handler. Another cleaner can remove that directory before listdir or rmtree, causing an otherwise successful cleanup to raise FileNotFoundError.
Reproduced on Linux / Python 3.12 against upstream commit
677d669ac48d878dbbb633f70c71995a294e2aa5. A deterministic regression and focused fix are prepared.This report was prepared with AI assistance.