WeKnora/internal/application
vicfei 55ec13ac41 fix(knowledge): stop deleting rows from blocking duplicate uploads
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.
2026-09-17 12:15:57 +08:00
..
access refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
repository fix(knowledge): stop deleting rows from blocking duplicate uploads 2026-09-17 12:15:57 +08:00
service fix(retrieval): bound keyword-only BM25 scores before rerank (#3343) 2026-09-17 12:12:11 +08:00