Files
genshin-assistant/docs/scanner-rework-status.md
T
AzuTear 639b0b7f59 feat(scanner): add native artifact pipeline
Add native IK-style capture processing, Artifact Inventory, explicit promotion and single-result review. Confirm the three live OCR corrections in the eval corpus and preserve extraction/value separation.
2026-07-09 23:30:42 +02:00

174 lines
9.0 KiB
Markdown

# Scanner Rework Status
Updated: 2026-07-09
Short current-state entry point: [CURRENT_STATUS.md](CURRENT_STATUS.md).
## Was Es Kann
- Native IK-Erfassung ist als neuer schneller Pfad verdrahtet: Electron/React
starten und zeigen Status, der C# Helper prueft IK-Listen, fokussiert Genshin,
klickt das 16:9 8x4 Grid, scrollt und schreibt Detailkarten-Crops.
- IK `inventorylists` aus Inventory Kamera 1.4.4 sind 1:1 unter
`data/ik-inventorylists` uebernommen und werden in Builds als Resource
mitgeliefert. Der Helper meldet Version `6.7.0` mit `61` Artifact-Sets,
`289` Artifact-Pieces, `247` Waffen, `119` Charakteren und `715` Materialien.
- Jeder native Run legt `manifest.json`, `capture-jobs.jsonl` und `status.json`
im Run-Ordner an. Damit kann OCR/Parsing als nachgelagerte Queue laufen,
ohne den Capture-Loop wieder in React/Electron zu ziehen.
- Nach einem nativen Run kann die App `capture-jobs.jsonl` nachgelagert
verarbeiten und `scan-results.json` plus `processing-report.json` schreiben.
`scan-results.json` enthaelt dauerhafte Ergebnis-Eintraege mit
Extraction-Status, Review-Zustand und bewusst deferierter Value-Auswertung.
Diese Stufe OCRt/parst nach der Erfassung, matched native Artifact-Ergebnisse
gegen IK `inventorylists`, zwingt IK-Konflikte in Review, verarbeitet Crops
ueber eine bounded Queue, schreibt Parser-Feldconfidence in die Resultate und
persistiert standardmaessig noch nicht in die DB.
- Smart Capture reads the current artifact detail view through focused 16:9
crops, OCR preprocessing, deterministic parser matching, and local lookup data.
- Visible-inventory auto-scan is the production baseline: preflight, grid
detection, focus, click, detail verification, OCR, parse, store/review, scroll,
and summary.
- The current live path has completed a 100-artifact run with `100/100` verified
and parsed, `98` stored, `2` duplicates, `0` review samples, `0` misses, and
`393 ms/artifact`.
- Native IK live smoke passed on 2026-07-09 with runtime signature
`2026-07-09-native-ik-visual-probe`: visual preflight ready, guarded probe
changed the detail panel, `2/2` native artifact card crops captured,
post-capture processing parsed `2/2`, `0` review, `0` errors, and
`queueConcurrency: 2` without persisting to the artifact store.
- Native 20/50/100 dry validation also passed in the same live session. The
100-item run captured and parsed `100/100` across 4 pages with `0` errors,
`3` correctly gated Review results, and `0` store writes. See
`docs/NATIVE_SCANNER_VALIDATION_2026-07-09.md`.
- Stored artifacts, review samples, local text replacements, GOOD-compatible
import/export, scanner diagnostics, and OCR eval are implemented.
- The scan page now has a compact `Letzte Ergebnisse` rail. It uses the latest
native `scan-results.json` entries after post-processing and falls back to
newest stored artifacts when no native run result is loaded. Rail rows open
the Inventory surface for detail inspection.
- The app now has an `Inventory` navigation view for browsing native scan
result entries, stored artifacts, and snapshot fallback rows with filters,
sorting, a detail panel, and native crop previews loaded from the scan run
directory. The same view is now scoped to Artifact scanning: it shows IK
Artifact set/piece coverage, a Native Artifact pipeline strip for capture,
post-processing, review, promotion, and evidence, plus a per-result
`Naechster Schritt` panel. Weapons, materials, and character details remain
loaded data only and are intentionally hidden from the active feature UI while
they are not scanned.
- The live-soak runner writes JSON/CSV evidence bundles and validates quality via
`scan-performance-assessment.json`.
## Was Zuletzt Gemacht Wurde
- Der aktive UI-Scope wurde auf Artifact scanning begrenzt.
- Waffen, Materialien und Charakterdetails bleiben als vendored IK-Daten
vorhanden, werden aber nicht mehr als aktive Scanner-Features in der
Inventory UI dargestellt.
- Die Inventory UI zeigt jetzt eine Native Artifact Pipeline:
Scope, Native Capture, OCR Queue, Review Gate, Promotion und Evidenz.
- Native Ergebnislabels wurden geschaerft:
`Geparst` bedeutet extrahiert, `Stored` bedeutet persistiert, `Review`
bedeutet unsicher und `Wert offen` bedeutet bewusst noch nicht bewertet.
- Native Artifact Details zeigen jetzt einen `Naechster Schritt`:
Promotion bereit, Review zuerst, bereits im Store, blockiert oder Wert spaeter.
- Inventory Filter wurden um native Ergebnisse und speicherbare Ergebnisse
erweitert.
- Ein ausgewaehltes, sauberes natives Ergebnis kann jetzt nach einer zweiten
UI-Bestaetigung promotet werden. Der Main-Prozess validiert die autoritative
Run-Datei erneut, prueft Store-Duplikate, schreibt den Store, aktualisiert
`scan-results.json` und protokolliert in `promotion-log.jsonl`.
- Native Review-Ergebnisse koennen direkt im Inventory anhand des Crops editiert,
gegen IK, kanonische Main-Werte und legale Substat-Rolls validiert sowie
freigegeben oder abgelehnt werden. Freigaben aktualisieren `scan-results.json`,
schreiben `review-log.jsonl` und erzeugen einen normalen Eval-Review-Sample.
- Projekt-, Roadmap-, Architektur-, Runbook- und Checklist-Doku wurden auf
Artifact-only Scope nachgezogen.
## Was Noch Nicht
- Native IK-Erfassung captured aktuell Karten-Crops; OCR/Parser laufen erst
nachgelagert ueber den Processor. GOOD-Speichern und Evaluierung laufen noch
nicht automatisch im nativen Pipeline-Nachgang.
- Native IK-Erfassung ist aktuell auf das sichtbare 16:9 Artifact-Inventar
begrenzt.
- The result rail is still a foundation: it can show native `scan-results.json`
entries after post-processing, but does not yet calculate or show real value
scores.
- The inventory browser is still a foundation: value scoring and richer
review/edit flows are not complete.
- Upgrade projection and build recommendations should wait until inventory and
detail evaluation have trustworthy stored artifacts.
- Repeatability across later sessions, more accounts, more locked/equipped
combinations, and more confirmed OCR corpus cases still needs growth.
- The strict `333 ms/artifact` budget for 3 artifacts/second is not proven.
- Weapons, materials, and character details are intentionally out of active
scope until their values are actually scanned.
## Wo Es Noch Probleme Macht
- Die native Pipeline hat jetzt 20/50/100-Skalenevidenz aus einer Live-Session.
Spaetere Session-Repeatability und Packaged-App-Evidenz stehen noch aus.
- Capture roundtrip and OCR remain the main timing costs in the 100-artifact
path.
- Auto-scan still requires a visible artifact inventory detail card for the
production path; broader auto-entry modes remain dev experiments.
- OCR/parser quality is good on the confirmed corpus, but review samples must be
manually labeled before they can become permanent eval ground truth.
- Non-16:9 or unusual game layouts are intentionally higher risk and should
block or fall into review instead of silently scanning.
- The UI now labels these risks in the Artifact Inventory pipeline. Same-session
scale is proven, but external-tool parity and later-session repeatability are
intentionally not claimed.
## Was Noch Verbesserungsfaehig Ist
- Repeat the bounded 20/50/100 native runs in a later session and in a packaged
app to verify that the current post-capture queue remains repeatable.
- Keep native persistence explicit: clean selected results can be promoted
after confirmation, while uncertain results must pass single-item review.
- Finish value scoring and value-reason contracts in the existing detail view from
`docs/scanner-results-inventory-roadmap.md`.
- Keep diagnostics available but out of the primary scan surface.
- Continue expanding confirmed OCR eval cases from real review samples. The
first three native Review cases are corrected, approved, and permanent
regression cases.
- Add artifact value/detail evaluation without collapsing extraction confidence
and artifact value into one ambiguous status.
- Continue performance work only when it reduces capture/OCR overhead without
weakening review, miss, duplicate, or safety gates.
## Was Als Naechstes Ansteht
1. Artifact Value Evaluation ergaenzen, aber erst nach sauberer Extraktion und
weiterhin getrennt von OCR/Parser-Confidence.
2. Detail-Ansicht um Value-Gruende und optionale Upgrade-Projektion erweitern.
3. Packaged-App-Verhalten fuer Helper, IK-Listen, Preload-Bridge,
Crop-Preview und Smoke-Kommandos pruefen.
4. Empfehlungen und Build-UX erst danach wieder nach vorne ziehen.
## Current Validation Commands
```powershell
npm run scan:live:preflight
npm run scan:iterate:validated
npm run scan:goal:validated
npm run scan:repeatability:wait
npm run scan:assessment:validate -- --latest --summary
npm run eval
npm test
npm run build
```
Latest static validation after the Artifact-only Inventory UI update:
```powershell
npm run lint # passed
npm test # passed, 252 tests
npm run build # passed
git diff --check
```
`git diff --check` passed with existing CRLF warnings for
`electron/services/inputHelperPowerShellFallback.ts` and `src/styles/base.css`.