Files
Taylor Ho ae4653089c fix(link-preview): harden transient retry against rate-limit and SSRF edge cases
Address five review blockers in the transient link-preview retry path:

- Parse an HTTP-date Retry-After (RFC 9110), not just delta-seconds, so a
  dated 429 honors the server cooldown instead of the default window.
- Re-classify the inline retry's own failure so a 429 on attempt two keeps
  its Retry-After rather than collapsing to the generic transient window.
- Floor the transient expiry at a positive minimum so Retry-After: 0 cannot
  drive a tight refetch loop.
- Schedule each network fetch separately with the backoff sleeping outside
  the concurrency scheduler, so a failing URL no longer holds a slot through
  its retry window and starves healthy previews.
- Mark permanent validation/policy rejections (SSRF private-host, non-HTTPS
  or credentialed URL, bad port, unparseable URL/redirect) so they cache as a
  hard miss instead of being inline-retried and self-heal polled every 30s.

Add Rust tests for Retry-After delta-seconds/HTTP-date/past-date/garbage and
the rejection marker, and TS tests for the Retry-After:0 floor, a 429 on the
inline retry, and a permanent rejection skipping retry for the full miss TTL.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
2026-08-10 16:08:37 -07:00
..