Skip to content

fix(flags): defer an index-less group filter in a person condition - #413

Merged
marandaneto merged 3 commits into
mainfrom
fix/flags-indexless-group-filter-person-condition
Dec 2, 2026
Merged

marandaneto merged 3 commits into
mainfrom
fix/flags-indexless-group-filter-person-condition

Conversation

@marandaneto

@marandaneto marandaneto commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

💡 Motivation and Context

Follows PostHog/sdk-specs#265. In a person-aggregated condition, a type: "group" property filter without group_type_index has no group type to read. The flags service matches it against no properties: PropertyFilter::group_filter_index returns None, and PropertyContext::resolve_for_filter returns an empty map. This SDK matched the filter against person properties instead. When the caller supplied a person property with the same key, the SDK returned a local result that /flags contradicts. For example, person property tier set to enterprise made exact "enterprise" match locally, while the flags service returns no match.

The filter is now inconclusive with the unsupported_definition reason, also when its key is listed as known absent. The flag falls back to /flags, or stays unresolved in local-only mode. This is how posthog-php handles it since PostHog/posthog-php#328.

EvaluateConditionMatch checks the filter before it resolves the filter context or known-absent keys.

A group filter without an index in a group-aggregated condition still reads the condition's group type. The definition check behind the load-time warning and reason precedence also reports the filter as unsupported_definition in a person-aggregated condition, so the reason does not depend on condition order. posthog-php doesn't check this at load time yet.

💚 How did you test it?

Added unit tests that go through the public EvaluateFlagsAsync. They cover a person flag with the condition aggregation omitted and a group flag whose condition sets it to null, exact and is_not_set, and the key either set as both a person and a group property or listed known absent for both. Local-only mode leaves the flag unresolved, and otherwise it falls back to /flags with one request. Group conditions still read their own group. Precedence cases cover the filter alongside a dependency on a static-cohort flag in either condition order, and the definition reason is checked for person and group conditions. Locally, all 2,248 unit tests pass on net10.0, and the net8.0 build and dotnet format are clean.

The new person-condition tests fail without the fix.

📝 Checklist

  • All commits are signed
  • 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

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Pi (Claude). The spec defers to /flags instead of copying the flags service's empty-map result, because that result comes from the missing index, not a chosen rule, and the PostHog app always sets group_type_index. I checked the flags service behavior against rust/feature-flags in PostHog/posthog.

A group property filter without group_type_index in a person-aggregated condition is now inconclusive with unsupported_definition, also when its key is listed as known absent, so the flag falls back to /flags. It was matched against person properties, which could contradict the flags service. Follows PostHog/sdk-specs#265.
@marandaneto marandaneto self-assigned this Nov 30, 2026
@marandaneto
marandaneto marked this pull request as ready for review November 30, 2026 13:36
@marandaneto
marandaneto requested a review from a team as a code owner November 30, 2026 13:36
@veria-ai

veria-ai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

posthog-dotnet Compliance Report

Date: 2026-12-02T09:45:14.905824+00:00
Duration: 125591ms

✅ All Tests Passed!

47/47 tests passed


Capture Tests

✅ 30/30 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 265ms
Format Validation.Event Has Uuid ✅ 128ms
Format Validation.Event Has Lib Properties ✅ 113ms
Format Validation.Distinct Id Is String ✅ 115ms
Format Validation.Token Is Present ✅ 110ms
Format Validation.Custom Properties Preserved ✅ 120ms
Format Validation.Event Has Timestamp ✅ 111ms
Format Validation.Non Utc Event Timestamp Is Converted To Utc ✅ 122ms
Retry Behavior.Retries On 503 ✅ 8124ms
Retry Behavior.Does Not Retry On 400 ✅ 2117ms
Retry Behavior.Does Not Retry On 401 ✅ 2115ms
Retry Behavior.Respects Retry After Header ✅ 8120ms
Retry Behavior.Implements Backoff ✅ 22134ms
Retry Behavior.Retries On 500 ✅ 6118ms
Retry Behavior.Retries On 502 ✅ 6114ms
Retry Behavior.Retries On 504 ✅ 6118ms
Retry Behavior.Max Retries Respected ✅ 22135ms
Deduplication.Generates Unique Uuids ✅ 118ms
Deduplication.Preserves Uuid On Retry ✅ 6116ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 13127ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 6122ms
Deduplication.No Duplicate Events In Batch ✅ 115ms
Deduplication.Different Events Have Different Uuids ✅ 111ms
Compression.Sends Gzip When Enabled ✅ 111ms
Batch Format.Uses Proper Batch Structure ✅ 109ms
Batch Format.Flush With No Events Sends Nothing ✅ 109ms
Batch Format.Multiple Events Batched Together ✅ 117ms
Error Handling.Does Not Retry On 403 ✅ 2112ms
Error Handling.Does Not Retry On 413 ✅ 2112ms
Error Handling.Retries On 408 ✅ 6119ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 149ms
Request Payload.Flags Request Uses V2 Query Param ✅ 110ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 110ms
Request Payload.Flags Request Omits Authorization Header ✅ 112ms
Request Payload.Token In Flags Body Matches Init ✅ 112ms
Request Payload.Groups Round Trip ✅ 114ms
Request Payload.Groups Default To Empty Object ✅ 110ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 111ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 110ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 110ms
Request Lifecycle.No Flags Request On Init Alone ✅ 4ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 109ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 214ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 122ms
Retry Behavior.Retries Flags On 502 ✅ 1116ms
Retry Behavior.Retries Flags On 504 ✅ 1115ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 212ms

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

SDK performance: posthog-dotnet

Benchmarks completed. No changes flagged for review.

Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate.

View all results
Test Measurement Before PR With PR Change Assessment
Capture and deliver events (32-byte payload, burst) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Capture and deliver events (4,096-byte payload, burst) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Capture and deliver events (32-byte payload, steady) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Capture and deliver events (4,096-byte payload, steady) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Queue an event (32-byte payload) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Queue an event (4,096-byte payload) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate all 10 flags Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate all 100 flags Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate all 1,000 flags Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate one boolean flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a cohort-filtered flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a flag (early match) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a flag (late match) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a flag (no match) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a property-filtered flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a regex-filtered flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a rollout flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a multivariate flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Capture and deliver events (32-byte payload, burst) Allocated memory per operation 5.37 KiB/op 5.37 KiB/op <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, burst) Time per operation 4.56 µs/op 4.51 µs/op 1.1% less time Not flagged
Capture and deliver events (32-byte payload, burst) idle_managed_heap_bytes (estimated) 822.35 KiB 822.35 KiB No observed change Not flagged
Capture and deliver events (32-byte payload, burst) Idle process memory (RSS) 55.01 MiB 55.01 MiB <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, burst) Observed peak process memory (RSS) 57.59 MiB 57.61 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, burst) Managed heap after settling (estimated) 2.24 MiB 2.24 MiB No observed change Not flagged
Capture and deliver events (32-byte payload, burst) Process memory after settling (RSS) 57.68 MiB 57.7 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, burst) Process CPU time per operation 4.59 µs/op 4.53 µs/op 1.3% less time Not flagged
Capture and deliver events (32-byte payload, burst) Lifetime peak process memory (RSS) 57.68 MiB 57.7 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Allocated memory per operation 39.87 KiB/op 39.87 KiB/op <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Time per operation 16.58 µs/op 16.3 µs/op 1.7% less time Not flagged
Capture and deliver events (4,096-byte payload, burst) idle_managed_heap_bytes (estimated) 2.13 MiB 2.13 MiB No observed change Not flagged
Capture and deliver events (4,096-byte payload, burst) Idle process memory (RSS) 56.87 MiB 56.91 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Observed peak process memory (RSS) 82.01 MiB 82.03 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Managed heap after settling (estimated) 25.63 MiB 25.63 MiB No observed change Not flagged
Capture and deliver events (4,096-byte payload, burst) Process memory after settling (RSS) 82.18 MiB 82.2 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Process CPU time per operation 18.17 µs/op 17.97 µs/op 1.1% less time Not flagged
Capture and deliver events (4,096-byte payload, burst) Lifetime peak process memory (RSS) 82.18 MiB 82.2 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Allocated memory per operation 18.15 KiB/op 18.15 KiB/op <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Time per operation 8.04 µs/op 8.09 µs/op 0.7% more time Not flagged
Capture and deliver events (32-byte payload, steady) idle_managed_heap_bytes (estimated) 822.36 KiB 822.36 KiB No observed change Not flagged
Capture and deliver events (32-byte payload, steady) Idle process memory (RSS) 55.02 MiB 55.06 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Observed peak process memory (RSS) 55.58 MiB 55.64 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Managed heap after settling (estimated) 938.16 KiB 938.16 KiB No observed change Not flagged
Capture and deliver events (32-byte payload, steady) Process memory after settling (RSS) 55.57 MiB 55.62 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Process CPU time per operation 8.17 µs/op 8.23 µs/op 0.7% more time Not flagged
Capture and deliver events (32-byte payload, steady) Lifetime peak process memory (RSS) 55.57 MiB 55.62 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Allocated memory per operation 30.96 KiB/op 30.96 KiB/op <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Time per operation 13.49 µs/op 13.21 µs/op 2.1% less time Not flagged
Capture and deliver events (4,096-byte payload, steady) idle_managed_heap_bytes (estimated) 2.13 MiB 2.13 MiB No observed change Not flagged
Capture and deliver events (4,096-byte payload, steady) Idle process memory (RSS) 56.82 MiB 56.93 MiB 0.2% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Observed peak process memory (RSS) 64.03 MiB 64.06 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Managed heap after settling (estimated) 3.12 MiB 3.12 MiB No observed change Not flagged
Capture and deliver events (4,096-byte payload, steady) Process memory after settling (RSS) 60.56 MiB 60.63 MiB 0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Process CPU time per operation 15.93 µs/op 15.75 µs/op 1.1% less time Not flagged
Capture and deliver events (4,096-byte payload, steady) Lifetime peak process memory (RSS) 63.82 MiB 63.85 MiB <0.1% more memory Not flagged
Queue an event (32-byte payload) Allocated memory per operation 1.67 KiB/op 1.67 KiB/op No observed change Not flagged
Queue an event (32-byte payload) Time per operation 1.35 µs/op 1.35 µs/op 0.6% more time Not flagged
Queue an event (32-byte payload) Process CPU time per operation 1.36 µs/op 1.36 µs/op 0.6% more time Not flagged
Queue an event (4,096-byte payload) Allocated memory per operation 1.67 KiB/op 1.67 KiB/op No observed change Not flagged
Queue an event (4,096-byte payload) Time per operation 1.29 µs/op 1.28 µs/op 0.2% less time Not flagged
Queue an event (4,096-byte payload) Process CPU time per operation 1.3 µs/op 1.29 µs/op 0.2% less time Not flagged
Evaluate all 10 flags Allocated memory per operation 23.91 KiB/op 23.91 KiB/op No observed change Not flagged
Evaluate all 10 flags Time per operation 28.1 µs/op 28.44 µs/op 1.2% more time Not flagged
Evaluate all 10 flags Process CPU time per operation 28.11 µs/op 28.45 µs/op 1.2% more time Not flagged
Evaluate all 100 flags Allocated memory per operation 237.31 KiB/op 237.31 KiB/op No observed change Not flagged
Evaluate all 100 flags Time per operation 257.39 µs/op 257.02 µs/op 0.1% less time Not flagged
Evaluate all 100 flags Process CPU time per operation 257.38 µs/op 257.12 µs/op 0.1% less time Not flagged
Evaluate all 1,000 flags Allocated memory per operation 2.32 MiB/op 2.32 MiB/op No observed change Not flagged
Evaluate all 1,000 flags Time per operation 2.21 ms/op 2.2 ms/op 0.4% less time Not flagged
Evaluate all 1,000 flags Process CPU time per operation 2.21 ms/op 2.2 ms/op 0.4% less time Not flagged
Evaluate 1,000 flags under concurrent load idle_managed_heap_bytes (estimated) 4.71 MiB 4.71 MiB <0.1% less memory Not flagged
Evaluate 1,000 flags under concurrent load Idle process memory (RSS) 108.08 MiB 110.13 MiB 1.9% more memory Not flagged
Evaluate 1,000 flags under concurrent load Observed peak process memory (RSS) 113.79 MiB 113.72 MiB <0.1% less memory Not flagged
Evaluate 1,000 flags under concurrent load Managed heap after settling (estimated) 4.75 MiB 4.75 MiB <0.1% less memory Not flagged
Evaluate 1,000 flags under concurrent load Process memory after settling (RSS) 113.85 MiB 113.78 MiB <0.1% less memory Not flagged
Evaluate 1,000 flags under concurrent load Lifetime peak process memory (RSS) 113.85 MiB 113.78 MiB <0.1% less memory Not flagged
Refresh 1,000 flag definitions idle_managed_heap_bytes (estimated) 19.5 MiB 19.5 MiB <0.1% more memory Not flagged
Refresh 1,000 flag definitions Idle process memory (RSS) 136.47 MiB 136.5 MiB <0.1% more memory Not flagged
Refresh 1,000 flag definitions Observed peak process memory (RSS) 148.84 MiB 148.68 MiB 0.1% less memory Not flagged
Refresh 1,000 flag definitions Managed heap after settling (estimated) 20.49 MiB 20.49 MiB <0.1% more memory Not flagged
Refresh 1,000 flag definitions Process memory after settling (RSS) 147.61 MiB 147.64 MiB <0.1% more memory Not flagged
Refresh 1,000 flag definitions Lifetime peak process memory (RSS) 148.19 MiB 148.05 MiB <0.1% less memory Not flagged
Evaluate one boolean flag Allocated memory per operation 1.1 KiB/op 1.1 KiB/op No observed change Not flagged
Evaluate one boolean flag Time per operation 1.58 µs/op 1.58 µs/op 0.5% less time Not flagged
Evaluate one boolean flag Process CPU time per operation 1.58 µs/op 1.58 µs/op 0.5% less time Not flagged
Evaluate a cohort-filtered flag Allocated memory per operation 1.35 KiB/op 1.35 KiB/op No observed change Not flagged
Evaluate a cohort-filtered flag Time per operation 1.6 µs/op 1.62 µs/op 1.1% more time Not flagged
Evaluate a cohort-filtered flag Process CPU time per operation 1.6 µs/op 1.62 µs/op 1.2% more time Not flagged
Evaluate a flag (early match) Allocated memory per operation 2.95 KiB/op 2.95 KiB/op No observed change Not flagged
Evaluate a flag (early match) Time per operation 3.03 µs/op 3.05 µs/op 0.6% more time Not flagged
Evaluate a flag (early match) Process CPU time per operation 3.03 µs/op 3.05 µs/op 0.6% more time Not flagged
Evaluate a flag (late match) Allocated memory per operation 4.57 KiB/op 4.57 KiB/op No observed change Not flagged
Evaluate a flag (late match) Time per operation 4.12 µs/op 4.1 µs/op 0.5% less time Not flagged
Evaluate a flag (late match) Process CPU time per operation 4.12 µs/op 4.1 µs/op 0.5% less time Not flagged
Evaluate a flag (no match) Allocated memory per operation 4.34 KiB/op 4.34 KiB/op No observed change Not flagged
Evaluate a flag (no match) Time per operation 3.6 µs/op 3.58 µs/op 0.6% less time Not flagged
Evaluate a flag (no match) Process CPU time per operation 3.6 µs/op 3.58 µs/op 0.6% less time Not flagged
Evaluate a property-filtered flag Allocated memory per operation 1.32 KiB/op 1.32 KiB/op No observed change Not flagged
Evaluate a property-filtered flag Time per operation 1.5 µs/op 1.49 µs/op 0.9% less time Not flagged
Evaluate a property-filtered flag Process CPU time per operation 1.51 µs/op 1.49 µs/op 0.9% less time Not flagged
Evaluate a regex-filtered flag Allocated memory per operation 5.75 KiB/op 5.75 KiB/op No observed change Not flagged
Evaluate a regex-filtered flag Time per operation 6.34 µs/op 6.32 µs/op 0.2% less time Not flagged
Evaluate a regex-filtered flag Process CPU time per operation 6.35 µs/op 6.34 µs/op <0.1% less time Not flagged
Evaluate a rollout flag Allocated memory per operation 1.2 KiB/op 1.2 KiB/op No observed change Not flagged
Evaluate a rollout flag Time per operation 1.98 µs/op 2.01 µs/op 1.5% more time Not flagged
Evaluate a rollout flag Process CPU time per operation 1.98 µs/op 2.01 µs/op 1.5% more time Not flagged
Evaluate a multivariate flag Allocated memory per operation 1.24 KiB/op 1.24 KiB/op No observed change Not flagged
Evaluate a multivariate flag Time per operation 1.73 µs/op 1.72 µs/op 0.5% less time Not flagged
Evaluate a multivariate flag Process CPU time per operation 1.73 µs/op 1.72 µs/op 0.5% less time Not flagged

Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals.

Compared 46c1ac59ddf1497a4bd34abc9a20d20f7f3e1ac1 → dd4072d49a0876f340035c39426d59cd76bd76ba.

Full report and diagnostics

108 metric rows; 108 rows shown in all results. Omitted or shortened data remain in comparison.json, including per-runner environments, resource limits, measurement methods, samples and checkpoints.

@dustinbyrne dustinbyrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core evaluation fix in EvaluateConditionMatch accurately aligns local evaluation and remote fallback with PostHog/sdk-specs#265 and rust/feature-flags, and the unit tests and PostHog / PostHog.AspNetCore changesets are clean.

One concern inline: leaving GetDefinitionUnresolvedReason without the corresponding per-condition check introduces condition-order-dependent UnresolvedFlagReason precedence when paired with a RequiresServerEvaluationException dependency (evaluate-flags SHALL) and skips the load-time unsupported_definition warning.

Out-of-scope follow-up: PostHog/posthog-php (lib/FeatureFlag.php:1866,2470-2482) has the same omission in conditionsDefinitionReason and is worth aligning separately.

AI-assisted review.

Comment thread src/PostHog/Features/LocalEvaluator.cs Resolved
@dustinbyrne
dustinbyrne requested a review from a team November 30, 2026 19:55

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Contained evaluation fix with regression coverage and no outstanding substantive concerns. The current code addresses @dustinbyrne’s older concern by applying the condition-aware definition check used for unresolved-reason precedence.

  • Author wrote 50% of the modified lines and has 39 merged PRs in these paths (familiarity MODERATE).
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
every_file_attested ✓ not a bot PR
size ✓ 23L, 1F substantive, 191L/5F incl. size-exempt files — within ceiling
tier ✓ T1-agent / T1d-complex (191L, 5F, cross-cutting, fix)
stamphog 2.11.0 .stamphog/policy.yml @ dd4072d · reviewed head dd4072d

@marandaneto
marandaneto merged commit 2e2df81 into main Dec 2, 2026
24 checks passed
@marandaneto
marandaneto deleted the fix/flags-indexless-group-filter-person-condition branch December 2, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Ask Stamphog to review this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants