amduat/tests/fixtures/conformance/manifest.schema.md
Carl Niklas Rydberg 3473b19425 trow AI at it.
2026-02-22 00:25:56 +01:00

2.3 KiB

Conformance Fixture Manifests

This directory contains small, canonical fixture sets used by conformance tests. Each fixture set publishes a JSON manifest with deterministic ordering.

Common rules

  • JSON must be UTF-8, no comments.
  • Arrays are ordered and MUST be in canonical order as specified by the schema.
  • Artifact references use the canonical ReferenceBytes hex encoding when present (lowercase hex, no 0x prefix).
  • sha256 fields are lowercase hex of the raw bytes.

Schema: amduat.conformance.fixtures.v0

Used by simple ASL/1-STORE byte fixtures (e.g. asl_put_get).

{
  "schema": "amduat.conformance.fixtures.v0",
  "fixtures": [
    {
      "id": "string",
      "artifact": "relative/path.bin",
      "size": "0",
      "sha256": "hex",
      "notes": "optional string"
    }
  ]
}

Rules:

  • fixtures MUST be sorted by ascending id.
  • artifact is a path relative to the manifest file.
  • size is the byte length of the artifact file encoded as a decimal string.
  • sha256 is the digest of the artifact file contents.

Schema: amduat.conformance.tgk_edges.v0

Used by TGK edge fixture sets.

{
  "schema": "amduat.conformance.tgk_edges.v0",
  "edges": [
    {
      "id": "string",
      "type": 0,
      "from": ["refhex"],
      "to": ["refhex"],
      "payload": "hex",
      "notes": "optional string"
    }
  ]
}

Rules:

  • edges MUST be sorted by ascending id.
  • from/to are lists of ReferenceBytes hex (lowercase).
  • payload is hex-encoded edge payload bytes (lowercase).

Schema: amduat.conformance.fps.v0

Used by FPS/1 primitive conformance vectors.

{
  "schema": "amduat.conformance.fps.v0",
  "cases": [
    {
      "id": "string",
      "op": "slice|concat|reverse|splice",
      "input": "hex",
      "inputs": ["hex"],
      "insert": "hex",
      "offset": 0,
      "length": 0,
      "level": "bit|byte|word|long",
      "output": "hex",
      "cid_sha256": "hex"
    }
  ]
}

Rules:

  • cases MUST be sorted by ascending id.
  • input is used for unary operations.
  • inputs is used for concat.
  • insert is used for splice.
  • offset and length are required for slice and splice.
  • level is required for reverse.
  • output is the expected output payload bytes.
  • cid_sha256 is SHA-256("CAS:OBJ\\0" || output) in lowercase hex.