Skip to content

Commit 80db7c4

Browse files
committed
fix(config): add default catch-all decision to enable PII detection for all requests
This fixes the E2E PII detection test failures (0% detection rate) by ensuring PII detection is always enabled, even when no specific decision matches. Previously, requests with model='MoM' (used by E2E tests) did not match any decision criteria, causing decisionName to be empty. This triggered the check: if decisionName == '' { return false } // PII detection disabled The fix adds a catch-all default_decision with: - priority: 1 (lowest - matches only if nothing else does) - type: 'always' (matches any request) - pii_types_allowed: [] (blocks ALL PII for safety) This ensures the 100 E2E PII test cases will be blocked correctly. Fixes #647 E2E test failures Signed-off-by: Yossi Ovadia <[email protected]>
1 parent e507895 commit 80db7c4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

config/testing/config.e2e.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,24 @@ decisions:
359359
enabled: true
360360
pii_types_allowed: ["EMAIL_ADDRESS", "PERSON", "GPE", "PHONE_NUMBER", "US_SSN", "CREDIT_CARD"]
361361

362+
# Default catch-all decision for unmatched requests (E2E PII test fix)
363+
# This ensures PII detection is always enabled, even when no specific decision matches
364+
- name: "default_decision"
365+
description: "Default catch-all decision - blocks all PII for safety"
366+
priority: 1 # Lowest priority - only matches if nothing else does
367+
rules:
368+
operator: "OR"
369+
conditions:
370+
- type: "always" # Always matches as fallback
371+
modelRefs:
372+
- model: "Model-B"
373+
use_reasoning: false
374+
plugins:
375+
- type: "pii"
376+
configuration:
377+
enabled: true
378+
pii_types_allowed: [] # Block ALL PII - empty list means nothing allowed
379+
362380
default_model: "Model-A"
363381

364382
# API Configuration

0 commit comments

Comments
 (0)