fix(scanner): printing disambiguation + Layer-1 500 #39

Merged
varutasu merged 1 commit from fix/scanner-printing-disambiguation into main 2026-05-27 14:10:47 -04:00
varutasu commented 2026-05-27 14:09:10 -04:00 (Migrated from github.com)

Summary

  • Layer 1 500 fix: identify-by-text failed on prod because CASE WHEN ${game} IS NOT NULL with a null param breaks Neon parameter typing. Split into separate queries when game is absent.
  • Wrong printing fix: When multiple catalog rows share a name (e.g. many "Seel" printings), show the disambiguation picker instead of auto-selecting one — including after vision returns a set/number guess.
  • Rate-limit storm fix: One concurrent verification at a time, longer stability gate, 60s vision cooldown after 429, debounced error toasts.

Test plan

  • matchTextInCatalog('Seel') → disambiguation with 8 printings (local)
  • npm run test:run — 21/21
  • Scan foil Seel on prod → disambiguation modal with set names, not auto wrong printing
  • Layer 1 no longer 500s; fewer 429s during continuous detection

Made with Cursor

## Summary - **Layer 1 500 fix:** `identify-by-text` failed on prod because `CASE WHEN ${game} IS NOT NULL` with a null param breaks Neon parameter typing. Split into separate queries when `game` is absent. - **Wrong printing fix:** When multiple catalog rows share a name (e.g. many "Seel" printings), show the disambiguation picker instead of auto-selecting one — including after vision returns a set/number guess. - **Rate-limit storm fix:** One concurrent verification at a time, longer stability gate, 60s vision cooldown after 429, debounced error toasts. ## Test plan - [x] `matchTextInCatalog('Seel')` → disambiguation with 8 printings (local) - [x] `npm run test:run` — 21/21 - [ ] Scan foil Seel on prod → disambiguation modal with set names, not auto wrong printing - [ ] Layer 1 no longer 500s; fewer 429s during continuous detection Made with [Cursor](https://cursor.com)
vercel[bot] commented 2026-05-27 14:09:13 -04:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tcg-vault Ready Ready Preview, Comment May 27, 2026 6:09pm

Request Review

[vc]: #vKFhxJ2dwW3vadbCsPdfKUD7qr6YvO/+sFKaRU4/ADo=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ0Y2ctdmF1bHQiLCJwcm9qZWN0SWQiOiJwcmpfRjZXOEVvRkd3Y0g3aWVGcnRvRlNlOXdVVkFhNSIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9yYW5kYWxsLXN0aWxsd2VsbHMtcHJvamVjdHMvdGNnLXZhdWx0LzJ6bkxacUJRa0ZrN0NHQUU1b2k5Uml0ZVluNmsiLCJwcmV2aWV3VXJsIjoidGNnLXZhdWx0LWdpdC1maXgtc2Nhbm5lci1wci0yNzY4MWYtcmFuZGFsbC1zdGlsbHdlbGxzLXByb2plY3RzLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoidGNnLXZhdWx0LWdpdC1maXgtc2Nhbm5lci1wci0yNzY4MWYtcmFuZGFsbC1zdGlsbHdlbGxzLXByb2plY3RzLnZlcmNlbC5hcHAifSwicm9vdERpcmVjdG9yeSI6bnVsbH1dLCJyZXF1ZXN0UmV2aWV3VXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL3ZlcmNlbC1hZ2VudC9yZXF1ZXN0LXJldmlldz9vd25lcj12YXJ1dGFzdSZyZXBvPXRjZy12YXVsdCZwcj0zOSJ9 The latest updates on your projects. Learn more about [Vercel for GitHub](https://vercel.link/github-learn-more). | Project | Deployment | Actions | Updated (UTC) | | :--- | :----- | :------ | :------ | | [tcg-vault](https://vercel.com/randall-stillwells-projects/tcg-vault) | ![Ready](https://vercel.com/static/status/ready.svg) [Ready](https://vercel.com/randall-stillwells-projects/tcg-vault/2znLZqBQkFk7CGAE5oi9RiteYn6k) | [Preview](https://tcg-vault-git-fix-scanner-pr-27681f-randall-stillwells-projects.vercel.app), [Comment](https://vercel.live/open-feedback/tcg-vault-git-fix-scanner-pr-27681f-randall-stillwells-projects.vercel.app?via=pr-comment-feedback-link) | May 27, 2026 6:09pm | <a href="https://vercel.com/vercel-agent/request-review?owner=varutasu&repo=tcg-vault&pr=39" rel="noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://agents-vade-review.vercel.sh/request-review-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://agents-vade-review.vercel.sh/request-review-light.svg"><img src="https://agents-vade-review.vercel.sh/request-review-light.svg" alt="Request Review"></picture></a>
github-actions[bot] commented 2026-05-27 14:09:37 -04:00 (Migrated from github.com)

Pipeline Health

Build + CI gates

Gate Status
Vercel build (Preview) pass
CI: Lint pass
CI: Schema map fresh skipped
Preview smoke pass
Visual diff pass

Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).

Role reports

Role Status
Reviewer report pending
A11y audit pending
Design system audit pending

See individual comments above for details. This rollup updates automatically.

<!-- pipeline-rollup --> ## Pipeline Health ### Build + CI gates | Gate | Status | | --- | --- | | Vercel build (Preview) | ✅ pass | | CI: Lint | ✅ pass | | CI: Schema map fresh | ❌ skipped | | Preview smoke | ✅ pass | | Visual diff | ✅ pass | _Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build)._ ### Role reports | Role | Status | | --- | --- | | Reviewer report | ⏳ pending | | A11y audit | ⏳ pending | | Design system audit | ⏳ pending | See individual comments above for details. This rollup updates automatically.
github-actions[bot] commented 2026-05-27 14:10:33 -04:00 (Migrated from github.com)

Visual Diff

Screenshots and diffs uploaded as artifacts: view run

If intentional changes: update snapshots locally with npx playwright test --project=visual --update-snapshots and commit.

## Visual Diff Screenshots and diffs uploaded as artifacts: [view run](https://github.com/varutasu/tcg-vault/actions/runs/26529657028) If intentional changes: update snapshots locally with `npx playwright test --project=visual --update-snapshots` and commit.
Sign in to join this conversation.
No description provided.