{
  "$comment": "webGCP conformance fixture WGCP-L0-001 per spec §9 — https://webgcp.org/spec/v0.1/. Authored 2026-05-16. Not yet runnable: requires Phase 2 query endpoint at /webgcp/v0/query.",
  "fixture_id": "WGCP-L0-001",
  "fixture_name": "Basic L0 article-retrieval bundle with provenance",
  "verifies": [
    "§5.5 provenance — every value carries _meta",
    "§5.4 applicability — in-scope query returns ok, out-of-scope returns typed failure",
    "§5.6 authority — every field tagged canonical | derived | inferred",
    "§6.4 success response shape — typed bundle, _meta required",
    "§5.11 forbidden — no values without _meta, no free-form errors"
  ],
  "preconditions": {
    "server_descriptor_reachable": "https://the-ai-news.web.app/.well-known/webgcp",
    "manifest_reachable": "https://the-ai-news.web.app/webgcp/manifests/news-kb-v0.1.json",
    "bundle_contract_reachable": "https://the-ai-news.web.app/webgcp/bundles/news-article-retrieval-v0.1.json",
    "query_endpoint_reachable_with_200": "https://the-ai-news.web.app/webgcp/v0/query",
    "note": "Manifest + bundle contract + descriptor checks are runnable today (Phase 1). Query-endpoint check gates on Phase 2."
  },
  "given": {
    "method": "POST",
    "url": "https://the-ai-news.web.app/webgcp/v0/query",
    "headers": {
      "Content-Type": "application/json",
      "Idempotency-Key": "WGCP-L0-001-fixture-key"
    },
    "request_body": {
      "intent": "Find recent AI research news on transformer architectures",
      "bundle": {
        "contract_uri": "urn:webgcp:the-ai-news.web.app:news-article-retrieval/v0.1",
        "contract_hash": "(any — fixture does not pin a hash)"
      },
      "filter": {
        "query": "transformer architectures",
        "category": "ai-research",
        "max_results": 3
      },
      "invoker": {
        "subject": "agent:fixture-runner",
        "on_behalf_of": "user:conformance-suite",
        "auth_assertion": null,
        "auth_assertion_note": "L0 public read does not require an auth assertion."
      },
      "scope": {
        "allow_kbs": ["urn:webgcp:the-ai-news.web.app:*"],
        "manifest_pins": []
      },
      "provenance": {
        "required_fields": ["source_uri", "retrieved_at", "authority"]
      },
      "confidence": {
        "min_per_field": 0.5
      },
      "budget": {
        "latency_ms_p95": 1500,
        "max_results": 3
      },
      "trace": {
        "trace_id": "WGCP-L0-001-fixture-trace",
        "parent_span_id": null
      }
    }
  },
  "expected_response_shape": {
    "status": "ok",
    "bundle": {
      "articles": {
        "value": "ARRAY_OF_Article (length 0 to 3)",
        "_meta": {
          "source_kb": "urn:webgcp:the-ai-news.web.app:news-kb",
          "source_uri": "ANY_NON_EMPTY_STRING (the source RSS feed URL or article URL)",
          "retrieved_at": "ISO_8601_DATE_TIME",
          "retriever_version": "ANY_NON_EMPTY_STRING",
          "authority": "derived (this is a vector-search-derived result set)",
          "confidence": "FLOAT in [0,1]",
          "manifest_hash": "ANY_NON_EMPTY_STRING (SHA-256 of canonical manifest form)"
        }
      }
    },
    "completeness": "strict_satisfied | degraded",
    "trace": {
      "trace_id": "WGCP-L0-001-fixture-trace",
      "spans": "ARRAY_OF_SPAN"
    },
    "content_origin_summary": {
      "first_party": "INTEGER >= 0",
      "third_party_trusted": 0,
      "third_party_untrusted": 0
    }
  },
  "assertions": [
    {
      "id": "A01",
      "assert": "response.status == 'ok'",
      "verifies": "§6.4"
    },
    {
      "id": "A02",
      "assert": "len(response.bundle.articles.value) <= 3",
      "verifies": "filter.max_results respected"
    },
    {
      "id": "A03",
      "assert": "response.bundle.articles._meta is present and non-null",
      "verifies": "§5.5"
    },
    {
      "id": "A04",
      "assert": "response.bundle.articles._meta.source_kb == 'urn:webgcp:the-ai-news.web.app:news-kb'",
      "verifies": "§5.5"
    },
    {
      "id": "A05",
      "assert": "response.bundle.articles._meta.authority in ['canonical', 'derived']",
      "verifies": "§5.6"
    },
    {
      "id": "A06",
      "assert": "response.bundle.articles._meta.retrieved_at parses as ISO-8601",
      "verifies": "§5.5"
    },
    {
      "id": "A07",
      "assert": "0 <= response.bundle.articles._meta.confidence <= 1",
      "verifies": "§5.5"
    },
    {
      "id": "A08",
      "assert": "every Article in response.bundle.articles.value has all required Article fields per the bundle contract",
      "verifies": "§5.3 + §6.4"
    }
  ],
  "negative_assertions": [
    {
      "id": "N01",
      "assert_not": "response contains any field with a value but no _meta",
      "verifies": "§5.11 — 'MUST NOT return values without _meta'"
    },
    {
      "id": "N02",
      "assert_not": "response.errorMessage or response.error or any non-typed-failure error field is present",
      "verifies": "§5.11 + §6.7 — 'MUST NOT emit free-form errors'"
    },
    {
      "id": "N03",
      "assert_not": "response.bundle.articles._meta.authority == 'canonical' for the entire articles array",
      "verifies": "§5.6 — search result lists are derived, not canonical; promoting a search result to canonical is forbidden"
    }
  ],
  "out_of_scope_companion_request": {
    "note": "WGCP-L0-002 (companion fixture, to author) issues a query outside the manifest's in_scope_when (e.g., 'NFL scores') and expects status: 'out_of_scope' per §6.7.",
    "fixture_id_planned": "WGCP-L0-002"
  },
  "spec_pin": {
    "spec_url": "https://webgcp.org/spec/v0.1/",
    "spec_version": "0.1.0-draft.2026-05-16"
  },
  "$status_2026_05_16": "RUNNABLE + PASSING. Phase 2 query endpoint /webgcp/v0/query is live; all 11 assertions (8 positive A01-A08 + 3 negative N01-N03) verified against the live endpoint 2026-05-16T16:53Z. The fixture is now part of the L0 conformance evidence package."
}
