{
  "environment": {
    "node": "v22.23.1",
    "platform": "darwin",
    "arch": "arm64"
  },
  "scope": "WHATWG URL resolution plus real loopback HTTP; no browser, DOM, TLS, DNS, or external fetch",
  "resolution_count": 22,
  "resolution": [
    {
      "name": "leaf",
      "input": "cover.svg",
      "base": "https://example.invalid/garden/posts/note",
      "resolved": "https://example.invalid/garden/posts/cover.svg",
      "same_origin": true
    },
    {
      "name": "directory",
      "input": "cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/garden/posts/note/cover.svg",
      "same_origin": true
    },
    {
      "name": "dot-leaf",
      "input": "./cover.svg",
      "base": "https://example.invalid/garden/posts/note",
      "resolved": "https://example.invalid/garden/posts/cover.svg",
      "same_origin": true
    },
    {
      "name": "dot-directory",
      "input": "./cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/garden/posts/note/cover.svg",
      "same_origin": true
    },
    {
      "name": "one-parent",
      "input": "../cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/garden/posts/cover.svg",
      "same_origin": true
    },
    {
      "name": "two-parents-directory",
      "input": "../../cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/garden/cover.svg",
      "same_origin": true
    },
    {
      "name": "two-parents-leaf",
      "input": "../../cover.svg",
      "base": "https://example.invalid/garden/posts/note",
      "resolved": "https://example.invalid/cover.svg",
      "same_origin": true
    },
    {
      "name": "origin-root",
      "input": "/cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/cover.svg",
      "same_origin": true
    },
    {
      "name": "deployment-prefix",
      "input": "/garden/cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/garden/cover.svg",
      "same_origin": true
    },
    {
      "name": "query-only",
      "input": "?download=1",
      "base": "https://example.invalid/garden/posts/note/?old=1#before",
      "resolved": "https://example.invalid/garden/posts/note/?download=1",
      "same_origin": true
    },
    {
      "name": "fragment-only",
      "input": "#part",
      "base": "https://example.invalid/garden/posts/note/?old=1#before",
      "resolved": "https://example.invalid/garden/posts/note/?old=1#part",
      "same_origin": true
    },
    {
      "name": "empty-reference",
      "input": "",
      "base": "https://example.invalid/garden/posts/note/?old=1#before",
      "resolved": "https://example.invalid/garden/posts/note/?old=1",
      "same_origin": true
    },
    {
      "name": "asset-query-fragment",
      "input": "cover.svg?download=1#sample",
      "base": "https://example.invalid/garden/posts/note/?old=1#before",
      "resolved": "https://example.invalid/garden/posts/note/cover.svg?download=1#sample",
      "same_origin": true
    },
    {
      "name": "network-path",
      "input": "//cdn.example.invalid/cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://cdn.example.invalid/cover.svg",
      "same_origin": false
    },
    {
      "name": "absolute",
      "input": "https://other.example.invalid/cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://other.example.invalid/cover.svg",
      "same_origin": false
    },
    {
      "name": "encoded-parent",
      "input": "%2e%2e/cover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/garden/posts/cover.svg",
      "same_origin": true
    },
    {
      "name": "encoded-slash",
      "input": "images%2Fcover.svg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/garden/posts/note/images%2Fcover.svg",
      "same_origin": true
    },
    {
      "name": "encoded-dot-in-name",
      "input": "cover%2Esvg",
      "base": "https://example.invalid/garden/posts/note/",
      "resolved": "https://example.invalid/garden/posts/note/cover%2Esvg",
      "same_origin": true
    },
    {
      "name": "base-directory",
      "input": "cover.svg",
      "base": "https://example.invalid/garden/assets/",
      "resolved": "https://example.invalid/garden/assets/cover.svg",
      "same_origin": true
    },
    {
      "name": "base-without-slash",
      "input": "cover.svg",
      "base": "https://example.invalid/garden/assets",
      "resolved": "https://example.invalid/garden/cover.svg",
      "same_origin": true
    },
    {
      "name": "base-fragment",
      "input": "#part",
      "base": "https://example.invalid/garden/assets/",
      "resolved": "https://example.invalid/garden/assets/#part",
      "same_origin": true
    },
    {
      "name": "html-name",
      "input": "cover.svg",
      "base": "https://example.invalid/garden/posts/note.html",
      "resolved": "https://example.invalid/garden/posts/cover.svg",
      "same_origin": true
    }
  ],
  "http_check_count": 13,
  "http_request_count": 14,
  "http_checks": [
    {
      "name": "page-without-slash",
      "requested": "<ORIGIN>/garden/posts/note",
      "final_url": "<ORIGIN>/garden/posts/note",
      "redirected": false,
      "status": 200,
      "content_type": "text/html; charset=utf-8",
      "body_kind": "fixture-html"
    },
    {
      "name": "relative-image-without-slash",
      "requested": "<ORIGIN>/garden/posts/cover.svg",
      "final_url": "<ORIGIN>/garden/posts/cover.svg",
      "redirected": false,
      "status": 200,
      "content_type": "text/html; charset=utf-8",
      "body_kind": "fixture-html"
    },
    {
      "name": "page-with-slash",
      "requested": "<ORIGIN>/garden/posts/note/",
      "final_url": "<ORIGIN>/garden/posts/note/",
      "redirected": false,
      "status": 200,
      "content_type": "text/html; charset=utf-8",
      "body_kind": "fixture-html"
    },
    {
      "name": "relative-image-with-slash",
      "requested": "<ORIGIN>/garden/posts/note/cover.svg",
      "final_url": "<ORIGIN>/garden/posts/note/cover.svg",
      "redirected": false,
      "status": 200,
      "content_type": "image/svg+xml",
      "body_kind": "fixture-svg"
    },
    {
      "name": "redirected-page",
      "requested": "<ORIGIN>/go",
      "final_url": "<ORIGIN>/garden/posts/note/",
      "redirected": true,
      "status": 200,
      "content_type": "text/html; charset=utf-8",
      "body_kind": "fixture-html"
    },
    {
      "name": "image-using-final-url",
      "requested": "<ORIGIN>/garden/posts/note/cover.svg",
      "final_url": "<ORIGIN>/garden/posts/note/cover.svg",
      "redirected": false,
      "status": 200,
      "content_type": "image/svg+xml",
      "body_kind": "fixture-svg"
    },
    {
      "name": "image-using-original-url",
      "requested": "<ORIGIN>/cover.svg",
      "final_url": "<ORIGIN>/cover.svg",
      "redirected": false,
      "status": 404,
      "content_type": "text/plain; charset=utf-8",
      "body_kind": "not-found"
    },
    {
      "name": "root-absolute-image",
      "requested": "<ORIGIN>/cover.svg",
      "final_url": "<ORIGIN>/cover.svg",
      "redirected": false,
      "status": 404,
      "content_type": "text/plain; charset=utf-8",
      "body_kind": "not-found"
    },
    {
      "name": "prefix-aware-image",
      "requested": "<ORIGIN>/garden/cover.svg",
      "final_url": "<ORIGIN>/garden/cover.svg",
      "redirected": false,
      "status": 200,
      "content_type": "image/svg+xml",
      "body_kind": "fixture-svg"
    },
    {
      "name": "query-and-fragment",
      "requested": "<ORIGIN>/garden/posts/note/cover.svg?download=1#sample",
      "final_url": "<ORIGIN>/garden/posts/note/cover.svg?download=1",
      "redirected": false,
      "status": 200,
      "content_type": "image/svg+xml",
      "body_kind": "fixture-svg"
    },
    {
      "name": "encoded-slash-image",
      "requested": "<ORIGIN>/garden/posts/note/images%2Fcover.svg",
      "final_url": "<ORIGIN>/garden/posts/note/images%2Fcover.svg",
      "redirected": false,
      "status": 404,
      "content_type": "text/plain; charset=utf-8",
      "body_kind": "not-found"
    },
    {
      "name": "encoded-parent-image",
      "requested": "<ORIGIN>/garden/posts/cover.svg",
      "final_url": "<ORIGIN>/garden/posts/cover.svg",
      "redirected": false,
      "status": 200,
      "content_type": "text/html; charset=utf-8",
      "body_kind": "fixture-html"
    },
    {
      "name": "explicit-base-image",
      "requested": "<ORIGIN>/garden/assets/cover.svg",
      "final_url": "<ORIGIN>/garden/assets/cover.svg",
      "redirected": false,
      "status": 200,
      "content_type": "image/svg+xml",
      "body_kind": "fixture-svg"
    }
  ],
  "server_request_targets": [
    "/garden/posts/note",
    "/garden/posts/cover.svg",
    "/garden/posts/note/",
    "/garden/posts/note/cover.svg",
    "/go",
    "/garden/posts/note/",
    "/garden/posts/note/cover.svg",
    "/cover.svg",
    "/cover.svg",
    "/garden/cover.svg",
    "/garden/posts/note/cover.svg?download=1",
    "/garden/posts/note/images%2Fcover.svg",
    "/garden/posts/cover.svg",
    "/garden/assets/cover.svg"
  ],
  "assertions": {
    "same_html_different_resolution": true,
    "status_200_can_contain_html_instead_of_image": true,
    "redirect_final_url_used_for_resolution": true,
    "query_sent_but_fragment_not_sent": true,
    "encoded_slash_retained_in_request_target": true,
    "external_origins_resolved_without_requesting": true
  }
}
