: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(signals): treat slack is_inactive as a stale scout message (#122957)
posthog[bot]edd8930eff6a
diff --git a/products/signals/backend/scout_harness/slack_delivery.py b/products/signals/backend/scout_harness/slack_delivery.pyindex 9025a6184759..ed8b2b46c3f9 100644--- a/products/signals/backend/scout_harness/slack_delivery.py+++ b/products/signals/backend/scout_harness/slack_delivery.py@@ -78,7 +78,7 @@ _BLOCK_REJECTION_ERROR_CODES = frozenset({"invalid_blocks", "invalid_blocks_form# chat.update answers with one of these when the earlier message is gone or can no longer change.# The delivery then posts a new message, as it did before the first post._STALE_MESSAGE_ERROR_CODES = frozenset(- {"message_not_found", "cant_update_message", "edit_window_closed", "channel_not_found"}+ {"message_not_found", "cant_update_message", "edit_window_closed", "channel_not_found", "is_inactive"})# Slack does not say how far over its markdown budget a rejected message went, so the resend keeps# half of the budget.diff --git a/products/signals/backend/test/test_scout_slack_delivery.py b/products/signals/backend/test/test_scout_slack_delivery.pyindex a2eff8608014..59d9275d0fc1 100644--- a/products/signals/backend/test/test_scout_slack_delivery.py+++ b/products/signals/backend/test/test_scout_slack_delivery.py@@ -330,6 +330,8 @@ class TestScoutSlackDelivery(BaseTest):("inbox_row_in_channel", "CSCOUTS|#scout-findings", "CSCOUTS", True, None, False),# The first message was deleted in Slack, so the report posts again.("message_deleted", "CSCOUTS|#scout-findings", "CSCOUTS", False, "message_not_found", False),+ # Slack cannot edit a message in an archived or inactive channel, so the report posts again.+ ("channel_inactive", "CSCOUTS|#scout-findings", "CSCOUTS", False, "is_inactive", False),])def test_redelivered_report_updates_its_message_in_place(