:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix: coordinator flag (#66950)
Alex V848d3ff63891
diff --git a/products/conversations/backend/temporal/coordinator.py b/products/conversations/backend/temporal/coordinator.pyindex a9e385529e7b..21f88309dbdf 100644--- a/products/conversations/backend/temporal/coordinator.py+++ b/products/conversations/backend/temporal/coordinator.py@@ -81,19 +81,28 @@ class CollectEligibleTicketsOutput:def _is_master_flag_enabled(team: Team) -> bool:- return bool(- posthoganalytics.feature_enabled(- MASTER_FLAG,- str(team.uuid),- groups={"organization": str(team.organization_id), "project": str(team.id)},- group_properties={- "organization": {"id": str(team.organization_id)},- "project": {"id": str(team.id)},- },- only_evaluate_locally=False,- send_feature_flag_events=False,+ # The flag is targeted by project group; release conditions can match on the project's `uuid`,+ # so it must be in group_properties — the headless worker only sends what's listed here (unlike+ # posthog-js, which auto-attaches full group properties). Without it a uuid filter never matches.+ try:+ return bool(+ posthoganalytics.feature_enabled(+ MASTER_FLAG,+ str(team.uuid),+ groups={"organization": str(team.organization_id), "project": str(team.id)},+ group_properties={+ "organization": {"id": str(team.organization_id)},+ "project": {"id": str(team.id), "uuid": str(team.uuid)},+ },+ only_evaluate_locally=False,+ send_feature_flag_events=False,+ ))- )+ except Exception:+ # A flag-service blip must skip the ticket, not throw inside the scan loop and fail the+ # whole coordinator tick. Fail closed: treat as disabled.+ logger.warning("support_reply coordinator: master flag eval failed", team_id=team.id, exc_info=True)+ return Falsedef _collect_eligible(lookback_minutes: int = TICKET_LOOKBACK_MINUTES) -> list[EligibleTicket]:diff --git a/products/conversations/backend/temporal/tests/test_coordinator.py b/products/conversations/backend/temporal/tests/test_coordinator.pyindex 27c380af9435..7ae05edffa94 100644--- a/products/conversations/backend/temporal/tests/test_coordinator.py+++ b/products/conversations/backend/temporal/tests/test_coordinator.py@@ -88,7 +88,7 @@ class TestMasterFlagEnabled:},group_properties={"organization": {"id": str(TEST_ORG_UUID)},- "project": {"id": "2"},+ "project": {"id": "2", "uuid": str(TEST_TEAM_UUID)},},only_evaluate_locally=False,send_feature_flag_events=False,