diff --git a/vision_runner.ts b/vision_runner.ts index 5d50bf5..1f5f53d 100644 --- a/vision_runner.ts +++ b/vision_runner.ts @@ -358,6 +358,7 @@ function mergeRecord(det: BuyerRecord, vis: VisionRaw, model: string): BuyerReco ...det, _parser: "vision", _vision_model: model, + _vision_ts: new Date().toISOString(), _vision_error: undefined, }; delete (base as Record)["_vision_error"]; @@ -451,7 +452,7 @@ async function main(): Promise { const pdfPath = pdfIndex.get(det.file_name); if (!pdfPath) { - done.set(det.file_name, { ...det, _vision_error: "PDF nicht gefunden" }); + done.set(det.file_name, { ...det, _vision_error: "PDF nicht gefunden", _vision_ts: new Date().toISOString() }); errors++; progress(`${tag} … FEHLER: PDF nicht gefunden`); continue; @@ -476,7 +477,7 @@ async function main(): Promise { } if (!vis) { - done.set(det.file_name, { ...det, _vision_error: lastErr }); + done.set(det.file_name, { ...det, _vision_error: lastErr, _vision_ts: new Date().toISOString() }); errors++; progress(`${tag} … FEHLER: ${lastErr}`); } else { @@ -487,7 +488,7 @@ async function main(): Promise { } } catch (e) { const msg = e instanceof Error ? e.message : String(e); - done.set(det.file_name, { ...det, _vision_error: msg }); + done.set(det.file_name, { ...det, _vision_error: msg, _vision_ts: new Date().toISOString() }); errors++; progress(`${tag} … FEHLER: ${msg}`); } finally {