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.
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
# Current App Status
|
||||
|
||||
Updated: 2026-07-09
|
||||
|
||||
This document is the short current-state entry point. For deeper architecture
|
||||
details see [ARCHITECTURE.md](ARCHITECTURE.md). For the scanner and inventory
|
||||
roadmap see [scanner-results-inventory-roadmap.md](scanner-results-inventory-roadmap.md).
|
||||
For live scanner runbooks see [AUTOMATION_LIVE_SCAN.md](AUTOMATION_LIVE_SCAN.md).
|
||||
|
||||
## Summary
|
||||
|
||||
The app is now an Artifact-first local scanner with a native high-speed capture
|
||||
path validated at 20/50/100-item scale in the current live session. The current product scope is intentionally limited to
|
||||
artifacts. Weapons, materials, and character details may exist as vendored IK
|
||||
catalog data, but they are not active scanner features while their values are
|
||||
not scanned.
|
||||
|
||||
Electron/React should act as the visual control and status surface. The C#
|
||||
helper owns fast Genshin focus, click, scroll, and card-crop capture for the
|
||||
native path. OCR, parsing, review, promotion, and value evaluation remain
|
||||
separate downstream stages so capture speed is not blocked by UI work.
|
||||
|
||||
## What Works Now
|
||||
|
||||
- Smart Capture can read the currently opened artifact detail view through
|
||||
focused crops, OCR preprocessing, deterministic parsing, confidence, and
|
||||
notes.
|
||||
- The visible-inventory auto-scan path is the current stable production
|
||||
baseline: preflight, grid detection, read-only tile selection, detail
|
||||
verification, OCR, parse, store/review, scroll, and summary.
|
||||
- The native IK-style artifact capture path is wired through the C# helper.
|
||||
It captures visible 16:9 Artifact inventory detail card crops and writes a
|
||||
self-contained run directory.
|
||||
- Native runs write `manifest.json`, `capture-jobs.jsonl`, and `status.json`.
|
||||
Post-capture processing can consume the job file and write
|
||||
`scan-results.json` plus `processing-report.json`.
|
||||
- Vendored Inventory Kamera `inventorylists` are copied under
|
||||
`data/ik-inventorylists` and packaged as scanner reference data. Current
|
||||
version is `6.7.0`.
|
||||
- Native artifact post-processing matches parsed artifacts against IK artifact
|
||||
set/piece/slot data and sends conflicts to review.
|
||||
- The scan page has a compact latest-results rail. Native parsed results are
|
||||
labeled as `Geparst`, persisted results as stored, uncertain results as
|
||||
review, and value evaluation as `Wert offen`.
|
||||
- The Inventory view can browse native scan results, stored artifacts, and
|
||||
snapshot fallback rows. It shows native crop previews, field confidence,
|
||||
IK/GOOD metadata, dry-run promotion status, and a per-result
|
||||
`Naechster Schritt`.
|
||||
- The Inventory view now shows an Artifact-only pipeline strip for scope,
|
||||
native capture, OCR queue, review gate, promotion, and evidence.
|
||||
- GOOD import/export, review samples, local text replacements, scanner
|
||||
diagnostics, OCR eval, and local artifact storage exist.
|
||||
|
||||
## What Was Just Done
|
||||
|
||||
- The active UI scope was narrowed to Artifact scanning only.
|
||||
- Weapon, material, and character-detail IK catalog coverage was removed from
|
||||
the primary Inventory feature surface so it cannot look like implemented scan
|
||||
support.
|
||||
- Native result labels were made more honest:
|
||||
`Geparst` means extracted, `Stored` means persisted, `Review` means unsafe,
|
||||
and `Wert offen` means artifact value evaluation has not run yet.
|
||||
- The Inventory detail panel gained a `Naechster Schritt` card:
|
||||
ready for promotion, review first, already in store, blocked, or value later.
|
||||
- New filters were added for native rows and promotable rows.
|
||||
- Native 20/50/100-item dry runs were completed. A live OCR decimal-loss bug
|
||||
and missing native result timestamp were fixed and regression-tested.
|
||||
- Native Inventory results now support explicit single-result promotion with a
|
||||
second confirmation, authoritative main-process revalidation, duplicate
|
||||
detection, store write, scan-result update, and `promotion-log.jsonl`.
|
||||
- Review-required native results now have an inline editor for identity,
|
||||
main stat/value, level, substats, equipped state, lock state, and notes.
|
||||
Approve requires IK identity validation, canonical main-value validation,
|
||||
and legal substat rolls; Reject keeps the result blocked. Approved cases
|
||||
write `review-log.jsonl` and reuse `review-samples.jsonl` for OCR eval export.
|
||||
- The three real Review rows from the 100-item native run were manually
|
||||
corrected and approved through that workflow. The run now has zero remaining
|
||||
Review rows, all three corrections reached the eval candidate pipeline, and
|
||||
the confirmed cases are permanent OCR regressions.
|
||||
- The parser can now repair the confirmed dropped/extra-digit substat cases at
|
||||
+20 only when one legal 5-star roll-count combination exists. Ambiguous OCR
|
||||
stays reviewable.
|
||||
- Project docs and roadmap were updated to state Artifact-only scope and the
|
||||
next scanner/product priorities.
|
||||
|
||||
## Current Evidence
|
||||
|
||||
- `npm run lint` passed.
|
||||
- `npm test` passed with `252` tests.
|
||||
- `npm run build` passed.
|
||||
- `git diff --check` passed; only existing CRLF warnings were reported for
|
||||
`electron/services/inputHelperPowerShellFallback.ts` and `src/styles/base.css`.
|
||||
- Native IK dry runs on 2026-07-09 completed at 20, 50, and 100 items with
|
||||
complete crop/job/result counts, `0` processing errors, and `persisted: false`.
|
||||
The 100-item run captured `100/100` across 4 pages in `24,673 ms`, parsed
|
||||
`100/100`, and safely routed 3 OCR value losses into Review. See
|
||||
[NATIVE_SCANNER_VALIDATION_2026-07-09.md](NATIVE_SCANNER_VALIDATION_2026-07-09.md).
|
||||
- The older visible-inventory path has broader live evidence, including a
|
||||
100-artifact run with `100/100` verified and parsed, `98` stored,
|
||||
`2` duplicates, `0` review samples, `0` misses, and `393 ms/artifact`.
|
||||
|
||||
## Known Limits
|
||||
|
||||
- Native IK-style capture has current-session scale evidence, but later-session
|
||||
repeatability and packaged-app evidence are still open.
|
||||
- The native path is limited to visible 16:9 Artifact inventory with a visible
|
||||
detail card.
|
||||
- Native post-capture results do not persist by default. Clean selected results
|
||||
can now be promoted explicitly after a second UI confirmation.
|
||||
- Artifact value scoring and upgrade projection are not implemented for native
|
||||
results yet.
|
||||
- Review/edit/approve is implemented for one selected native result at a time.
|
||||
Batch review is intentionally not available.
|
||||
- The `333 ms/artifact` target for 3 artifacts/second is not proven.
|
||||
- The native capture worker exceeded 4 artifacts/second, but the smoke runner
|
||||
still captures and processes sequentially; 3 artifacts/second end to end is
|
||||
therefore not proven.
|
||||
- Weapons, materials, and character details are intentionally ignored until
|
||||
their values are actually scanned.
|
||||
|
||||
## What Is Next
|
||||
|
||||
1. Add Artifact value evaluation after extraction is trustworthy. Keep value
|
||||
reasons separate from OCR confidence.
|
||||
2. Add detail-level value reasons and optional upgrade projection. Projection
|
||||
must stay labeled as probabilistic.
|
||||
3. Confirm packaged-app behavior for the C# helper, IK lists, preload bridge,
|
||||
native crop previews, and smoke commands.
|
||||
4. Repeat the native 20/50/100 evidence in a later session to prove repeatability.
|
||||
5. Return to recommendations only after native artifact ingestion, promotion,
|
||||
review, value scoring, and repeatability are strong enough.
|
||||
|
||||
## Not Next
|
||||
|
||||
- Do not prioritize weapons, materials, or character details yet.
|
||||
- Do not auto-persist native scan results before review/promotion is safe.
|
||||
- Do not claim Inventory Kamera parity until broad native Artifact runs prove
|
||||
repeatable speed and quality.
|
||||
- Do not merge extraction confidence and artifact value into one UI score.
|
||||
Reference in New Issue
Block a user