# if.api demo — ISBN/ISSN resolver (receipt-backed)

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

---

## Links (HTML-first)

if.trace receipt:
https://infrafabric.io/static/trace/hVGcjMpThKv4OYkDyA6oZg

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

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

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

---

## What this proves (black/white)

This demo proves:
- a known ISBN/ISSN request 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 ISBN/ISSN resolution, registry policy, or metadata governance
- any shipped if.bus runtime or message broker

---

## Demo artifacts

Source bundle sha256 (tgz):

    4d38574aecd589a638081f318474ec19000a152a7766f04aa7207d3df2096169

Input JSON sha256:

    5a450b5e7b50c45c34f97ebf348767b069be6d3f01c02d04257416fda05dba48

Normalized output JSON sha256:

    f1b603de2d6bc341a0a130bc4aebcf8585892ea92f5c849a84fdbdfe6a7544fa

---

## How to reproduce (no internal access)

```bash
curl -fsSL -o if-api-isbn-issn-resolver-demo-source.tgz "https://infrafabric.io/static/source/4d38574aecd589a638081f318474ec19000a152a7766f04aa7207d3df2096169.tgz"
sha256sum if-api-isbn-issn-resolver-demo-source.tgz

tar -xzf if-api-isbn-issn-resolver-demo-source.tgz
python3 resolve_isbn_issn_demo.py isbn_issn_input.json > resolved_event.json
sha256sum resolved_event.json
```

Expected `sha256sum` (source bundle):

    4d38574aecd589a638081f318474ec19000a152a7766f04aa7207d3df2096169  if-api-isbn-issn-resolver-demo-source.tgz

Expected `sha256sum` (normalized output):

    f1b603de2d6bc341a0a130bc4aebcf8585892ea92f5c849a84fdbdfe6a7544fa  resolved_event.json

---

## Output (normalized event envelope)

```json
{
  "event": "resolve",
  "input_sha256": "5a450b5e7b50c45c34f97ebf348767b069be6d3f01c02d04257416fda05dba48",
  "integration": "isbn.issn.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": "9780306406157",
      "metadata": {
        "issued": "2025-12-31",
        "medium": "book",
        "publisher": "Example Library",
        "title": "Synthetic demo artifact (ISBN)"
      },
      "resolution_method": "synthetic-map",
      "scheme": "isbn",
      "status": "resolved",
      "target_url": "https://example.org/isbn-demo-1"
    },
    {
      "identifier": "2049-3630",
      "metadata": {
        "issued": "2025-12-31",
        "medium": "serial",
        "publisher": "Example Library",
        "title": "Synthetic decision pack (ISSN)"
      },
      "resolution_method": "synthetic-map",
      "scheme": "issn",
      "status": "resolved",
      "target_url": "https://example.org/issn-demo-2"
    }
  ],
  "schema_version": "demo.v1"
}
```
