feat(scanner): complete localized artifact quality checkpoint
This commit is contained in:
@@ -30,6 +30,31 @@ English UI:
|
||||
nothing to the artifact store. Full evidence and the parser/timestamp fixes
|
||||
are recorded in
|
||||
[NATIVE_SCANNER_VALIDATION_2026-07-09.md](NATIVE_SCANNER_VALIDATION_2026-07-09.md).
|
||||
- On 2026-07-10, a fresh later-session chain passed with the hardened native
|
||||
helper: `5/20/50/100`, all parsed/evaluated, `0` Review, `0` processing
|
||||
errors, and `0` store writes. The new 100er captured `100/100` over four
|
||||
pages at `4.37/s` and processed at `3.15/s`, with no duplicate PNG hash group,
|
||||
repeated page, or identical page boundary.
|
||||
- A later real Settings-UI acceptance selected `Eigenes Limit -> Artefakte ->
|
||||
5`. Genshin, visible detail, and the 4x8 grid passed preflight;
|
||||
target/captured/processed/parsed were all 5, Review and processing errors were
|
||||
0, persistence stayed disabled, and the current-session result rail contained
|
||||
five entries. A later packaged row-limit run resolved one detected row to
|
||||
eight Artifacts and passed 8/8 with the same non-persistence boundary.
|
||||
- The packaged full-owned-inventory run `20260710-223233` resolved the target
|
||||
from the OCR-confirmed owned count `2,211`, captured all 2,211 crops over 70
|
||||
pages, streamed results during capture, and produced zero processing errors
|
||||
and zero store writes. Its first parser pass correctly failed the 15% Review
|
||||
gate at 490 Review. After the structurally safe five-star +0 repair, the
|
||||
current package reprocessed the same complete corpus at 136 Review (6.15%);
|
||||
the saved-run validator then passed with zero issues.
|
||||
- The bounded inventory-top reset now completes in about `1.7 s` instead of
|
||||
about `50.7 s`; the 3,200-event range and per-event foreground/stop guards
|
||||
remain intact.
|
||||
- A packaged build started from `%TEMP%` and completed a native 5er through
|
||||
renderer, preload, IPC, packaged helper, and packaged IK resources with
|
||||
`persist=false`. See
|
||||
[NATIVE_SCANNER_LIVE_ACCEPTANCE_2026-07-10.md](NATIVE_SCANNER_LIVE_ACCEPTANCE_2026-07-10.md).
|
||||
|
||||
The old alternate OCR-engine and comparison paths have been retired. The app now
|
||||
runs the current OCR/capture path only. Performance claims should be stated as
|
||||
@@ -126,6 +151,17 @@ npm run scan:native:smoke
|
||||
npm run scan:native:smoke:5
|
||||
```
|
||||
|
||||
For the gated live scale chain, run and validate each size before continuing:
|
||||
|
||||
```powershell
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\native-live-smoke.ps1 -Limit 20
|
||||
npm run scan:native:validate:saved -- --targets=20
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\native-live-smoke.ps1 -Limit 50
|
||||
npm run scan:native:validate:saved -- --targets=50
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\native-live-smoke.ps1 -Limit 100
|
||||
npm run scan:native:validate:saved -- --targets=100
|
||||
```
|
||||
|
||||
It checks `/health`, `/scanner/native/data`,
|
||||
`/scanner/native/preflight?category=artifacts` including the native visual
|
||||
blank-capture guard, runs the guarded
|
||||
@@ -140,6 +176,67 @@ outputs/native-live-smoke/<timestamp>/
|
||||
Use this native smoke path before enabling any artifact-store promotion from
|
||||
native `scan-results.json`.
|
||||
|
||||
For a deliberate packaged-runtime acceptance, first build with
|
||||
`npm run package:offline-check`, then launch the unpacked EXE from a foreign
|
||||
working directory with a loopback-only temporary CDP port:
|
||||
|
||||
```powershell
|
||||
$exe = (Resolve-Path "outputs\dist\win-unpacked\Genshin Artifact Assistant.exe").Path
|
||||
Start-Process -FilePath $exe `
|
||||
-ArgumentList "--remote-debugging-address=127.0.0.1", "--remote-debugging-port=9223" `
|
||||
-WorkingDirectory $env:TEMP -Verb RunAs
|
||||
npm run package:live:inspect
|
||||
```
|
||||
|
||||
`package:live:inspect` is read-only. The following command is a real bounded
|
||||
five-card Genshin scan and therefore requires the same live authorization and
|
||||
preconditions as every other input test:
|
||||
|
||||
```powershell
|
||||
npm run package:live:scan5
|
||||
```
|
||||
|
||||
The runner calls packaged renderer/preload/IPC methods serially, validates the
|
||||
5-result non-persistence contract, and writes JSON plus a screenshot below
|
||||
`outputs/packaged-live/`. Close the packaged app after testing so the temporary
|
||||
CDP port disappears.
|
||||
|
||||
For the streaming pipeline, use the real Settings-UI path with a bounded target
|
||||
large enough to observe overlap:
|
||||
|
||||
```powershell
|
||||
npm run package:live:ui-stream20
|
||||
```
|
||||
|
||||
This acceptance is stricter than a correct final count. It requires native
|
||||
capture to be observed as running while at least one processing worker has
|
||||
finished and at least one current-session result card is already visible. It
|
||||
also records the maximum evaluated/result counts seen during capture, verifies
|
||||
all 20 final entries, and checks the insertion animation unless the operating
|
||||
system requests reduced motion. Persistence remains disabled.
|
||||
|
||||
The same packaged Settings-UI runner exposes all accepted scope paths:
|
||||
|
||||
```powershell
|
||||
npm run package:live:ui-scan5
|
||||
npm run package:live:ui-row1
|
||||
npm run package:live:ui-stream20
|
||||
npm run package:live:ui-full-inventory
|
||||
```
|
||||
|
||||
`package:live:ui-full-inventory` explicitly selects `Gesamtes Inventar` and
|
||||
never supplies a numeric fallback. It accepts the target only from the running
|
||||
scanner status after the app has read the current owned Artifact count. The
|
||||
runner rejects targets outside `1..2400`, requires exact captured/processed/
|
||||
parsed/result/UI-row counts, checks `pages = ceil(target / 32)`, enforces at
|
||||
most 15% Review with zero processing errors, verifies streaming overlap and
|
||||
document fit, and requires `persist=false` with zero store writes. Its timeout
|
||||
is 15 minutes. The real elevated run `20260710-223233` reached 2,211/2,211 over
|
||||
70 pages. Because the initial parser produced 490 Review, the gate rejected the
|
||||
first result honestly; current-package reprocessing reduced that to 136 Review
|
||||
(6.15%), and `scan:native:validate:saved -- --targets=2211` passed with zero
|
||||
issues. This two-stage evidence is the accepted full-inventory baseline.
|
||||
|
||||
The native preflight and start endpoints both accept an explicit category:
|
||||
|
||||
```powershell
|
||||
@@ -157,8 +254,32 @@ almost entirely white/black, or too visually uniform to be trusted.
|
||||
The probe-click endpoint additionally requires a detected Genshin-client
|
||||
artifact inventory grid and visible artifact detail card before sending input.
|
||||
|
||||
At native Artifact-scan startup, the helper first resets the inventory to the
|
||||
top with a bounded upward wheel sequence at the calibrated grid anchor and then
|
||||
waits for the UI to stabilize. Genshin is focused only for initial startup. The
|
||||
native loop checks that the same Genshin HWND is still foreground immediately
|
||||
before every click and every wheel event; focus loss stops the run without an
|
||||
automatic refocus. Stop, ESC, Enter, and F9 remain active during the reset,
|
||||
stabilization, clicks, captures, and page scrolling. Native status reports
|
||||
`initialTopResetMs` and `totalMs` separately; `activeMs` starts after the reset
|
||||
and remains the capture-rate denominator.
|
||||
|
||||
Do not replace this production reset with `B` plus an Artifact-tab click based
|
||||
on event count alone. Reopening depends on the current menu/inventory state and
|
||||
adds a key toggle plus a coordinate target. It has not been live benchmarked
|
||||
against the accepted bounded wheel reset. If evaluated later, run it as a
|
||||
separate guarded A/B probe and compare successful top-state detection, focus/
|
||||
stop behavior, coordinate robustness, and elapsed reset time before changing
|
||||
the default.
|
||||
|
||||
## Evidence Commands
|
||||
|
||||
The commands in this first subsection exercise the older visible-inventory
|
||||
engine and its assessment format. They remain useful for regression work on
|
||||
that engine, but they do not post-process or validate the current native C#
|
||||
capture path. Use `native-live-smoke.ps1` plus
|
||||
`scan:native:validate:saved` for current native acceptance.
|
||||
|
||||
After the elevated app is running and Genshin is open on the artifact inventory,
|
||||
the non-elevated terminal can drive the local dev-control endpoints and save a
|
||||
full evidence bundle:
|
||||
@@ -210,12 +331,35 @@ npm run scan:assessment:validate -- --latest --summary --limit=20 --max-active-a
|
||||
100-artifact current run is valid scanner evidence; it is not evidence that the
|
||||
3 artifacts/second budget was met unless this budget check also passes.
|
||||
|
||||
The historical `native-live-smoke.ps1` path is intentionally serial: it waits
|
||||
for native capture to finish and only then invokes post-capture processing.
|
||||
Do not divide a target by the sum of those two durations and describe the
|
||||
result as the current streaming pipeline's end-to-end rate. The 2026-07-11
|
||||
read-only streaming-20 check (`20260711-090019`) proved overlap (a result was
|
||||
visible before capture completed) and observed 20/20 clean results at 4.43
|
||||
capture/s and 2.39/s from request issue to result reconciliation. That bounded
|
||||
observation is not a general performance claim: native start, capture start/end,
|
||||
processing start/end, and final reconciliation still need one persisted shared
|
||||
clock before publishing an end-to-end budget result.
|
||||
|
||||
The assessment self-test does not need Genshin:
|
||||
|
||||
```powershell
|
||||
npm run scan:assessment:test
|
||||
```
|
||||
|
||||
Saved native results can be re-evaluated without Genshin, focus changes, or
|
||||
input automation:
|
||||
|
||||
```powershell
|
||||
npm run scan:native:replay -- --run-dir=<native-run-dir> --repeats=5
|
||||
```
|
||||
|
||||
This is an offline determinism and result-contract check. It does not replace a
|
||||
live capture smoke test. The ordered checklist was executed on 2026-07-10; its
|
||||
results are in
|
||||
[NATIVE_SCANNER_LIVE_ACCEPTANCE_2026-07-10.md](NATIVE_SCANNER_LIVE_ACCEPTANCE_2026-07-10.md).
|
||||
|
||||
## Review-To-Eval Quality Loop
|
||||
|
||||
After any live scan that creates review samples, export candidates before adding
|
||||
@@ -263,11 +407,13 @@ as higher risk and validated with Smart Capture plus the probe.
|
||||
|
||||
Before marking an automation change done:
|
||||
|
||||
1. Run `npm run lint`.
|
||||
2. Run `npx tsc -p tsconfig.electron.json` when Electron/preload/main changed.
|
||||
3. Run `npm test`.
|
||||
4. Run `npm run build`.
|
||||
5. If Genshin is available, run `/automation/probe-click?index=1`.
|
||||
6. For scan-loop changes, run
|
||||
`/scanner/start?entry=visible-inventory&limit=2` before any broader scan.
|
||||
7. Record new live findings in this file and in `docs/scanner-rework-status.md`.
|
||||
1. Run `npm run helper:test` when native input safety changed.
|
||||
2. Run `npm run lint`.
|
||||
3. Run `npx tsc -p tsconfig.electron.json` when Electron/preload/main changed.
|
||||
4. Run `npm test`.
|
||||
5. Run `npm run build`.
|
||||
6. If Genshin is available, run `/automation/probe-click?index=1`.
|
||||
7. For native scan-loop changes, run `npm run scan:native:smoke:5` before any
|
||||
20/50/100 progression. Use the explicit visible-inventory endpoint only
|
||||
when that legacy engine itself changed.
|
||||
8. Record new live findings in this file and in `docs/scanner-rework-status.md`.
|
||||
|
||||
Reference in New Issue
Block a user