or run

tessl search
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-8/

{
  "context": "Evaluates how well the solution uses make-fetch-happen to deliver offline-only cache reads, stale revalidation, and reload behavior for JSON fetching. Checks focus on correct cache modes, propagation of cache metadata headers, and surfacing the package's cache-miss error when offline without entries.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Cache setup",
      "description": "Uses make-fetch-happen with the provided cacheDirectory mapped to cachePath and consumes JSON bodies so responses are stored; derives cacheStatus/fromCache from the x-local-cache-status metadata.",
      "max_score": 15
    },
    {
      "name": "Offline only-if-cached",
      "description": "When offline is true, sets cache:'only-if-cached' alongside cachePath to avoid network access and allows the dependency's ENOTCACHED FetchError to surface when no cached entry exists.",
      "max_score": 25
    },
    {
      "name": "304 revalidation",
      "description": "For stale entries, uses the default/no-cache revalidation path so a 304 response serves the cached body while reporting cacheStatus revalidated from x-local-cache-status and keeping fromCache true.",
      "max_score": 20
    },
    {
      "name": "Stale on failure",
      "description": "Preserves default cache semantics so failed revalidation or network errors return the stale cached payload instead of throwing, carrying through cacheStatus stale (or equivalent) and fromCache true.",
      "max_score": 20
    },
    {
      "name": "Reload bypass",
      "description": "When reload is requested, sets cache:'reload' with cachePath to force a network fetch that refreshes the cache, reporting fromCache false and cacheStatus showing a miss/update rather than stale reuse.",
      "max_score": 20
    }
  ]
}