From 9a227f8125471d5b7fc4be239bf6579642bb1c55 Mon Sep 17 00:00:00 2001 From: Dave Vandyke Date: Fri, 19 Dec 2025 16:16:08 +0000 Subject: [PATCH] Add Request Blocklist case for a valid rule with missing reason In the future, we might strip the "reason" field if the configuration becomes too large, we should ensure implementations will still consider rules as valid if we do. --- request-blocklist/config-reference.json | 4 ++++ request-blocklist/tests.json | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/request-blocklist/config-reference.json b/request-blocklist/config-reference.json index 65d8264..b8030da 100644 --- a/request-blocklist/config-reference.json +++ b/request-blocklist/config-reference.json @@ -50,6 +50,10 @@ "rule": "request-blocklist.example/missing-prop", "reason": "Example rule incorrectly missing domains property" }, + { + "rule": "request-blocklist.example/missing-reason", + "domains": [""] + }, { "rule": "request-blocklist.example/extra-prop", "domains": [""], diff --git a/request-blocklist/tests.json b/request-blocklist/tests.json index 93f1f0e..f11e9ca 100644 --- a/request-blocklist/tests.json +++ b/request-blocklist/tests.json @@ -293,6 +293,14 @@ "expectAction": "allow", "exceptPlatforms": [] }, + { + "name": "correct rule that only misses reason property", + "requestUrl": "https://request-blocklist.example/missing-reason", + "requestType": "image", + "websiteUrl": "https://website.example", + "expectAction": "block", + "exceptPlatforms": [] + }, { "name": "incorrect rule that has extra property", "requestUrl": "https://request-blocklist.example/extra-prop",