feat(scanner): complete localized artifact quality checkpoint

This commit is contained in:
AzuTear
2026-07-11 15:59:19 +02:00
parent 639b0b7f59
commit 8b9f948c6b
215 changed files with 35440 additions and 7273 deletions
+103 -125
View File
@@ -1,139 +1,117 @@
# Current App Status
Updated: 2026-07-09
Updated: 2026-07-11 — current-build live-smoke checkpoint for the
English-default renderer, local artifact removal, shared-clock timing evidence,
and visually reviewed OCR corpus corrections.
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).
Historical live evidence remains documented in
[NATIVE_SCANNER_LIVE_ACCEPTANCE_2026-07-10.md](NATIVE_SCANNER_LIVE_ACCEPTANCE_2026-07-10.md).
The current checkpoint and its explicit remaining release gates are documented
in
[LOCALIZATION_LOCAL_DELETION_TIMING_CHECKPOINT_2026-07-11.md](LOCALIZATION_LOCAL_DELETION_TIMING_CHECKPOINT_2026-07-11.md).
The fresh current-build smoke is documented in
[NATIVE_SCANNER_LIVE_SMOKE_2026-07-11.md](NATIVE_SCANNER_LIVE_SMOKE_2026-07-11.md).
## Summary
## What It Can Do
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.
- Read-only Artifact scanning remains scoped to the accepted English 16:9
Genshin Artifact inventory with a visible detail card. The scanner guards the
target process/window, foreground state, stop controls, and input safety.
- The native path captures card crops while bounded OCR/parse/evaluation workers
stream ordered safe results into the session rail. Review, roll efficiency,
crop evidence, parser confidence, and local promotion/review actions remain
separate concepts.
- Artifacts can be browsed, filtered, sorted, and inspected with local crop,
parser, IK, review, and value evidence. Explicit 14★ native results remain
excluded/manual-review entries; they do not become a salvage or Quick Select
workflow.
- The Builds surface reads only the newest complete native run and shows at
most three read-only, source-bound evidence suggestions. It is not an
optimizer, DPS score, ownership inference, or game-action surface.
- The application UI now defaults to English. German is selectable in Settings
and persists locally. The preference updates the renderer/document language
only; it does not change the English-Genshin Smart Capture contract.
- Artifact detail now has a confirmed local-delete action for a wrong scan,
screenshot, or Store row. Native deletion appends a tombstone, keeps raw
`scan-results.json` evidence intact, deletes only a PNG proven to be within
the selected run directory, and can remove only an explicitly chosen exact
linked Store record. It never focuses Genshin, invokes the input helper, or
performs an in-game action.
- Native runs now write `run-timing.json` using
`native-scanner-run-timing-v1`. It records first-observed request, scanner,
capture, processing, durable-result, and reconciliation milestones so the
end-to-end duration is measured from one shared clock.
- The former 136-item full-inventory Review set has been visually audited for
the current corpus work: 128 are explicit 14★ entries, six have the same
exact duplicated-decimal OCR defect, one requires slot-safe name resolution,
and one incomplete crop intentionally remains `Review`.
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.
## Verified Evidence
## What Works Now
The historical scanner acceptance is still useful regression evidence, but it
does not certify the current change set by itself:
- 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.
- Historical dev runs completed 5/20/50/100 with zero Review, errors, and Store
writes; the historical packaged paths include bounded 5/8/20 and the 2,211
full-owned-inventory soak.
- The saved 50-artifact evidence set still validates at `50/50`, with zero
replay issues, zero Review, zero unknown, and no projection failures.
- The current checkpoint has focused coverage for locale persistence/catalog
parity, artifact Store removal, native-result tombstones/crop containment,
shared-clock timing validation, and the new confirmed OCR corpus cases.
- The final current-build offline gate passed: `npm run acceptance:offline`
completed TypeScript, 72 test files / 444 tests, OCR evaluation, saved-run
validation, package verification (27/27), both dependency audits, and the
diff check.
- The built-renderer Builds/UI acceptance passed with stable semantic hooks:
fresh English, German selection, restored English, Builds context/focus,
reduced motion, overflow, and native plus Store local-delete confirmation
probes. This is deliberately not described as an elevated packaged-executable
run.
- The elevated development current-build smoke `20260711-154827` passed with
50/50 target/capture/click/queue/parse/load reconciliation, 0 Review,
0 processing errors, 0 Store writes, `persist=false`, and a complete
`native-scanner-run-timing-v1` record. Request-to-reconciliation was
`28,022 ms` (`~1.78 Artifacts/s`); that is a functional/safety result, not a
3/s performance claim.
## What Was Just Done
## What Still Needs Testing
- 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.
- If making a current package-runtime claim, separately launch the elevated
packaged executable and verify UAC, preload bridge, helper, and renderer
behavior. The passing built-renderer acceptance does not prove that boundary.
- Repeat the passing native and Store local-delete confirmation probes during an
elevated packaged-executable acceptance if a package-runtime release claim is
needed.
Unit coverage already protects the authoritative tombstone, active-run,
containment, and exact-Store boundaries.
- Do not claim German Genshin OCR/capture support: only the application UI is
localized. Non-16:9 layouts, other Genshin UI languages, and other inventory
categories remain outside accepted scanner scope.
## Current Evidence
## Known Limitations
- `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`.
- OCR can still fail on a new game layout or unreadable crop. The app must route
uncertainty to `Review`; it must not relax matching thresholds or invent a
canonical name from ambiguous text.
- The current parser fixes only the observed exact duplicate decimal punctuation
and uses slot-based artifact-name resolution only when independent
high-confidence slot evidence gives one valid match. The incomplete audited
crop stays `Review` by design.
- Build-Fit remains evidence ranking, not character/build optimization. Team,
weapon, rotation, character ownership, and unsourced aggregate values are not
inferred from Artifacts.
- The current live 50-artifact smoke measured `28,022 ms` request-to-result
reconciliation (`~1.78 Artifacts/s`). The functional gate passed, but the
separate 3/s performance target remains unproven.
## Known Limits
## Next Priorities
- 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.
1. Keep the passing built-renderer acceptance distinct from the optional
elevated packaged-executable runtime/UAC check.
2. Clean generated workspace outputs, commit the coherent checkpoint, and push
the intended branch; the current-build 50-artifact live gate has passed.
3. Continue the next quality phase with visually confirmed corpus growth,
fail-closed parser behavior, profile-source refreshes, and packaged UI
regression coverage. Do not broaden game-category scope or add in-game
mutation.