{
  "data": {
    "generated_at": "2026-08-01T19:54:00.265Z",
    "query": {
      "market": null,
      "limit": 50,
      "offset": 0
    },
    "note": "Adapter A has no server-side filtering by construction; this route applies the same filter/pagination in JS after fetching the whole object so row counts are comparable. That JS step is itself the cost being measured — every real R2 consumer carries its own copy of it.",
    "adapters": {
      "r2": {
        "label": "Adapter A — R2 flat file (current production path, unchanged)",
        "ok": true,
        "error": null,
        "elapsed_ms": 111,
        "row_count_returned": 50,
        "row_count_matching_filter_before_pagination": 2100,
        "server_side_filtering": false,
        "per_consumer_identity": false,
        "revocable": false,
        "leak_scan_hits": [],
        "surfaces_using_this_unchanged": [
          "asaptic.com/tender",
          "app.asaptic.com",
          "radar.asaptic.com",
          "go.asaptic.com",
          "iOS (URL baked into binary)",
          "Android (URL baked into binary)"
        ],
        "cost_of_a_new_surface": "zero pushes — point a 7th consumer at the same object"
      },
      "api": {
        "label": "Adapter B — shared HTTP API (new: per-consumer identity, quota, revocation)",
        "ok": true,
        "error": null,
        "elapsed_ms": 229,
        "row_count_returned": 50,
        "row_count_matching_filter": 2100,
        "server_side_filtering": true,
        "per_consumer_identity": true,
        "revocable": true,
        "leak_scan_hits": [],
        "auth_note": "This measurement calls the query function directly (no HTTP auth round-trip) so it measures QUERY cost, not auth cost — see functions/api/v1/tenders.js for the real, authenticated route.",
        "cost_of_a_new_surface": "issue one test API key (POST /api/v1/keys) — see B3"
      },
      "d1_direct": {
        "label": "Adapter C — direct D1 query (deliberate anti-pattern, comparison arm only)",
        "ok": true,
        "error": null,
        "elapsed_ms": 83,
        "row_count_returned": 50,
        "server_side_filtering": true,
        "per_consumer_identity": false,
        "revocable": false,
        "leak_scan_hits": [
          {
            "id": "AT-AU-2628-002",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-005",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-006",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-008",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-009",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-010",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-012",
            "hits": [
              {
                "name": "government reference code",
                "value": "AIMSRFT785"
              }
            ]
          },
          {
            "id": "AT-AU-2628-013",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-014",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-015",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-016",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-017",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              },
              {
                "name": "government reference code",
                "value": "AZ6621"
              }
            ]
          },
          {
            "id": "AT-AU-2628-018",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-020",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-021",
            "hits": [
              {
                "name": "government reference code",
                "value": "DCET2026"
              }
            ]
          },
          {
            "id": "AT-AU-2628-022",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-023",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-024",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              },
              {
                "name": "government reference code",
                "value": "AILD2026"
              }
            ]
          },
          {
            "id": "AT-AU-2628-025",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-026",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-027",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              },
              {
                "name": "government reference code",
                "value": "DPS26001251"
              }
            ]
          },
          {
            "id": "AT-AU-2628-028",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-029",
            "hits": [
              {
                "name": "government reference code",
                "value": "EFA2026015"
              }
            ]
          },
          {
            "id": "AT-AU-2628-030",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-031",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-032",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-034",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-035",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-036",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-038",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-039",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-040",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-041",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-042",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-043",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-044",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-045",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              },
              {
                "name": "government reference code",
                "value": "NRD07664"
              }
            ]
          },
          {
            "id": "AT-AU-2628-047",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-048",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-049",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          },
          {
            "id": "AT-AU-2628-050",
            "hits": [
              {
                "name": "procurement term",
                "value": "tender"
              }
            ]
          }
        ],
        "reintroduced_bugs": [
          {
            "bug": "no_leak_denylist_gate",
            "fixed_in": "weekly-tender-sync.mjs buildDynamicDenylist/stringGateFailureReason, 6 QC rounds 2026-07-31"
          },
          {
            "bug": "crude_categorizer",
            "fixed_in": "tender-category.js categorizeTender() rewrite, 2026-07-20 (47% of \"IT & software\" misclassified before)"
          },
          {
            "bug": "naive_utc_date_boundary",
            "fixed_in": "functions/api/v1/tenders/index.js todayIsoDate(), HKT +8h offset"
          },
          {
            "bug": "hand_rolled_role_gate",
            "fixed_in": "src/lib/auth.js requireAuth() — fail-closed roles, revocation, session versioning"
          }
        ],
        "verdict": "FAILS the identity-leak check (C1) on its own output — this is the measured cost of skipping the projector, not a hypothetical one."
      }
    }
  },
  "meta": {
    "request_id": "197681d7-bc2b-4b6f-99f4-7f93b32f9847"
  },
  "error": null
}