{
 "use_case": "auditor",
 "title": "Endpoint auditor: a short audit of this server's model endpoint",
 "about": "A short audit (22 probes, long-context check off) of the first available target on this server (GET /audit/targets: the hosted gateway route, or on a self-host box its local model), compared with the signed reference fixture for Qwen3.8-27B that ships here. The endpoint must match the reference on identity and quality, and the signed report must verify against this auditor's key and fail once a check value is changed. The route takes a target id or your own endpoint (inputs/own-endpoint.example.json), not a raw fixture: the fixture is shipped for reading.",
 "licence": "The probe suite and reference fixture are part of decosa-api, AGPL-3.0-or-later (the fixture was recorded from Qwen3.8-27B NVFP4, Apache-2.0 weights). No user data: every probe is a synthetic prompt.",
 "inputs": [
  {
   "file": "inputs/qwen3.8-27b.json",
   "what": "The signed reference fixture the audit compares with: golden answers, canaries and noise bands recorded on a pinned stack (read-only; the auditor loads it from its package)."
  },
  {
   "file": "inputs/qwen3.8-27b.sig",
   "what": "The fixture's signature."
  },
  {
   "file": "inputs/own-endpoint.example.json",
   "what": "How to audit your own OpenAI-compatible endpoint later: base_url, model, claimed_model, optional api_key (send it instead of a target id)."
  }
 ],
 "steps": [
  {
   "id": "targets",
   "method": "GET",
   "path": "/audit/targets",
   "auth": false
  },
  {
   "id": "audit",
   "method": "POST",
   "path": "/audit/runs",
   "stream": "sse",
   "timeout": 240,
   "body": {
    "target": "${targets[available=true][0].id}",
    "context_tokens": 0
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/audit/verify",
   "auth": false,
   "body": {
    "report": {
     "$ref": "audit.done.summary.report"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/audit/verify",
   "auth": false,
   "body": {
    "report": {
     "$ref": "audit.done.summary.report"
    }
   },
   "tamper": {
    "at": "report.checks.identity[id=greedy].value",
    "set": "0/10"
   }
  }
 ],
 "checks": [
  {
   "says": "at least one audit target is up on this server",
   "path": "targets[available=true]",
   "count_min": 1
  },
  {
   "says": "the audit finishes without errors",
   "path": "audit.errors",
   "count": 0
  },
  {
   "says": "the audit compares against the shipped reference fixture",
   "path": "audit.done.summary.report.reference.fixture_sha256",
   "equals": "3e9152853fd299c2340ab3466ada7f61b5969bdbf6e66758fafa77a28688cd9e"
  },
  {
   "says": "no probe call failed",
   "path": "audit.done.summary.report.probes.errors",
   "equals": 0
  },
  {
   "says": "greedy outputs match the reference within its band",
   "path": "audit.done.summary.report.checks.identity[id=greedy][0].status",
   "equals": "pass"
  },
  {
   "says": "the canary score is within the reference band",
   "path": "audit.done.summary.report.checks.quality[id=canary_total][0].status",
   "equals": "pass"
  },
  {
   "says": "the verdict is pass (or inconclusive after a re-check near the band edge)",
   "path": "audit.done.summary.report.verdict.status",
   "in": [
    "pass",
    "inconclusive"
   ]
  },
  {
   "says": "the signed report verifies against this auditor's key",
   "path": "verify.signed_by_this_auditor",
   "equals": true
  },
  {
   "says": "a report with one check value changed no longer verifies",
   "path": "tampered.valid_signature",
   "equals": false
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "min": 20
  }
 ]
}
