Skip to content

Remove legacy warn-mode policy feature

We need to remove the legacy warn-mode policy feature logic to prevent confusion between old experimental behavior and the new enforcement_type: warn feature.

We are using the same feature flag security_policy_approval_warn_mode to develop the new warn-mode policies with enforcement_type: warn, while the legacy experimental warn-mode detection is still present in the codebase. This legacy logic identifies policies as "warn-mode" when they have require 0 approvals and send a bot message.

However, this creates confusion because:

  1. The frontend now treats any policy with enforcement_type !== 'warn' as an enforced policy.
  2. Users could accidentally create policies with the legacy pattern that behave unexpectedly.
  3. The legacy feature was experimental and never enabled in production.