Spaces:
Sleeping
Sleeping
Commit History
-
Fix bare except and misattributed logger (item 3 from review)
ClaudeUnverified signature- serp.py: query_google_patents's per-item extraction caught bare `except:`, which also swallows asyncio.CancelledError (BaseException in 3.8+), silently absorbing task cancellation instead of letting it propagate. Narrowed to `except Exception:`. - utils.py: `from asyncio.log import logger` reused asyncio's internal logger, so every warning here was misattributed to the 'asyncio' logging namespace instead of the app's own. Now uses logging.getLogger(__name__). - Updated the characterization test that had pinned the old logger name to assert the fixed one instead.21042c7
-
Mirror SERPent from Hugging Face Space with bug fixes
ClaudeUnverified signatureMirrors OrganizedProgrammers/SERPent (https://huggingface.co/spaces/OrganizedProgrammers/SERPent) with the following fixes applied on top: - app.py: make /serp/search try all queries concurrently instead of sequentially, and surface per-query backend failures in the response's error field instead of silently dropping them when at least one other query in the batch succeeded. - app.py: add opt-in SERPENT_API_KEY protection (X-API-Key or Authorization: Bearer) gating REST and MCP alike via HTTP middleware, closing the unauthenticated open-scraping-proxy surface. Unset by default, so behavior is unchanged until explicitly enabled. - app.py: load docs/docs.md safely (context-managed read, fallback description) instead of an unguarded open().read() at import time. - serp.py: raise a clear BrowserUnavailableError instead of an AttributeError when Playwright failed to start and pw_browser is None. - serp.py: clamp n_results to [1, 100] in SerpQuery so a negative or huge val…cb1e234