5 Commits

Author SHA1 Message Date
shawn c8ffab2c06 feat: connect-id suffix matching for OCR + bump SW cache to v10 2026-06-02 18:32:41 -04:00
shawn 8022c77b70 feat: add normalized matching for label photos → asset DB lookup
- normalize_identifier() strips dots/dashes/prefixes, keeps alphanumeric
- find_asset_by_normalized_id() searches serial_number, connect_id,
  equipment_id, barcode with normalized comparison
- /api/ocr now returns matched_assets in addition to legacy machine_id
- New /api/match-text endpoint for client-side text matching
- scripts/match_label_photo.py CLI tool for OCR + DB matching
- Vision model fixed (mimo-v2-omni at opencode.ai, was using
  truncated placeholder key)
2026-05-29 08:37:06 -04:00
shawn a305766d65 fix: show '— No report yet' for assets without dex_report_date 2026-05-23 18:46:58 -04:00
shawn c64baf2c45 classify_makes: add short 8-digit DN + 76/77 prefix rules
Covers 3 additional edge cases found in unmatched:
- 8-digit 114xxxx / 241xxxx → DN (short serial format)
- 10-digit 76xxxx / 77xxxx → DN (no alpha suffix variant)

Unknown make: 130 → 6 (95.4% classified)
6 remaining: garbage serials (00, 520, a×3) + RY01023590 (low-conf Royal)
2026-05-22 19:10:42 -04:00
shawn 4f33afb445 classify_makes.py: serial number → make/model/class classification
Classifies Unknown-make assets by serial number prefix patterns,
cross-referenced against Cantaloupe Excel export data.

Handles:
- Character substitution errors (S→5, I→1, O→0)
- Double-strike/extra character cleanup (I5SS → 155)
- 8 rule sets: Vendo, Crane (167/168/186/187/222/221/47x),
  DN/Dixie Narco, Royal (20xx/BA/CA/PA), USI, AMS, VE
- Confidence levels: high/medium/low
- Dry-run + --apply modes
- --stats for post-classification summary

Result: 121/130 unknown machines classified (93%)
  76 Vendo, 14 DN, 12 Crane, 8 Royal, 6 USI, 1 AMS
  9 remaining: garbage serials (a, 00, 520) + one-offs
2026-05-22 19:02:04 -04:00