Skip to content

fix(843): config-on-connect app_config no longer gated on LocalProxy#844

Merged
jonathaneoliver merged 1 commit into
devfrom
fix/843-drop-localproxy-guard
Jun 23, 2026
Merged

fix(843): config-on-connect app_config no longer gated on LocalProxy#844
jonathaneoliver merged 1 commit into
devfrom
fix/843-drop-localproxy-guard

Conversation

@jonathaneoliver

Copy link
Copy Markdown
Owner

Fixes #843.

applyServerAppConfig() early-returned when localProxy was false, so all #800 config-on-connect app_config (segment / protocol / live_offset / peak / muted from #838) was silently dropped on every LocalProxy-OFF run — which is the characterization default.

Root cause

The guard gated on the wrong flag. localProxy (is.flag.local_proxy) toggles the on-device LocalHTTPProxy (iOS 127.0.0.1 rewrite) / the media port (Android) — it does not control whether the session's app_config exists or is readable. The lookup reads /api/sessions off the API port (iOS metricsBaseURLplaybackURL, Android activeServer.apiUrl), reachable regardless. The fetch is already best-effort (null on miss), so removing the guard is a no-op for normal user plays.

Change

Verification (2-sim Device Farm fleet, LocalProxy OFF)

Clean before/after, controlled on the fix only:

overlay log [localproxy] NET logs meaning
before (pre-fix, OFF) absent absent guard blocked the read-back
after (post-fix, OFF) present (muted=true / muted=false per arm) absent read-back applies without the on-device proxy

[localproxy] NET logs absent in both confirms LocalProxy was genuinely OFF (positive control). Both fleet subtests PASS. Server /api/sessions stored app_config.muted in both (it always did — localProxy-independent).

iOS ** BUILD SUCCEEDED **; Android compileDebugKotlin clean.

🤖 Generated with Claude Code

… Android)

`applyServerAppConfig()` early-returned when `localProxy` was false, silently
dropping all #800 config-on-connect app_config (segment/protocol/live_offset/
peak/muted #838) on every LocalProxy-OFF run — the characterization default.

The guard was gating on the wrong flag. `localProxy` (`is.flag.local_proxy`)
toggles the on-device LocalHTTPProxy (iOS 127.0.0.1 rewrite) / the media port
(Android); it does NOT control whether the session's app_config exists or is
readable. The lookup reads `/api/sessions` off the API port (iOS
`metricsBaseURL`→playbackURL, Android `activeServer.apiUrl`), reachable
regardless. The fetch is already best-effort (null on miss), so removing the
guard is a no-op for normal user plays.

- iOS: drop `guard localProxy else { return }` (PlayerViewModel.swift).
- Android: drop `if (!_state.value.localProxy) return` (PlayerViewModel.kt).
- Update the #838 mute matrix specs — `CHAR_LOCAL_PROXY=true` is no longer needed.

Verified on a 2-sim Device Farm fleet with LocalProxy OFF (CHAR_LOCAL_PROXY unset):
  before fix: overlay log ABSENT (guard blocked), [localproxy] NET logs absent
  after  fix: overlay log PRESENT (muted=true / muted=false per arm), [localproxy]
              NET logs still absent (LocalProxy genuinely off) — i.e. the read-back
              now applies without the on-device proxy. Both fleet subtests PASS.

Fixes #843.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonathaneoliver jonathaneoliver merged commit b9fab10 into dev Jun 23, 2026
1 check passed
@github-actions github-actions Bot added the bug Something isn't working label Jun 23, 2026
@jonathaneoliver jonathaneoliver deleted the fix/843-drop-localproxy-guard branch June 23, 2026 20:01
jonathaneoliver added a commit that referenced this pull request Jun 23, 2026
…845)

Follow-up to #844. The config-on-connect comment in
`experimentPlayerPatch` still claimed `app_config.muted` "needs
LocalProxy ON — run with `CHAR_LOCAL_PROXY=true`". The guard was removed
in #843/#844, so that's no longer true. Comment-only, no behavior
change.

Relates to #843.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant