AC-019 Conformance caught CS-RUN-003

A redirect that never ends

Broken bodies and broken connections

How to run this card's commands yourself

1. The problem

In one sentence

The server answers a request with a redirect, and the place it points to redirects again, so the client never reaches a real answer.

A story

A team moves an endpoint and adds a redirect from the old address to the new one. The new address has a rule that sends requests for the same resource back to the old one, for example a mix of “add a trailing slash” and “remove it”. Every client that follows redirects bounces back and forth until its limit and then gives up.

Why it hurts

For the client there is no answer at all, not even an error body. A browser shows “too many redirects”. An API client throws an exception that looks like a network error.

  • For developers: the cause is usually two rules that undo each other: slash and no slash, http and https, an old and a new host.
  • For managers: a route that looks “moved” in the logs is really unreachable for everyone. It tends to appear right after a migration.
  • For DevOps: check redirects with curl -sSL --max-redirs 10 after every change to routing, a gateway or a CDN rule.

Example

The spec declares a plain 200 for GET /redirect-loop. The server answers 302 Found with a location that points back to the same path, so every step leads to the same redirect. The check follows redirects and stops after 10.

How to detect it without clrsig

  • curl -sSL --max-redirs 10 -o /dev/null URL ends with curl: (47) Maximum (10) redirects followed.
  • curl -si URL shows the first step: here a 302 Found whose location header points back to the same path.

How to fix it

There are two usual causes:

  1. Two routing rules conflict (more likely). Find the pair (gateway, framework, CDN) and remove one.
  2. A redirect was added where an answer was meant. An API should usually answer directly rather than redirect. See the failure-catalog demo FM-025-03 for a redirect that replaces a response.

The spec is rarely the cause, unless it declares a redirect status for this operation. Never raise the redirect limit.

AC-017 The body is cut off, or the connection drops, AC-001 The server answers a status the spec never listed, AC-020 A documented route does not exist. Failure-catalog demo: FM-025-03 (a redirect instead of a response). See also the site’s Incorrect HTTP Status and Business-Error Semantics.

Words used on this page are explained once in the glossary.

2. How clrsig helps

Check

CS-RUN-003 No response. State: caught. Severity today: failure (exit code 1). A loop is reported as no answer, with the reason stopped after 10 redirects.

Command

--paths limits the run to this one GET, so nothing is written:

clrsig conform specs/conform-fail.yaml \
  -b http://localhost:8080/conform-fail \
  --env clrsig/environments/conform-fail.yaml \
  --paths /redirect-loop --explain

Exit code: 0 clean, 1 a finding, 2 the spec or the setup is broken. Here it is 1.

What you see

Output from clrsig v0.21.0, recorded on 2026-11-30. The lines for the 75 operations that --paths skipped are left out by grep -v '^ SKIP'; no line is edited.

conform-fail API  1.0.0
Base URL: http://localhost:8080/conform-fail
Limited by --paths /redirect-loop

  FAIL  GET     /redirect-loop
         error: executing request: Get "/conform-fail/redirect-loop": stopped after 10 redirects
         → [CS-RUN-003] The server did not answer. Why: The server answered with redirects that never reach a final response, so there was nothing to compare with the spec. Where: network. Fix: Fix the redirect rule on the server (a redirect that points back to itself or to a chain longer than 10).

No operation got an answer from http://localhost:8080/conform-fail (the error under each operation says why).

FAILED  76 operations  ·  0 passed  ·  1 failed  ·  75 skipped  38ms

How to read it: the error: line says stopped after 10 redirects, and the Why and Fix lines now name the cause: redirects that never reach a final response, and a redirect rule on the server to fix.

Where to look

  • Desktop app: Check Conformance lists the operation as failed with “no response”.
  • Reports: with --format json, the finding has "checkId": "CS-RUN-003".
  • GitHub Action: it runs the same command.

How clrsig helps you fix it

It tells you that no answer arrived and that the redirects hit the limit of 10. It does not show the redirect steps; use curl -si.

Limits

  • The error: line shows a relative address (/conform-fail/redirect-loop), not the full chain.
  • A single redirect that ends in a valid answer is followed and compared with the spec; this card is about loops.

More ways

Nothing yet.

3. Video brief for Google NotebookLM

VIDEO BRIEF — AC-019 · A redirect that never ends
Length: 5 to 7 minutes. Language: English. Audience: developers, with a line each for managers and DevOps.
One idea: a redirect loop gives the client no answer at all; the cause is usually two routing rules that undo each other.
Open with this story: A team moves an endpoint and adds a redirect from the old address to the new one. The new address has a rule that sends requests for the same resource back to the old one, for example a mix of add a trailing slash and remove it. Every client that follows redirects bounces back and forth until its limit and gives up.
Say these facts, in this order:
1. The spec declares a normal 200. The server answers with a redirect to a place that redirects again.
2. clrsig follows redirects and stops after 10.
3. It reports this as no response, check ID CS-RUN-003; the error line says stopped after 10 redirects.
4. The Why and Fix lines name the cause: redirects that never reach a final response, and say to fix the redirect rule on the server.
5. Usual causes: two routing rules that conflict, such as slash and no slash, http and https, an old and a new host.
6. Detect it with curl: follow redirects with a limit of 10, and it ends with the error Maximum 10 redirects followed.
7. For managers: a route that looks moved in the logs is really unreachable; it tends to appear right after a migration.
8. For DevOps: check redirect chains after every change to routing, a gateway or a CDN rule.
Show on screen: the command (clrsig conform specs/conform-fail.yaml -b http://localhost:8080/conform-fail --env clrsig/environments/conform-fail.yaml --paths /redirect-loop --explain), and the output block, copied exactly from the card.
Name the check: CS-RUN-003, No response. Say the clrsig version: v0.21.0.
Explain these words once: redirect (an answer that says: ask somewhere else); Location header (where the redirect points); exit code (0 clean, 1 a finding, 2 setup or spec broken).
Say what clrsig does not see here: it does not show the redirect steps.
Safety line (if a write is shown): not needed, this command sends one GET.
Finish with three recap questions:
1. How many redirects does clrsig follow before it stops? (10.)
2. Where is the real reason in the output? (In the error line under the operation.)
3. Which tool shows the same limit error? (curl, following redirects with a limit.)
Tease the next video: AC-020 · A documented route does not exist on the server.
Do not: say "contract testing" alone; say clrsig "catches everything"; invent flags, IDs or numbers; read tables aloud; use any fact that is not in the card.