Make CMVP data refresh resilient to transient misses#27
Conversation
Co-authored-by: Ethan Troy <ethanolivertroy@users.noreply.github.com>
Co-authored-by: Ethan Troy <ethanolivertroy@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b0f5836. Configure here.
| if FULL_REFRESH or algorithm_source not in CACHEABLE_ALGORITHM_SOURCES: | ||
| return False | ||
| if previous_metadata.get("algorithm_source") not in CACHEABLE_ALGORITHM_SOURCES: | ||
| return False |
There was a problem hiding this comment.
Blocks algorithm cache fallback
High Severity
can_fallback_to_cached_algorithms rejects fallback when prior run metadata used a non-cacheable algorithm_source (e.g. database or missing), even if cached_algorithm_fields would return algorithms from the checked-in module or detail JSON. A transient extraction failure then defers the certificate, drops it from published module lists, and orphan pruning removes its existing detail file.
Reviewed by Cursor Bugbot for commit b0f5836. Configure here.


Summary
Validation
python3 -m py_compile scraper.py test_scraper.py validate_api.pypython3 test_scraper.pypython3 validate_api.py --require-current-schema --require-supported-algorithm-source --require-data-quality-passgit diff --checkALGORITHM_SOURCE=crawl4ai PYTHONUNBUFFERED=1 python3 -u scraper.py && python3 validate_api.py --require-current-schema --require-supported-algorithm-source --require-data-quality-pass(passed locally while NIST top-level fetches failed and cache fallback was used)