{
  "provenance": "AV-06 created no short links, local or production. The 201 and 302 rows are the local D1 observation recorded in docs/tasks/handoffs/AV-02.md on 2026-10-11. The other rows are the status codes and JSON bodies returned by src/pages/api/short-links.ts and src/pages/s/[code].ts. The page shows a localized sentence for each error code; the message field here is the API message.",
  "states": [
    {
      "name": "custom-slug-created",
      "evidence": "local D1, AV-02, 2026-10-11",
      "status": 201,
      "request": {
        "url": "https://example.com/path?x=1",
        "customSlug": "av02-valid"
      },
      "body": {
        "code": "av02-valid",
        "shortUrl": "<request-origin>/s/av02-valid",
        "targetUrl": "https://example.com/path?x=1"
      }
    },
    {
      "name": "redirect",
      "evidence": "local D1, AV-02, 2026-10-11",
      "status": 302,
      "request": "GET /s/av02-valid",
      "location": "https://example.com/path?x=1"
    },
    {
      "name": "localhost-destination",
      "evidence": "local D1, AV-02, 2026-10-11, status 400 and error invalid_url",
      "status": 400,
      "body": {
        "error": "invalid_url",
        "message": "Provide a valid public http or https URL."
      }
    },
    {
      "name": "slug-collision",
      "evidence": "local D1, AV-02, 2026-10-11, HTTP 409",
      "status": 409,
      "body": {
        "error": "slug_taken",
        "message": "Could not create the short link."
      }
    },
    {
      "name": "reserved-slug",
      "evidence": "route source; not resubmitted by AV-06",
      "status": 409,
      "exampleSlug": "admin",
      "body": {
        "error": "reserved_slug",
        "message": "Provide an available custom slug."
      }
    },
    {
      "name": "invalid-slug",
      "evidence": "route source; not resubmitted by AV-06",
      "status": 400,
      "body": {
        "error": "invalid_slug",
        "message": "Provide an available custom slug."
      }
    },
    {
      "name": "rate-limited",
      "evidence": "local D1, AV-02, 2026-10-11, HTTP 429 with a Retry-After header. No sample Retry-After value was recorded.",
      "status": 429,
      "headers": {
        "retry-after": "<seconds left in the exceeded window>"
      },
      "body": {
        "error": "rate_limited",
        "message": "Too many short links created. Try again later."
      }
    },
    {
      "name": "missing-link",
      "evidence": "local D1, AV-02, 2026-10-11, HTTP 404",
      "status": 404,
      "body": {
        "error": "Short link not found."
      }
    },
    {
      "name": "disabled-link",
      "evidence": "local D1, AV-02, 2026-10-11, HTTP 410",
      "status": 410,
      "body": {
        "error": "Short link disabled."
      }
    }
  ]
}
