fw-09 step 01 — Keys, status, deduplication

Tasks

  1. Key normalisation: structural equality with stable ordering. Prove that ['todos',{a:1,b:2}] and ['todos',{b:2,a:1}] are the same key.
  2. Cache entries with status: fresh | stale | fetching | error.
  3. Deduplication: N simultaneous subscribers, one request. Assert the request count.
  4. Stale-while-revalidate.
  5. Retries with backoff; distinguish retriable from terminal errors.

Done when

  • Key normalisation tested against reordered objects
  • Request count asserted under concurrent subscription