Skip to content

fix(cli): the local link cache keeps cloud rate-limited and unverified answers for 7 days #764

Closed

Description

@nc9

When a signed-in CLI checks external links through the cloud dead-links service, checkExternalLinksOnStorage (apps/cli/src/audit/adapter.ts) writes every answer into the local link cache for cache_ttl_days (7 by default). The rules then read the results back from that cache. Two kinds of answer should not sit there for a week:

  • Rate-limited results lose their flag. The cache seed does not carry rateLimited (LinkCacheEntry deliberately has no such field, chore(release): v0.0.181 #1829: throttled results are never cached). A 503 with Retry-After that the service marked rate-limited is read back as a bare 503, so it is counted as a broken link, and it stays cached for 7 days. A 429 or 430 is still recognised from its status alone.
  • Unsettled answers are cached for a week. With fix(cli): list dead-links results the cloud checker could not verify as unverifiable, never broken (squirrelscan/repo#2818) #762 the service flags links it could not verify (wafBlocked, status null): a timeout from its network, a bot wall, a 404 seen once and waiting for a confirming check. Each one is cached as unverifiable for the full TTL. So the service's confirming second check, minutes later, does not reach the user for a week.

Found in review of squirrelscan/repo#2818.

Acceptance Criteria

  • A rate-limited bulk answer (rateLimited: true, or a 429 or 430 status) is never written to the local link cache, and a test pins it.
  • A bulk answer the service could not verify (wafBlocked with a null status) is not cached past a short TTL (or not at all), and a test pins it.
  • A WAF-blocked 403 from the CLI's own local checker is cached as it is today.

Activity

  1. added
    bug
    size: S
    on Oct 14, 2026
  2. nc9 commented on Oct 14, 2026

    @nc9
    ContributorAuthor

    Update: the rate-limited half is fixed on main by #755 (7e991f5). The bulk path now lives in the engine's checkExternalLinks, which skips the cache for isRateLimited results. Still open: an answer the service could not verify (wafBlocked, null status, from squirrelscan/repo#2818 / #762) is cached for the full TTL.

  3. nc9 commented on Oct 15, 2026

    @nc9
    ContributorAuthor

    Status on current main (46000dd):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions