Skip to content

chore!: remove the deprecated remoteConfig option - #874

Merged
turnipdabeets merged 1 commit into
chore/v4-remove-deprecatedfrom
chore/v4-remove-remote-config
Oct 27, 2026
Merged

turnipdabeets merged 1 commit into
chore/v4-remove-deprecatedfrom
chore/v4-remove-remote-config

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

Note

Stacked on the 4.0 integration PR #871. Merges into chore/v4-remove-deprecated, not main.

💡 Motivation and Context

Removes the deprecated PostHogConfig.remoteConfig option. Setup now always loads /config.

The option was deprecated in #421 with the message "This option is a no-op", but it wasn't one. With remoteConfig = false, setup skipped /config and only called /flags (or nothing, if preloadFeatureFlags was also false). Since #421, /flags no longer returns config, so that mode leaves replay, surveys, error tracking and the other remote settings unloaded.

Behavior change: apps that set remoteConfig = false will start sending a /config request at setup. /flags still follows hasFeatureFlags and preloadFeatureFlags as before.

Other changes:

  • PostHogReplayIntegration.shouldAwaitFirstRemoteConfig() drops the branch for "neither /config nor /flags will be fetched", which can no longer happen.
  • posthog-server keeps its own deprecated remoteConfig field; it just no longer forwards it to core.

sdk-specs: remote-config describes loading /config during initialization and doesn't define an option to skip it, so this brings Android in line.

💚 How did you test it?

  • ./gradlew :posthog:test :posthog-server:test :posthog-server-openfeature:test :posthog-android:testReleaseUnitTest :posthog-android-surveys-compose:testReleaseUnitTest and apiCheck pass.
  • Most tests set remoteConfig = false to keep setup on the single /flags request. They now skip setup's flag loading through the test-only reloadFeatureFlags flag, or answer /config before /flags.
  • Tests that used the default host now point at 127.0.0.1:1, so the new /config request can't reach the real API.
  • Removed two tests for paths that no longer exist: preload feature flags if enabled (the /flags-only setup) and the replay gate does not arm when neither remoteConfig nor preloadFeatureFlags will fetch.
  • The Android event snapshots are unchanged; the fixture now answers and expects the /config request.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file (adds a line to .changeset/android-v4-major.md)

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Claude Code (Claude Opus 5.5) found that remoteConfig still switched setup between /config and /flags, so it was split out of #871 into this PR. In the tests, a test-only switch that kept the old /flags-only path was rejected because production would never run it; tests either skip setup's loading or answer /config first.

🤖 Generated with Claude Code

@turnipdabeets
turnipdabeets force-pushed the chore/v4-remove-remote-config branch from 87af3ed to 902ea65 Compare October 23, 2026 15:47
@turnipdabeets
turnipdabeets force-pushed the chore/v4-remove-deprecated branch 2 times, most recently from 2f486a0 to a41d9b9 Compare October 26, 2026 16:29
@turnipdabeets
turnipdabeets force-pushed the chore/v4-remove-remote-config branch from 902ea65 to 63c682c Compare October 26, 2026 16:29
@turnipdabeets
turnipdabeets force-pushed the chore/v4-remove-deprecated branch from a41d9b9 to caf64bd Compare October 26, 2026 18:47
@turnipdabeets
turnipdabeets force-pushed the chore/v4-remove-remote-config branch 2 times, most recently from aef5c67 to 775008e Compare October 27, 2026 15:48
Setup now always loads /config. With remoteConfig = false, setup used to skip
/config, which left remote settings unloaded since /flags stopped returning
config.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets
turnipdabeets force-pushed the chore/v4-remove-remote-config branch from 775008e to 033913e Compare October 27, 2026 16:14
@turnipdabeets
turnipdabeets merged commit ead5a23 into chore/v4-remove-deprecated Oct 27, 2026
11 checks passed
@turnipdabeets
turnipdabeets deleted the chore/v4-remove-remote-config branch October 27, 2026 16:25
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.

2 participants