Skip to content

Preserve wrapped adapter import semantics through caches - #1049

Merged
jnunemaker merged 1 commit into
mainfrom
codex/cache-import-transparency
Aug 26, 2026
Merged

jnunemaker merged 1 commit into
mainfrom
codex/cache-import-transparency

Conversation

@jnunemaker

Copy link
Copy Markdown
Collaborator

Summary

  • delegate cache-wrapper imports to the wrapped adapter so custom import behavior remains intact
  • after a successful wrapped import, invalidate per-feature entries for the union of features before and after import, plus the feature-list and get-all entries
  • preserve exceptions and false results without cache invalidation

The wrapped adapter import completes before cache invalidation begins; the cache is not part of the wrapped adapter's transaction. Ordinary cache-backed writes are unchanged. Instrumented#import already follows the same delegation contract and needs no change.

Tests

  • bundle exec rspec -r active_support spec/flipper/adapters/active_support_cache_store_spec.rb (99 examples, 0 failures)
  • bundle exec rspec spec/flipper/adapters/instrumented_spec.rb (45 examples, 0 failures)
  • bundle exec rspec spec/flipper/adapters/redis_cache_spec.rb (83 examples, 0 failures)
  • bundle exec ruby -Itest test/adapters/redis_cache_test.rb (34 runs, 925 assertions, 0 failures)
  • bundle exec ruby -Itest test/adapters/dalli_test.rb (34 runs, 925 assertions, 0 failures)
  • bundle exec rake test (310 runs, 8,336 assertions, 0 failures)
  • bundle exec rspec -r active_support --exclude-pattern spec/flipper/cli_spec.rb (3,074 examples, 0 failures; 162 pending service-specific ActiveRecord examples)

The unfiltered RSpec run reached 3,102 examples with only two unrelated existing CLI ANSI-color expectation failures in this local non-color environment.

@jnunemaker
jnunemaker merged commit 8da950b into main Aug 26, 2026
48 checks passed
@jnunemaker
jnunemaker deleted the codex/cache-import-transparency branch August 26, 2026 13:50
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