Task #5 building blocks, each a pure + unit-tested module:
- goodInterop.ts: GOOD (Genshin Optimizer / Inventory Kamera / Akasha) import and
export for scanned StoredArtifactRecords - slot/stat/set key maps both ways,
substat string <-> { key, value }, main-value reconstruction on import
(ADR-003). Export is lossless; import is best-effort (GOOD lacks piece names).
- artifactMerge.ts: rescan-merge (ADR-006 follow-up). Level-independent identity
(set + slot + main + substat NAME set) collapses leveled re-scan duplicates,
keeping the higher-level/stronger record and summing timesSeen. Conservative:
differing substat lineups never merge.
- dataPackageStatus.ts: warns when the genshin-db package is older than ~45 days
(a patch cycle) so new sets/characters aren't silently missed; surfaced in the
Scanner Diagnose data-package line. Adds dataGeneratedAt to genshinData.
- lockDetection.ts: EXPERIMENTAL read-only lock-status heuristic (gold-pixel
ratio in a top-right icon crop). Pure + tested but not wired into capture; crop
position and threshold need calibration against a reference 16:9 screenshot.
120 tests + build green. Remaining wiring (needs UI / live calibration): GOOD
import/export buttons and live lock detection.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>