[codex] Reuse legacy certificate detail cache#23
Merged
Conversation
Review Summary by QodoReuse legacy certificate detail cache with field migration
WalkthroughsDescription• Treat cached certificate version fields as migratable instead of required • Add missing version keys when reusing older detail payloads • Add regression coverage for legacy detail migration • Improve cache reuse efficiency for historical records Diagramflowchart LR
A["Cached Detail Payload"] -->|Check fingerprint match| B["Fingerprint Matches"]
B -->|Yes| C["Prepare Reused Payload"]
C -->|Add migrated fields| D["Enhanced Detail Payload"]
D -->|Return cached| E["Reused Record"]
B -->|No| F["Fetch Fresh HTML"]
File Changes1. scraper.py
|
Code Review by Qodo
1. Schema lists duplicated
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
software_versions,hardware_versions, andfirmware_versionskeys when reusing older detail payloads.Why
The post-merge update run
25846462127timed out after 2h inRun scraper. Logs showed the scraper loaded 5,249 cached detail records but reused none: it completed 1,086 active records, then only reached 600/4,170 historical records before timeout. A live comparison showed the summary fingerprints still matched for most cached records, but old detail files lacked the newly introduced version keys, so the reuse guard forced a full live refetch.With this patch, the current live summary pages are expected to reuse 1,079/1,086 active records and 4,139/4,170 historical records, leaving only new or changed certificates for live refresh.
Validation
git diff --checkvenv/bin/python -m py_compile scraper.py test_scraper.py validate_api.pyvenv/bin/python test_scraper.pyvenv/bin/python validate_api.py