Skip to content

Fix CDN invalid manifest cache recovery#2197

Open
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-inspection-974b
Open

Fix CDN invalid manifest cache recovery#2197
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-inspection-974b

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 11, 2026

Summary

  • Reset all in-memory CDN manifest state when a persisted manifest cache entry is invalid.
  • Clear runtime secrets, artifact mappings, ETag, and last-update metadata together so startup refetches the manifest instead of returning empty definitions.
  • Add a regression test for corrupted cached manifest state.

Validation

  • git diff --check HEAD~1..HEAD
  • Dart/Flutter tests not run: dart/flutter executables are not available on PATH in this environment.
Open in Web View Automation 

Note

Medium Risk
Changes CDN manifest cache recovery and state-reset behavior, which affects app startup and refresh logic if a persisted cache entry is corrupted or stale.

Overview
Fixes corrupted CDN manifest cache recovery by clearing all in-memory provider state (artifact cache, mappings, config, ETag/_lastUpdatedAt, pending-update flag) and persisted SharedPreferences entry when cached manifest JSON cannot be decoded.

Refactors runtime secret cleanup into _clearRuntimeSecrets() and ensures it is invoked on manifest rebuilds and cache clears so secrets/env entries don’t linger across refreshes. Adds test-only hooks to load cached state and assert freshness metadata, plus a regression test covering invalid persisted cache invalidation.

Reviewed by Cursor Bugbot for commit 00ec9cc. Configure here.

Co-authored-by: Sharjeel Yunus <sharjeelyunus@users.noreply.github.com>
@sharjeelyunus sharjeelyunus marked this pull request as ready for review May 11, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant