snipe/app
pyr0ball 15996472b7 feat(mercari): Phase 2 — MercariAdapter with Xvfb stability fixes
Implements full Mercari scraping support for the trust-scoring pipeline:

- `app/platforms/mercari/` — new MercariAdapter (scraper-based), scraper
  (parse_search_html / parse_listing_html), and __init__
- `app/platforms/__init__.py` — adds "mercari" to SUPPORTED_PLATFORMS
- `api/main.py` — platform routing: _make_adapter, OR-group guard, seller
  lookup, BTF/Trading API guards all parameterised by platform
- `web/src/views/SearchView.vue` — enables Mercari tab in platform picker

BrowserPool stability fixes (browser_pool.py):
- Add -ac flag to Xvfb (disables X11 auth requirement in Docker containers)
- Shift display counter from :100-:199 to :200-:399 (avoids ghost kernel
  socket conflicts with low-numbered displays)
- Add wait_for_selector / wait_for_timeout_ms params to fetch_html,
  _fetch_with_slot, _fetch_fresh
- Add time.sleep(0.3) in _fetch_fresh after Xvfb start (was missing)

Mercari scraper fix:
- Remove sortBy=SORT_SCORE from build_search_url — that param is deprecated
  on Mercari and causes an empty 85KB response instead of search results

Probe + debug scripts in scripts/:
- probe_mercari.py — standalone Cloudflare bypass test
- debug_fetch_fresh.py — pool simulation diagnostic

Trust signal coverage: feedback_count, feedback_ratio partial score
(account_age_days, category_history absent = score_is_partial=True).
get_completed_sales stubbed for Phase 3.
Tracks: snipe#53 (pool thread-safety fix, follow-up)
2026-05-03 18:39:25 -07:00
..
db feat: reported sellers tracking + community blocklist opt-in 2026-04-16 13:28:57 -07:00
llm feat: wire Search with AI to cf-orch → Ollama (llama3.1:8b) 2026-04-14 13:23:44 -07:00
mcp feat(mcp): Snipe MCP server for Claude Code integration (#27) 2026-04-13 19:33:47 -07:00
platforms feat(mercari): Phase 2 — MercariAdapter with Xvfb stability fixes 2026-05-03 18:39:25 -07:00
tasks feat: preferences store, community signals, a11y + API fixes 2026-04-14 16:15:09 -07:00
trust fix(trust): soften established_bad_actor for high-volume sellers; add declining_ratio flag 2026-04-27 12:54:51 -07:00
ui feat: preferences store, community signals, a11y + API fixes 2026-04-14 16:15:09 -07:00
wizard feat: preferences store, community signals, a11y + API fixes 2026-04-14 16:15:09 -07:00
__init__.py feat: scaffold snipe repo 2026-03-25 13:08:54 -07:00
tiers.py feat: add llm_query_builder tier gate (paid+) to tiers.py and SessionFeatures 2026-04-14 11:44:53 -07:00