# if.api demo — arXiv resolver (receipt-backed)

**Audience:** external reviewers + operators  
**Reality gate:** demo of a transformation contract, not a deployed arXiv resolver.

---

## Links (HTML-first)

if.trace receipt:
https://infrafabric.io/static/trace/6uQGE1f2tgwkFE5L_hUaBw

Pack (HTML view):
https://infrafabric.io/static/pack/6uQGE1f2tgwkFE5L_hUaBw

Pack (raw Markdown):
https://infrafabric.io/static/pack/6uQGE1f2tgwkFE5L_hUaBw.md

Source bundle (tgz):
https://infrafabric.io/static/source/fb81599f16fadade240d1e0440ff93066f5147d017e93d60a697ead8fd6764af.tgz

---

## What this proves (black/white)

This demo proves:
- a known arXiv ID can be transformed deterministically into a normalized resolution envelope
- the output is bound to if.trace receipts (hash checks; signatures only where present and verifiable)

This demo does not prove:
- live arXiv metadata resolution or API policy compliance
- any shipped if.bus runtime or message broker

---

## Demo artifacts

Source bundle sha256 (tgz):

    fb81599f16fadade240d1e0440ff93066f5147d017e93d60a697ead8fd6764af

Input JSON sha256:

    7ce34cdaa8f7eb7a9a1bda8cd1dd4d02a65c37a7edd115886ed85fd02d63632c

Normalized output JSON sha256:

    5cd85ae09632e64b7324ccf9b27a511063611d80b2adfd95db3c5f78f93470a0

---

## How to reproduce (no internal access)

```bash
curl -fsSL -o if-api-arxiv-resolver-demo-source.tgz "https://infrafabric.io/static/source/fb81599f16fadade240d1e0440ff93066f5147d017e93d60a697ead8fd6764af.tgz"
sha256sum if-api-arxiv-resolver-demo-source.tgz

tar -xzf if-api-arxiv-resolver-demo-source.tgz
python3 resolve_arxiv_demo.py arxiv_input.json > resolved_event.json
sha256sum resolved_event.json
```

Expected `sha256sum` (source bundle):

    fb81599f16fadade240d1e0440ff93066f5147d017e93d60a697ead8fd6764af  if-api-arxiv-resolver-demo-source.tgz

Expected `sha256sum` (normalized output):

    5cd85ae09632e64b7324ccf9b27a511063611d80b2adfd95db3c5f78f93470a0  resolved_event.json

---

## Output (normalized event envelope)

```json
{
  "event": "resolve",
  "input_sha256": "7ce34cdaa8f7eb7a9a1bda8cd1dd4d02a65c37a7edd115886ed85fd02d63632c",
  "integration": "arxiv.resolver",
  "notes": {
    "integrity": "see if.trace receipt for output bytes",
    "live_lookup": false
  },
  "requested_at": "2026-01-07T00:00:00Z",
  "resolved_at": "2026-01-07T00:00:00Z",
  "results": [
    {
      "identifier": "arXiv:2312.01234",
      "metadata": {
        "authors": [
          "A. Example",
          "B. Example"
        ],
        "category": "cs.AI",
        "published": "2025-12-31",
        "title": "Synthetic demo artifact (arXiv)"
      },
      "resolution_method": "synthetic-map",
      "scheme": "arxiv",
      "status": "resolved",
      "target_url": "https://arxiv.org/abs/2312.01234"
    },
    {
      "identifier": "arXiv:2401.05678",
      "metadata": {
        "authors": [
          "C. Example"
        ],
        "category": "cs.CL",
        "published": "2025-12-31",
        "title": "Synthetic decision pack (arXiv)"
      },
      "resolution_method": "synthetic-map",
      "scheme": "arxiv",
      "status": "resolved",
      "target_url": "https://arxiv.org/abs/2401.05678"
    }
  ],
  "schema_version": "demo.v1"
}
```
