Skip to content

Document and harden the Electronics Stack baseline - #11

Merged
ReidSurmeier merged 7 commits into
mainfrom
ReidSurmeier/document-electronics-stack
Jul 31, 2026
Merged

Document and harden the Electronics Stack baseline#11
ReidSurmeier merged 7 commits into
mainfrom
ReidSurmeier/document-electronics-stack

Conversation

@ReidSurmeier

Copy link
Copy Markdown
Owner

Summary

  • establish the repository documentation contract, ADRs, reproducible Python packaging, CI, and MIT license
  • remove committed generated dependencies and undeclared external/corpus gitlinks while retaining corpus provenance
  • make LCSC refresh explicit and keep normal lookups offline
  • integrate the useful sourcing-v2 work from PR feat(sourcing): v2 — API routing + Browserbase escalation, false-positive rate 85% → ~3% #10 behind independent provider-API and Browserbase opt-ins
  • keep provider imports side-effect-free and withhold Browserbase stderr from results
  • align the MCP schema and dispatch with the same network boundaries

Verification

  • pytest -q: 145 passed, 2 skipped fixture checks, 1 documented SKiDL xfail
  • Python compileall passed
  • shell syntax checks passed
  • Git diff checks passed
  • Gitleaks history and proposed-tree scans found no leaks
  • GitNexus reports a low-risk upstream sourcing path covered by focused tests

Scope notes

The historical corpus reports remain historical evidence, not a fresh all-project pass. Optional KiCad tooling, the two unavailable PDF fixtures, the 25-project rerun, and the SKiDL Timer-library gap are explicitly retained as follow-up work. The existing dirty home checkout was not modified.

Calder and others added 7 commits May 1, 2026 12:15
- Amazon /s?k= and AliExpress wholesale URLs marked ok_search_url without HTTP fetch
- Digikey product URLs routed to DigikeyClient.product_details (falls through if no creds)
- Mouser ProductDetail URLs routed to MouserClient.part_number_search (falls through if no key)
- LCSC product URLs routed to local jlcparts SQLite (falls through if DB not cached)
- classify_url() dispatcher; all routers return None to fall through to HTTP layer
…scalation

- Rotate among Chrome 130 macOS/Windows + Firefox 131 Linux User-Agents
- Add Accept, Accept-Language, Accept-Encoding, Sec-Fetch-* headers
- 403/429/502/503 → Browserbase escalation via bb fetch (capped at 30/BOM)
- 404/410/451 → flag immediately as actionable link rot
- Timeout (>10s) → status=slow, not fail
- 7-day disk cache at ~/.cache/electronics-stack/sourcing/url_health/<sha256>.json
- escalation_budget list[int] passed through check_url for cap enforcement
- test_amazon_search_classified_as_placeholder (4 cases)
- test_aliexpress_wholesale_classified_as_placeholder (4 cases)
- test_digikey_url_routes_to_api (3 cases incl. discontinued flag)
- test_lcsc_url_routes_to_db (3 cases)
- test_browserbase_escalation_on_503 (mock subprocess, budget cap)
- test_real_link_rot_still_flagged (404, 410)
- test_cache_hit / test_expired_cache
- test_summary_counts (actionable_failures excludes placeholders + API-routed OKs)
All 30 passing.
- TooManyRedirects (eBay redirect loops) → anti-scrape escalation, not link rot
- ConnectionError with 'Max retries exceeded' / 'Connection reset' → escalation
- bb exit 1 with only node DeprecationWarning in stderr → unchecked_anti_scrape
  (not flagged as dead link — bb just not configured)
- bb auth failure → unchecked_anti_scrape (no false positive)
@ReidSurmeier
ReidSurmeier merged commit 164fee8 into main Jul 31, 2026
1 check passed
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