index.md

HTML wrapper for HTML-only fetchers; content is shown verbatim.

Raw file

Links (extracted)

Clickable list for reviewers; avoids copy/paste line-wrap issues.
# if.api demo — OCI digest resolver (receipt-backed)

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

---

## Links (HTML-first)

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

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

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

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

---

## What this proves (black/white)

This demo proves:
- a known OCI digest 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 registry lookups, auth, or pull integrity
- any shipped if.bus runtime or message broker

---

## Demo artifacts

Source bundle sha256 (tgz):

    ac992fb52950a5a481e24151d3ac026357d35337d51177ce39a41938b4bc4fd3

Input JSON sha256:

    4f82d8b4e53c60110931b8ee6b90bdce3fe99675195957aad6f1ad1da2c95ccc

Normalized output JSON sha256:

    861ea8326516b392470d292a824f93367c140c0ca9cab10d61c2b4adcec22871

---

## How to reproduce (no internal access)

```bash
curl -fsSL -o if-api-oci-digest-demo-source.tgz "https://infrafabric.io/static/source/ac992fb52950a5a481e24151d3ac026357d35337d51177ce39a41938b4bc4fd3.tgz"
sha256sum if-api-oci-digest-demo-source.tgz

tar -xzf if-api-oci-digest-demo-source.tgz
python3 resolve_oci_digest_demo.py oci_input.json > resolved_event.json
sha256sum resolved_event.json
```

Expected `sha256sum` (source bundle):

    ac992fb52950a5a481e24151d3ac026357d35337d51177ce39a41938b4bc4fd3  if-api-oci-digest-demo-source.tgz

Expected `sha256sum` (normalized output):

    861ea8326516b392470d292a824f93367c140c0ca9cab10d61c2b4adcec22871  resolved_event.json

---

## Output (normalized event envelope)

```json
{
  "event": "resolve",
  "input_sha256": "4f82d8b4e53c60110931b8ee6b90bdce3fe99675195957aad6f1ad1da2c95ccc",
  "integration": "oci.digest.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": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
      "metadata": {
        "media_type": "application/vnd.oci.image.manifest.v1+json",
        "repository": "example.com/demo/app",
        "size_bytes": 2048,
        "tag": "1.0.0"
      },
      "resolution_method": "synthetic-map",
      "scheme": "oci.digest",
      "status": "resolved",
      "target_url": "https://example.com/demo/app/manifests/sha256:1111111111111111111111111111111111111111111111111111111111111111"
    },
    {
      "identifier": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
      "metadata": {
        "media_type": "application/vnd.oci.image.manifest.v1+json",
        "repository": "example.com/demo/worker",
        "size_bytes": 4096,
        "tag": "2.0.0"
      },
      "resolution_method": "synthetic-map",
      "scheme": "oci.digest",
      "status": "resolved",
      "target_url": "https://example.com/demo/worker/manifests/sha256:2222222222222222222222222222222222222222222222222222222222222222"
    }
  ],
  "schema_version": "demo.v1"
}
```