Spaces:
Running
Running
Commit History
-
Housekeeping: lint in CI, client lifecycle, and a truer breaker signal
Claude +1: Claude Opus 5Unverified signatureIndependent cleanups from the review, grouped because each is small. A3 - utils.log_gathered_exceptions imported SerpQuery from serp.py purely to read one attribute, so the lowest layer in the codebase depended on the domain layer. It now takes any iterable of query strings, which also makes it usable from the patent and OPS paths. A4 - the shared httpx client was created at import and never closed; the lifespan tore down the browser but left its connection pool open. It is now closed on shutdown, including when Playwright failed to start. Two lifespan tests cover this, and the existing one no longer closes the real client out from under the rest of the session. A5 - the circuit breaker could not tell "this query had no hits" from "this backend is refusing us". query_ddg_search raises on an empty result because a soft block can parse to zero results, but _search_one counted every exception against the backend - and the breaker is a process-wide singleton, so three unusual-but-legiti…9841346 -
Make the HF Space deploy fail loudly on a concurrent-write collision
ClaudeUnverified signaturegit push --force to the Space was a blind overwrite: it never checked what was currently there, so if anyone else has independent push access to the same Space (direct git push, HF's web editor, their own CI) and deploys around the same time, whichever push landed second would win silently. The loser gets no error - git push --force always succeeds regardless of what it's overwriting - so neither side would know a collision happened without manually diffing the Space's history after the fact. Switched to `git push --force-with-lease`, which refuses to push if the remote's current value doesn't match what we last fetched - i.e. someone else changed it since we looked. Needs an explicit `git fetch space main` right before the push: --force-with-lease compares against the local remote-tracking ref, and this job adds the `space` remote fresh each run with nothing to compare against otherwise (it would either fail every single deploy, or on some git versions silently fall back to acting li…56b0d37 -
Gate the HF Space deploy on tests passing (item 5 from review)
ClaudeUnverified signaturedeploy-to-hf.yml previously went straight from checkout to `git push --force` on every push to main - no lint, no type-check, no test run in between. Added a `test` job (install deps, install Playwright's Chromium, run pytest) and made `deploy` depend on it via `needs: test`, so a commit that breaks the test suite no longer reaches the production HF Space.caf91fb
-
Add GitHub Actions workflow to deploy to HF Space on push to main (#1)
Unverified signaturePushes the repo to huggingface.co/spaces/OrganizedProgrammers/SERPent using the HF_TOKEN repo secret. Claude-Session: https://claude.ai/code/session_012sXQyRk3EZHbYHas8fQsiS Co-authored-by: Claude <noreply@anthropic.com>cd869cb