CheckKnowledgeExists excluded only parse_status='failed'. A row whose
async deletion was in flight (or stranded — worker death mid-delete, or
the dead-letter re-mark skipped because the status had moved on) stayed
at 'deleting' and kept the duplicate check matching forever, so
re-uploading the file returned "document already exists" with no path
back except manual SQL (issue #3338).
A deleting row is on its way out: an upload landing while the delete
task is queued or running ends with exactly one live row whichever way
the task concludes — success soft-deletes the old row, retry exhaustion
marks it failed. Excluding 'deleting' alongside 'failed' is therefore
semantically safe without a staleness threshold.
The duplicate-check status policy is now pinned by a matrix test
(failed/deleting pass, pending/processing/completed still duplicate)
covering both the hash path and the filename/size fallback.