{
  "date": "2026-11-05",
  "method": "Execute current checkIpRateLimit function in Node VM against isolated in-memory SQLite using a small D1-style adapter and controlled clock. No production requests, no Turnstile check, no audio and no AI call. Source unchanged except removal of ES export keyword for VM loading.",
  "source_git_blob": "e6a1ff42e6eff0a66e875563804e330a9ce89b66",
  "cases": [
    {
      "case": "first request in controlled window",
      "controlled_time": "2026-11-05T00:00:00.000Z",
      "allowed": true,
      "minute_count": 1,
      "hour_count": 1
    },
    {
      "case": "second request",
      "controlled_time": "2026-11-05T00:00:00.000Z",
      "allowed": true,
      "minute_count": 2,
      "hour_count": 2
    },
    {
      "case": "third request",
      "controlled_time": "2026-11-05T00:00:00.000Z",
      "allowed": true,
      "minute_count": 3,
      "hour_count": 3
    },
    {
      "case": "fourth request in same minute",
      "controlled_time": "2026-11-05T00:00:00.000Z",
      "allowed": false,
      "minute_count": 4,
      "hour_count": 4
    },
    {
      "case": "next minute, same hour",
      "controlled_time": "2026-11-05T00:01:00.000Z",
      "allowed": true,
      "minute_count": 1,
      "hour_count": 5
    },
    {
      "case": "new minute counter but hour counter already 20",
      "controlled_time": "2026-11-05T00:01:00.000Z",
      "allowed": false,
      "minute_count": 1,
      "hour_count": 21
    },
    {
      "case": "next hour with expired row cleanup",
      "controlled_time": "2026-11-05T01:00:00.000Z",
      "allowed": true,
      "minute_count": 1,
      "hour_count": 1
    }
  ],
  "missing_database": {
    "status": 503,
    "message": "Transcription protection is temporarily unavailable. Please try again shortly."
  },
  "scope": "Validates the application SQL and counter gate under controlled inputs; not a Cloudflare production load or rate-limit propagation benchmark."
}
