Skip to content

Commit 08ad0b9

Browse files
committed
Flag response tests that never reach albedo's reflected body
albedo's /reflect parses the request as a JSON reflection spec and returns only its body field, so a plain string or JSON without body leaves RESPONSE_BODY without the payload and a negative test passes vacuously. Seen on coreruleset/coreruleset#4833.
1 parent e90e479 commit 08ad0b9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎.coderabbit.yaml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,15 @@ reviews:
550550
different string than intended; percent-encode it and keep the
551551
readable form in `desc`.
552552
553+
Response test that never reaches the response — response-phase tests
554+
(RESPONSE-95x) POST to the albedo backend's `/reflect`, which parses
555+
the request body as a JSON reflection spec and returns only its `body`
556+
(or base64 `encodedBody`) field. A plain string gets `400 Invalid JSON
557+
in request body`; JSON without `body` returns an empty response. Either
558+
way RESPONSE_BODY never holds the payload, so a negative test passes
559+
without testing anything. Require `data: '{"body": "<payload>"}'`.
560+
albedo ignores the request `Content-Type`, so don't flag that.
561+
553562
Only positive tests — a new or widened pattern should come with at
554563
least one benign payload asserting it does NOT match, especially for
555564
short patterns or ones that could hit hashes, IDs, or file paths.

0 commit comments

Comments
 (0)