• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

berserkhmdvhb / agentic-scraper / 17221947934
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: docs/modules-funcs
DEFAULT BRANCH: main
Ran 25 Aug 2025 10:09PM UTC
Jobs 4
Files 67
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Aug 2025 10:07PM UTC coverage: 46.809% (+0.6%) from 46.251%
17221947934

push

github

berserkhmdvhb
refactor(validations): centralize and enforce stricter schema validation

- api/models.py: add `OwnerSub.from_value` trimming/validation for Auth0 subject strings
- api/schemas/user.py:
  - strip and validate `sub` field in `UserProfile`
  - add trimming validator for `name` to remove whitespace and reject empty
  - reuse centralized `validate_optional_str` where appropriate
- api/schemas/items.py: keep boundary `HttpUrl` validation, confirmed conversion to str handled internally
- api/schemas/scrape.py: ensure `id` uses UUID type, align with store-level UUID handling
- routes/scrape.py: switch to using `uuid.UUID` instead of `pydantic.UUID`, update type hints for mypy
- routes/scrape_helpers.py: no structural change, but noted possible JobStatus enum normalization
- routes/scrape_cancel_registry.py: ensure `clear_all()` also resets `_pre_canceled`
- utils/validators.py: no major changes, confirmed central validators in use, preferred Pydantic-native validation where possible
- tests:
  - update test_scrape.py to cast `UUID` → `str` for comparisons and payloads
  - update test_scrape_helpers.py to use real UUIDs instead of plain strings
  - adjust test_schemas_and_models.py:
    - handle HttpUrl normalization adding trailing slash
    - validate trimming behavior in `UserProfile.name`

All code and tests are now mypy + ruff compliant, and all tests pass after aligning schemas, validators, and test expectations.

49 of 52 new or added lines in 6 files covered. (94.23%)

1 existing line in 1 file now uncovered.

2098 of 4482 relevant lines covered (46.81%)

3.74 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
79.65
0.18% src/agentic_scraper/backend/api/routes/scrape.py
1
24.18
0.0% src/agentic_scraper/backend/api/routes/scrape_helpers.py
1
97.67
1.52% src/agentic_scraper/backend/api/schemas/user.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
79.65
0.18% src/agentic_scraper/backend/api/routes/scrape.py
Jobs
ID Job ID Ran Files Coverage
1 17221947934.1 25 Aug 2025 10:09PM UTC 134
46.81
GitHub Action Run
2 17221947934.2 25 Aug 2025 10:09PM UTC 134
46.81
GitHub Action Run
3 17221947934.3 25 Aug 2025 10:09PM UTC 134
46.81
GitHub Action Run
4 17221947934.4 25 Aug 2025 10:09PM UTC 134
46.81
GitHub Action Run
Source Files on build 17221947934
  • Tree
  • List 67
  • Changed 8
  • Source Changed 6
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17221947934
  • 9097e6e0 on github
  • Prev Build on infra/unit-tests (#17220078136)
  • Next Build on infra/unit-tests (#17250976193)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc