Coverage gap
When a cache revalidates a stale stored response and the origin answers with a full 200 (not a 304), the cache must use and store the new response, replacing the stale one (RFC 9111 §4.3.3). No test verifies the replacement: the existing stale test only asserts the request reached origin (not_cached), not that the new body/headers are then served and stored.
Currently tested
freshness-max-age-stale (tests/cc-freshness.mjs) — asserts not_cached only. conditional-lm-stale exercises the 304 revalidation path, not the full-200 replacement path.
Suggested test
Prime with a response that becomes stale (distinct body A). Second request: origin returns a fresh full 200 with body B. Assert request 2 returns B; then a third request is served cached and returns B (the new response was stored, not the stale A).
Tag
[MUST] — RFC 9111 §4.3.3
Filed from an AI-assisted (Claude Code) coverage audit against RFC 9111/9110, under maintainer direction. Absence was grep-verified; the spec section number and MUST/SHOULD/optimal strength are from model knowledge, not re-read from the RFC text — worth confirming before writing the test.
Coverage gap
When a cache revalidates a stale stored response and the origin answers with a full
200(not a304), the cache must use and store the new response, replacing the stale one (RFC 9111 §4.3.3). No test verifies the replacement: the existing stale test only asserts the request reached origin (not_cached), not that the new body/headers are then served and stored.Currently tested
freshness-max-age-stale(tests/cc-freshness.mjs) — assertsnot_cachedonly.conditional-lm-staleexercises the304revalidation path, not the full-200replacement path.Suggested test
Prime with a response that becomes stale (distinct body A). Second request: origin returns a fresh full
200with body B. Assert request 2 returns B; then a third request is servedcachedand returns B (the new response was stored, not the stale A).Tag
[MUST] — RFC 9111 §4.3.3
Filed from an AI-assisted (Claude Code) coverage audit against RFC 9111/9110, under maintainer direction. Absence was grep-verified; the spec section number and MUST/SHOULD/optimal strength are from model knowledge, not re-read from the RFC text — worth confirming before writing the test.