Problem
stale-sie-503 is a behavioral duplicate of stale-sie-close — it never sends the 503 its name describes.
https://github.com/http-tests/cache-tests/blob/main/tests/stale.mjs#L131-L149
Its second request uses disconnect: true, identical to stale-sie-close directly above it:
{
name: 'Does HTTP cache serve stale stored response when server sends `Cache-Control: stale-if-error` and subsequently a `503 Service Unavailable`?',
id: 'stale-sie-503',
...
requests: [
{ response_headers: [['Cache-Control', 'max-age=2, stale-if-error=60']], setup: true, pause_after: true },
{ disconnect: true, expected_type: 'cached' } // <-- disconnects instead of returning 503
]
}
So the stale-if-error-on-error-status path (the whole point of this test, vs. the connection-close variant) is never exercised.
Suggested fix
Mirror the existing stale-503 test (https://github.com/http-tests/cache-tests/blob/main/tests/stale.mjs#L48-L61), which already has the right shape:
{
response_status: [503, 'Service Unavailable'],
expected_status: 200,
expected_type: 'cached'
}
kind: 'check', so this won't produce a false failure — but as written the test measures nothing distinct from stale-sie-close.
Filed from an AI-assisted (Claude Code) review of the tests, with each finding verified by hand and reviewed by a human before filing.
Problem
stale-sie-503is a behavioral duplicate ofstale-sie-close— it never sends the 503 its name describes.https://github.com/http-tests/cache-tests/blob/main/tests/stale.mjs#L131-L149
Its second request uses
disconnect: true, identical tostale-sie-closedirectly above it:So the stale-if-error-on-error-status path (the whole point of this test, vs. the connection-close variant) is never exercised.
Suggested fix
Mirror the existing
stale-503test (https://github.com/http-tests/cache-tests/blob/main/tests/stale.mjs#L48-L61), which already has the right shape:kind: 'check', so this won't produce a false failure — but as written the test measures nothing distinct fromstale-sie-close.Filed from an AI-assisted (Claude Code) review of the tests, with each finding verified by hand and reviewed by a human before filing.