{
  "$schema": "https://universalpaper.org/research/schema/0/entry.schema.json",
  "format": "up-research/entry/0",
  "number": 3,
  "kind": "reusable",
  "slug": "query-test-vectors",
  "title": "A query manifest and three traces",
  "summary": "The example manifest and its three traces as separate files, each with its fingerprint, for testing an engine or a fingerprint routine.",
  "status": "exploring",
  "topics": [
    "queries",
    "fingerprints",
    "engines"
  ],
  "language_change": "none",
  "built_on": [
    "simulate_eligibility",
    "derive_state",
    "simulate_amendment",
    "hash_object"
  ],
  "published": "2026-11-27",
  "updated": "2026-11-29",
  "parent": 1,
  "related": [
    2
  ],
  "simulated": true,
  "license": "CC0-1.0",
  "url": "https://universalpaper.org/research/query-test-vectors/",
  "markdown": "https://universalpaper.org/research/query-test-vectors.md",
  "json": "https://universalpaper.org/research/query-test-vectors/entry.json",
  "notice": "Research is not part of the Universal Paper language. It may grow, change, or be withdrawn. Agreements do not depend on it.",
  "detail": {
    "files": [
      {
        "name": "manifest.json",
        "url": "https://universalpaper.org/research/query-test-vectors/manifest.json",
        "media_type": "application/json",
        "describes": "The example manifest: three named questions about one agreement, Master X.",
        "format": "up-research/query-manifest/0",
        "schema": "https://universalpaper.org/research/schema/0/query-manifest.schema.json",
        "fingerprint": "sha256:44bb1bb2ebbbd0bd3e05f9c3f7b539c5057b43d194f56a027d458167d3d293ae",
        "bytes": 2163,
        "license": "CC0-1.0",
        "simulated": true
      },
      {
        "name": "trace-eligibility.json",
        "url": "https://universalpaper.org/research/query-test-vectors/trace-eligibility.json",
        "media_type": "application/json",
        "describes": "One answer to: Is this member covered by this agreement at this time?",
        "format": "up-research/query-trace/0",
        "schema": "https://universalpaper.org/research/schema/0/query-trace.schema.json",
        "fingerprint": "sha256:0da4824fb755d7c1acb3a7b85c21a11a063db5666adac06ac333fd057e262e38",
        "bytes": 1208,
        "license": "CC0-1.0",
        "simulated": true
      },
      {
        "name": "trace-fee.json",
        "url": "https://universalpaper.org/research/query-test-vectors/trace-fee.json",
        "media_type": "application/json",
        "describes": "One answer to: What administrative fee is owed under this agreement at this time, and has it been paid?",
        "format": "up-research/query-trace/0",
        "schema": "https://universalpaper.org/research/schema/0/query-trace.schema.json",
        "fingerprint": "sha256:c398d0b7052d0c4ee706011a41363091198a66a3c2906ba1130ceb97d52326d0",
        "bytes": 1853,
        "license": "CC0-1.0",
        "simulated": true
      },
      {
        "name": "trace-amendment.json",
        "url": "https://universalpaper.org/research/query-test-vectors/trace-amendment.json",
        "media_type": "application/json",
        "describes": "One answer to: Would this fee rate be accepted if the aggregator's agent proposed it under its Mandate?",
        "format": "up-research/query-trace/0",
        "schema": "https://universalpaper.org/research/schema/0/query-trace.schema.json",
        "fingerprint": "sha256:5210769fdb99b09fe422cc202350117c5f77b369d1258a211029769558eee6df",
        "bytes": 1001,
        "license": "CC0-1.0",
        "simulated": true
      }
    ],
    "schemas": [
      "https://universalpaper.org/research/schema/0/query-manifest.schema.json",
      "https://universalpaper.org/research/schema/0/query-trace.schema.json"
    ],
    "use": [
      {
        "title": "Check your fingerprint code",
        "text": "Canonicalize each file (RFC 8785), hash it with SHA-256, and compare with the fingerprint listed beside it."
      },
      {
        "title": "Check your engine",
        "text": "Load the source bundle, run the call a trace names with the inputs it lists, trim the answer as the next item says, and compare your verdict and state fingerprints with the trace."
      },
      {
        "title": "Trim the answer",
        "text": "A verdict keeps only part of the engine's answer. `simulate_eligibility`: keep `eligible`, and for each participation keep `chain` and `parent` as ChainIds, `status` and `tier`. `derive_state`: keep the obligations of the chain the manifest names (found by its ChainId in `validate_bundle`) whose `clause` is the one the question reads, each without its `chain` key. `simulate_amendment`: keep `accepted` and `change`, and keep `failed_checks` as `failed`, with only `rule` and `label` for each. The trace's `state` lists the ChainId and state fingerprint of the manifest's agreement, then of each participation the verdict names."
      },
      {
        "title": "Check a format",
        "text": "Validate the manifest and the traces against the two schemas."
      }
    ],
    "source": {
      "bundle": "examples/generative/bundle.json",
      "url": "https://github.com/Uppercentile/universal-paper/blob/main/examples/generative/bundle.json",
      "license": "CC0-1.0"
    }
  },
  "refs": [
    {
      "number": 1,
      "kind": "note",
      "title": "Agreements as query surfaces",
      "status": "exploring",
      "relation": "parent",
      "url": "https://universalpaper.org/research/query-surfaces/",
      "json": "https://universalpaper.org/research/query-surfaces/entry.json"
    },
    {
      "number": 2,
      "kind": "experiment",
      "title": "Three traces, recomputed",
      "status": "concluded",
      "relation": "related",
      "url": "https://universalpaper.org/research/three-traces-recomputed/",
      "json": "https://universalpaper.org/research/three-traces-recomputed/entry.json"
    }
  ]
}
