Graded scan: use_scrydex='0' can still reach the Scrydex live comps fetch via a free-rung identity pin #698

Open
opened 2026-09-13 03:35:45 +00:00 by gambit-admin · 0 comments
Owner

Follow-up from PR #461 review (round 2, N4).

What: with use_scrydex='0' ("hard-disables Scrydex spend"), a graded scan whose identity gets pinned by a FREE rung — the cert cache (#683), or now the cert-card set-alias rung (#461) — still reaches the graded pricing call. _scrydex_graded_comps_tiered serves our price_daily bucket first (free), but when there is no fresh row it falls through to _scrydex_graded_comps, which calls scrydex.fetch_card_prices → one credit spent under a flag that says spend nothing.

Pre-existing on main for cache-pinned identities; #461 widens the population (cert-bridge slabs now pin without a live search).

Fix sketch: in the recognizer, when use_scrydex is False, price ONLY from _price_daily_graded_comps(...) (+ Card Hedge FMV if the cert agrees) and never enter the Scrydex live tiers; surface _graded_comps_unavailable otherwise. Add a test with use_scrydex=False asserting fetch_card_prices is never awaited.

Where: backend/app/routes/external_scan.py — the scrydex_comps = await _scrydex_graded_comps_tiered(...) sites in _recognize_graded_card_from_image and the single-pass graded path.


Filed from a Claude Code session

Follow-up from PR #461 review (round 2, N4). **What:** with `use_scrydex='0'` ("hard-disables Scrydex spend"), a graded scan whose identity gets pinned by a FREE rung — the cert cache (#683), or now the cert-card set-alias rung (#461) — still reaches the graded pricing call. `_scrydex_graded_comps_tiered` serves our `price_daily` bucket first (free), but when there is no fresh row it falls through to `_scrydex_graded_comps`, which calls `scrydex.fetch_card_prices` → one credit spent under a flag that says spend nothing. **Pre-existing** on main for cache-pinned identities; #461 widens the population (cert-bridge slabs now pin without a live search). **Fix sketch:** in the recognizer, when `use_scrydex is False`, price ONLY from `_price_daily_graded_comps(...)` (+ Card Hedge FMV if the cert agrees) and never enter the Scrydex live tiers; surface `_graded_comps_unavailable` otherwise. Add a test with `use_scrydex=False` asserting `fetch_card_prices` is never awaited. Where: `backend/app/routes/external_scan.py` — the `scrydex_comps = await _scrydex_graded_comps_tiered(...)` sites in `_recognize_graded_card_from_image` and the single-pass graded path. --- Filed from a Claude Code session
gambit-admin added the enhancementapi labels 2026-09-13 03:35:45 +00:00
Sign in to join this conversation.