fix: Clear feature flag called cache on shutdown#194
Merged
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "fix: Clear feature flag called cache on ..." | Re-trigger Greptile |
marandaneto
commented
Jun 24, 2026
Contributor
|
Reviews (2): Last reviewed commit: "chore: release posthog-rails for shutdow..." | Re-trigger Greptile |
dustinbyrne
approved these changes
Jun 24, 2026
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.
💡 Motivation and Context
Feature flag call deduplication state currently remains in memory after
shutdown, which can leak stale called-cache state across a client shutdown/reuse lifecycle. This clears the cache during shutdown while holding the existing cache mutex.💚 How did you test it?
bundle exec rspec spec/posthog/client_spec.rbgit diff --check📝 Checklist
If releasing new changes
.changeset/quiet-cycles-shutdown.md)🤖 Agent context
Autonomy: Human-driven (agent-assisted)
An agent prepared this PR from the dedicated
fix/ff-called-cache-shutdownworktree at the user's direction. The change adds a guarded shutdown-time clear of the feature flag call dedupe cache, a regression spec for that behavior, and a patch changeset forposthog-ruby.Validation included the client spec file and whitespace checks. A local
pnpm changeset status --since=mainvalidation attempt failed because dependencies are not installed in this worktree (changesetexecutable missing), but the changeset file was added using the repository's Changesets format.