Some checks failed
CI / Lint (pull_request) Has been cancelled
CI / Schema map up to date (pull_request) Has been cancelled
CI / Forbidden patterns (9 checks) (pull_request) Has been cancelled
CI / Migrations apply (node-pg-migrate) (pull_request) Has been cancelled
Visual diff / Should run? (pull_request) Has been cancelled
CI / Unit tests (vitest) (pull_request) Has been cancelled
Convoy metrics gate / Require role-event telemetry on convoy PRs (pull_request) Has been cancelled
PR Health rollup / Aggregate gate status (pull_request) Has been cancelled
Preview smoke / Should run? (pull_request) Has been cancelled
Preview smoke / Playwright smoke (pull_request) Has been cancelled
Visual diff / Screenshot diff (pull_request) Has been cancelled
Add pricing schema, free API integrations (MTG bulk, TCGdex, Foolio), valuation and sort-by-price, card detail pricing UI, and nearby store discovery via home zip and OSM geo clients. Co-authored-by: Cursor <cursoragent@cursor.com>
1.6 KiB
1.6 KiB
| convoy | brief_number | depends_on | recommended_model | model_tier | files | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| pricing-online-local | 5 |
|
composer-2.5 | standard |
|
Brief 5: Foilio Lorcana pricing ingest
Goal (1 sentence)
Enrich Lorcana bulk sync with hourly Foilio feed prices keyed by card id and name+set.
Files in scope (do not edit anything else)
lib/pricing/foilio-client.jslib/card-import/lorcana-bulk.jstest/lib/pricing/foilio-client.test.jstest/lib/card-import/lorcana-bulk.test.js
Conventions to follow
- Feed URL:
process.env.FOILIO_PRICES_FEED_URL ?? 'https://foilio.net/api/prices/feed?game=lorcana'. - Client fetches once per sync run; build
Mapbycard_idand compositenormalize(name)|set. - Extend
buildUpsertQuery/mapLorcanaCardto includecurrent_price,market_price,prices_updated_at. - Prefer USD fields when present; otherwise EUR with
currencynoted in snapshot. recordPriceSnapshotswithsource: 'foilio'.- Preserve existing
scryfall_id = Unique_IDkeying.
Acceptance criteria
- Lorcana cards receive prices when feed contains a match
- Single feed fetch per
runBulkLorcanaSyncinvocation - Summary includes
pricesMatched/unmatchedCount - Tests pass with fixture JSON
- No scope expansion
Rationale (≤3 sentences)
Lorcana bulk currently omits price columns entirely. Foilio provides a free hourly JSON feed. One fetch per sync aligns with their 1h cache.