Skip to content

Remove the Digger feature entirely#374

Merged
SimplicityGuy merged 1 commit into
mainfrom
worktree-remove-digger
May 31, 2026
Merged

Remove the Digger feature entirely#374
SimplicityGuy merged 1 commit into
mainfrom
worktree-remove-digger

Conversation

@SimplicityGuy

Copy link
Copy Markdown
Owner

Why

Reviewing production logs (discogsography-digger) showed every Discogs marketplace scrape returning HTTP 403 — 5,896 requests, 100% blocked. Probing from the deployment host confirmed Discogs has deployed Cloudflare Bot Management (cf-mitigated: challenge) across all of www.discogs.com (the homepage 403s too). No plain HTTP client can pass it, regardless of User-Agent.

A spike against the official API confirmed there's no viable replacement:

  • /marketplace/stats/{release_id} → aggregate lowest-price + count only (no sellers)
  • /users/{username}/inventory → per-seller, but no way to discover which sellers hold a release
  • No release→listings endpoint exists — that mapping only ever came from the now-blocked HTML

Digger's entire purpose was per-seller bundle optimization, which depends on that mapping. Rather than keep a permanently non-functional service (and a scheduler hammering a hard-blocking endpoint), this removes the feature entirely. Git history retains everything if it's ever resurrected via a headless-browser/proxy approach.

What's removed

  • Worker: digger/ (scraper + scheduler) + Dockerfile
  • API: 6 routers, api/digger_agent/, api/digger_refresh/, digger queries, Digger* models, the X-Service-Token guard, and the wantlist-priority seeding hook in the syncer
  • Optimizer: common/digger_optimizer/ + DiggerConfig/digger/anthropic settings
  • Schema: schema-init/digger_schema.py + its wiring
  • MCP: digger_tools + MCP_API_TOKEN plumbing
  • Explore UI: nav tab, pane, settings card, JS, styles
  • Infra: docker-compose (dev+prod) service/secrets/anthropic key, CI jobs, justfile targets, pyproject workspace member/extra, perftest scenarios
  • Docs: digger-agent/optimizer/scraping-policy pages + all references
  • Tests: all digger worker/api/optimizer/eval/schema/perftest suites

Also drops now-unused deps (pulp, bleach, selectolax) and a stray transitive common PyPI package from the lock.

Verification

  • ✅ 3207 Python tests pass · 1054 JS (Vitest) tests pass
  • ✅ ruff, mypy, bandit, yamllint, shellcheck, hadolint, docker-compose validate, actionlint, cargo fmt/clippy (full pre-commit gate)
  • uv lock --check consistent · both compose files validate

197 files changed, −31,606 lines.

🤖 Generated with Claude Code

Discogs deployed Cloudflare Bot Management across www.discogs.com, which
hard-blocks (HTTP 403) every marketplace HTML request regardless of
User-Agent — confirmed from the deployment host. The official Discogs API
exposes no release→listings endpoint (only aggregate /marketplace/stats and
per-seller /users/{username}/inventory), so the seller-bundling feature that
was Digger's entire purpose cannot be restored without defeating the
challenge. Rather than ship a permanently non-functional service, remove it.

Removed surface area:
- digger/ worker service (scraper + scheduler) and its Dockerfile
- API: routers (digger, digger_agent, digger_proposals, digger_recommend,
  digger_reports, internal_digger), api/digger_agent/, api/digger_refresh/,
  digger queries, Digger* models, the service-token guard, and the
  wantlist-priority seeding hook in syncer
- common/digger_optimizer/ and the DiggerConfig + digger/anthropic settings
- schema-init/digger_schema.py and its wiring in postgres_schema.py
- mcp-server digger_tools and MCP_API_TOKEN plumbing
- Explore UI: Digger nav tab, pane, settings card, and JS (digger.js,
  api-client/settings methods, styles)
- docker-compose (dev + prod) digger service, secrets, and anthropic key
- CI (test/list-sub-projects/docker-compose-validate), justfile targets,
  pyproject workspace member/extra, perftest scenarios + auth machinery
- docs: digger-agent/optimizer/scraping-policy pages and all references
- all digger tests (worker, api, optimizer, eval, schema, perftest)

The git history retains everything if the feature is ever resurrected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented May 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mcp-server/mcp_server/server.py 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

E2E Coverage (chromium)

Totals Coverage
Statements: 46.29% ( 1246 / 2692 )
Lines: 46.29% ( 1246 / 2692 )

StandWithUkraine

@github-actions

Copy link
Copy Markdown
Contributor

E2E Coverage (webkit)

Totals Coverage
Statements: 46.29% ( 1246 / 2692 )
Lines: 46.29% ( 1246 / 2692 )

StandWithUkraine

@github-actions

Copy link
Copy Markdown
Contributor

E2E Coverage (firefox)

Totals Coverage
Statements: 46.29% ( 1246 / 2692 )
Lines: 46.29% ( 1246 / 2692 )

StandWithUkraine

@github-actions

Copy link
Copy Markdown
Contributor

E2E Coverage (webkit - iPhone 15)

Totals Coverage
Statements: 46.29% ( 1246 / 2692 )
Lines: 46.29% ( 1246 / 2692 )

StandWithUkraine

@github-actions

Copy link
Copy Markdown
Contributor

E2E Coverage (webkit - iPad Pro 11)

Totals Coverage
Statements: 46.29% ( 1246 / 2692 )
Lines: 46.29% ( 1246 / 2692 )

StandWithUkraine

@SimplicityGuy SimplicityGuy merged commit 54ffac1 into main May 31, 2026
56 of 57 checks passed
@SimplicityGuy SimplicityGuy deleted the worktree-remove-digger branch May 31, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant