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:
AzuTear
2026-07-09 23:30:42 +02:00
parent 28d60eb915
commit 639b0b7f59
92 changed files with 13606 additions and 1703 deletions
+19 -7
View File
@@ -13,25 +13,24 @@
- [ ] `npm run build` passes.
- [ ] Manual Smart Capture is tested when possible.
## IK-Speed Or OCR-Engine Claim
## Live Scan Timing Claim
- [ ] `/health.appBuild.signature` matches the current `APP_RUNTIME_SIGNATURE`.
- [ ] `npm run scan:live:preflight` passes, or use the validated comparison command that runs it first.
- [ ] `npm run scan:live:preflight` passes, or use the validated command that runs it first.
- [ ] During manual UAC startup, `npm run scan:live:preflight:wait` may be used before the scan chain.
- [ ] `npm run scan:assessment:test` passes.
- [ ] Use `npm run scan:iterate:compare:validated` or `npm run scan:iterate:compare:validated:wait` for short 20-artifact tuning loops.
- [ ] Prefer `npm run scan:goal:compare:validated` or `npm run scan:goal:compare:validated:wait` for the final live comparison because it runs preflight, comparison, and assessment validation in sequence.
- [ ] Use `npm run scan:iterate:validated` or `npm run scan:iterate:validated:wait` for short 20-artifact tuning loops.
- [ ] Prefer `npm run scan:goal:validated` or `npm run scan:goal:validated:wait` for the final live run because it runs preflight, scan, and assessment validation in sequence.
- [ ] The run includes `scan-performance-assessment.json`.
- [ ] `npm run scan:assessment:validate -- --latest` or explicit `--input=<path>\scan-performance-assessment.json` passes.
- [ ] If claiming a specific winner, the validator is run with `--expect-winner=current` or `--expect-winner=ik-traineddata`.
- [ ] If claiming the current scanner path, the validator is run with `--expect-winner=current`.
- [ ] Final report cites the validator JSON or `--summary` output, including the assessment path.
- [ ] For iteration claims, the 20-artifact run finishes cleanly and is validated with `--limit=20`.
- [ ] For final claims, the 100-artifact run finishes cleanly.
- [ ] Parsed count is at least the requested count.
- [ ] Miss rate is at or below 2%.
- [ ] Review rate is at or below 15%.
- [ ] Speed comparison uses active scan timing plus quality, not click count alone.
- [ ] The default OCR engine is changed only after same-capture benchmark evidence.
- [ ] Speed reporting uses active scan timing plus quality, not click count alone.
## UI Change
@@ -48,6 +47,19 @@
- [ ] The live rail shows finished artifact rows only, not intermediate OCR/debug state.
- [ ] Each live row has scan number, artifact name or compact fallback, value score, and a short status pill.
- [ ] Extraction confidence and artifact value remain separate in the data model.
- [ ] Native post-capture runs write `scan-results.json` with extraction status and deferred/review value status.
- [ ] Native post-capture reports include bounded queue evidence such as `queueConcurrency` when OCR/parse workers run.
- [ ] Native artifact post-processing records IK/GOOD match metadata and sends IK set/piece/slot conflicts to review.
- [ ] Native scan result details preserve parser field confidence for review instead of hiding uncertainty.
- [ ] Native inventory promotion is previewed as a dry-run decision before any artifact-store write path is enabled.
- [ ] Weapon, character, and material IK matching claims are backed by category-specific capture evidence, not just catalog availability.
- [ ] Native `supportedCategories` distinguishes `catalogAvailable` from `nativeCaptureSupported`.
- [ ] Native scan start, run manifest, status, and capture jobs carry an explicit scan category.
- [ ] Native preflight and post-capture processing block catalog-only categories before OCR/parsing.
- [ ] Native preflight blocks blank or too-uniform Genshin captures before any click is sent.
- [ ] Native crop previews are loaded only through the Electron bridge and stay constrained to PNG files inside the selected run directory.
- [ ] Native live smoke uses `npm run scan:native:smoke` before broad native timing or store-promotion claims.
- [ ] Artifact-only scope is visible in the UI; weapons, materials, and character details are not presented as active scanner features while they are not scanned.
- [ ] Low-confidence or conflicting reads show `Review` instead of a normal weak/strong value decision.
- [ ] Duplicate state is represented separately from artifact quality.
- [ ] The artifact inventory view can browse stored scan results without opening diagnostics.