Repository navigation
fix(desktop): keep false-like process_person_profile out of $set dedup - #716
Merged
turnipdabeets merged 2 commits intoNov 9, 2026
Merged
Conversation
Capture reads 'no', 'false', 'off', 0 and 0.0 as false, so a $set sent with one of them is personless. The desktop core only recognised boolean false, cached that event's hash, and dropped the next identical setPersonProperties as a duplicate, losing the profile update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
PostHog Review · Standard · reviewed b1f248c: 1 Should fix.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
Contributor
posthog-flutter Compliance ReportDate: 2026-11-09T21:18:03.825990+00:00 ✅ All Tests Passed!232/232 tests passed Capture_V1 Tests✅ 105/105 tests passed View Details
Capture_Ai_V1 Tests✅ 110/110 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
…sing Capture reads strings and numbers such as 'yes' or 'no' either way, so a $set sent with one leaves the profile's state unknown. Keeping the old hash dropped a later revert to that value; clear it instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dustinbyrne
approved these changes
Nov 9, 2026
6 of 17 tasks
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
Follow-up to this review comment on #637.
On Windows and Linux, the desktop core remembers the last
$setit sent so it can drop identical repeats. It doesn't record a personless$set, but it only recognized booleanfalseas personless. Capture also reads'no','false','off',0and0.0as false. AsetPersonProperties(..., options: {'process_person_profile': 'no'})call was therefore cached as the last profile update. The next identical setter without the option was then dropped as a duplicate, and the profile update was lost._isPersonlessnow treats any value other thannullortrueas possibly personless. This only affects dedup. Option values are still sent as given, as sdk-specs#146 requires. If a value is odd, like'yes', the worst case is one extra$set, never a lost one.The bug never shipped: options on
setPersonPropertiesare new in 6.0, so no changeset.💚 How did you test it?
posthog_flutter_desktop_test.dartoverfalse,'no','false','off',0and0.0. It runs through the real desktop queue against the local capture server. A third identical setter in each case checks that normal dedup still drops repeats.falsepasses, which matches the review. With the fix, all six pass.flutter test: 1572 passed.📝 Checklist
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
trueas personless instead of copying capture's exact list of false values, so the SDK doesn't drift if capture's parser changes.🤖 Generated with Claude Code