Feature Flags True by Deault
Bug description
I may have put this issue in the wrong repo: https://github.com/PostHog/posthog/issues/40507
Please describe.
How to reproduce
Related sub-libraries
- [ ] All of them
- [x] posthog-js (web)
- [ ] posthog-js-lite (web lite)
- [ ] posthog-node
- [ ] posthog-react-native
- [ ] @posthog/react
- [ ] @posthog/ai
- [ ] @posthog/nextjs-config
Additional context
Thank you for your bug report – we love squashing them!
@PostHog/team-feature-flags
Hm, this is interesting. @marc-wilson is this new behavior?
I wonder if there where some changes recently to isUndefined 🤔
https://github.com/PostHog/posthog-js/blob/main/packages/browser/src/posthog-featureflags.ts#L643
https://github.com/PostHog/posthog-js/blob/main/packages/browser/src/posthog-featureflags.ts#L643
TBH I never checked these scenarios, just kind of expected it. But, the posthog outage last week made it pretty clear flags default to true. i haven't been a customer long enough to notice if this is new behavior. I went through the same exercise and was poking around the source saw a few possible spots. but, ultimately i don't know what their api's return and where the coerce it so stopped looking too deep.
whatever the issue is, seems like this should have a pretty high priority since things are being exposed when things aren't intended to be. not sure if the posthog team actively watched the issues or not.
It can be a bit quiet here for feature-flag changes. I pushed a PR a few months back for a simple fix for flags in NextJS to avoid pop-in and it seems to have died in the stale-bot dustbowl. The team has a new open spot though!
https://posthog.com/teams/feature-flags
@mhornbacher did I never end up reviewing your PR? I'm sorry; feel free to tag me on it and I can open it up again.
Btw I replied to @marc-wilson on his duplicate issue, moving my reply here https://github.com/PostHog/posthog/issues/40507#issuecomment-3483677496
@dmarticus no and no worries at all :) Its a busy time of year as everyone gets ready for their holiday deliverables! I tagged you on it but please don't feel rushed.
Where I am working now I am pitching PostHog as part of a larger re-write of some really outdated systems and, well, we move quite slow...