Fix scan crash when framework cache hits persisted review_cache#475
Closed
MacHatter1 wants to merge 1 commit intopeteromallet:mainfrom
Closed
Fix scan crash when framework cache hits persisted review_cache#475MacHatter1 wants to merge 1 commit intopeteromallet:mainfrom
MacHatter1 wants to merge 1 commit intopeteromallet:mainfrom
Conversation
Prevent scan state persistence from crashing when review_cache contains framework detection/info dataclasses. Adds regression coverage and keeps json_default more robust for future cache regressions.
Owner
|
Thanks @MacHatter1! You correctly identified the framework cache serialization crash — that's a real bug. The Your encode/decode helpers for framework cache round-tripping addressed a secondary issue (cache miss after reload), but since PR #483's approach means framework objects never reach the persistence layer, that code path is no longer needed. Appreciate the thorough investigation — you clearly dug deep into the serialization chain! |
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.
Problem
desloppify scancould crash while persisting state ifstate["review_cache"]contains framework detection / info dataclass instances (non-JSON-serializable).Fix
review_cachefor:frameworks.ecosystem.present:*(framework detection)framework.nextjs.info:*(Next.js info)json_defaultto encode dataclasses/enums defensively so future cache regressions don't brick scans.Tests
pytest -q(6236 passed, 165 skipped)PYTHONPATH:vercel/nextjs-postgres-auth-startervercel/swrsindresorhus/ky