Skip to content

[codex] Reproduce stale workflow envelope restore#3548

Draft
facumenzella wants to merge 10 commits into
mainfrom
codex/pr-3537-stale-envelope-test
Draft

[codex] Reproduce stale workflow envelope restore#3548
facumenzella wants to merge 10 commits into
mainfrom
codex/pr-3537-stale-envelope-test

Conversation

@facumenzella

Copy link
Copy Markdown
Member

Adds a focused failing regression test for PR #3537.

The test simulates a backend-down restore where the cached workflows list still contains wf_1, but now with prefetch=false, while an older persisted detail envelope for wf_1 remains on disk. The restore path should not re-resolve that stale envelope into the in-memory workflow cache.

Verification:

  • rtk ./gradlew :purchases:testDefaultsBc8DebugUnitTest --tests "com.revenuecat.purchases.common.workflows.WorkflowManagerTest.list onError does not restore a persisted envelope for a workflow no longer marked prefetch"
  • Fails with WorkflowManagerTest > list onError does not restore a persisted envelope for a workflow no longer marked prefetch FAILED at WorkflowManagerTest.kt:1280, where the test expects workflowsCache.cachedWorkflow("wf_1") to remain null.

vegaro and others added 10 commits June 5, 2026 08:06
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants