mateclaw/mateclaw-server
matevip 4700d0312d fix(wiki): deduplicate raw material uploads across all processing statuses
Root cause: addFile()/addText() hash dedup only matched rows with
status=completed, so the same file uploaded while in partial/pending/
processing/failed status would create a duplicate row.

Fix:
- Remove .eq(processingStatus, "completed") from dedup queries — match
  any non-deleted row with the same content hash in the KB
- On dedup hit: completed/pending/processing → return as-is;
  partial/failed → trigger reprocess (partial enters resume branch)
- Clean up the newly uploaded temp file when dedup discards it
- Frontend: uploadRawFile/addRawText check for existing id in the list
  before unshift to prevent visual duplicates

Test: WikiRawMaterialDedupTest — 10 cases covering all 5 statuses,
reprocess triggers for partial/failed, no-op for others, insert only
when no match.
2026-04-19 19:36:13 +08:00
..
src fix(wiki): deduplicate raw material uploads across all processing statuses 2026-04-19 19:36:13 +08:00
Dockerfile chore: bump version to 1.1.137-SNAPSHOT 2026-04-18 21:58:54 +08:00
pom.xml chore: bump version to 1.1.137-SNAPSHOT 2026-04-18 21:58:54 +08:00