# Rust macro_rules Token-Tree Repetition Binding Expansion Verifier

> Rust macro_rules Token-Tree Repetition Binding Expansion Verifier is a paid API for AI agents from detect.halowerk.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-04).

Matches ordered bounded macro_rules token-tree arms, reconstructs the hygienically tagged structural transcription, and verifies the result against a claimed SHA256 hash.

## Facts

- Endpoint: POST https://detect.halowerk.com/v1/F-TD2000-DOCUMENTS-15/rust185-macro-rules-token-tree-repetition-binding-expansion?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rust-macro-rules-token-tree-repetition-binding-expansion-verifier-f98ee189
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L5zMOUJzLQka8W0QrXPta

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability rust-macro-rules-token-tree-repetition-binding-expansion-verifier-f98ee189 -d '<json body>'
```

Example prompt: I have a Rust macro_rules definition with token-tree arms including repeat nodes using the '+' operator — can you match the arms in order, reconstruct the full hygienically tagged structural transcription, and confirm it matches the SHA256 hash I'm claiming?

## When to prefer this

Use this endpoint when you need to verify that a Rust macro_rules token-tree expansion — including repetition bindings with operators like *, +, or ? — is correctly reconstructed with proper hygiene tagging and that its SHA256 matches a known-good value. It is specifically suited for Rust compiler tooling, macro correctness audits, and CI pipelines that need deterministic, cryptographically verifiable macro expansion results rather than general-purpose code analysis.

## Known failure modes

- Arm matching failure when token-tree arms are not ordered correctly or no arm matches the input
- Hygiene tagging mismatch causing transcription reconstruction to differ from expected
- SHA256 verification failure when the reconstructed transcription does not match the claimed hash
- Schema validation error if node IDs violate the naming pattern or required fields are missing
- Repetition body exceeds maxItems (32) or children array exceeds maxItems (64)
- Invalid separator or operator enum value causing rejection

## How this service works

Match ordered bounded macro_rules token-tree arms and reconstruct the complete hygienically tagged structural transcription.. Compare the complete typed result SHA256.

## Output

The endpoint returns the fully reconstructed hygienically tagged structural transcription of the matched macro_rules token-tree arms along with a verification status indicating whether the SHA256 of the transcription matches the claimed hash. It includes typed node outputs for groups, literals, and repetitions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "artifact": {
   "type": "object",
   "$defs": {
    "a": {
     "type": "string",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$",
     "maxLength": 48,
     "minLength": 1
    },
    "b": {
     "type": "object",
     "required": [
      "kind",
      "id",
      "delimiter",
      "children"
     ],
     "properties": {
      "id": {
       "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/a"
      },
      "kind": {
       "const": "group"
      },
      "children": {
       "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/c"
      },
      "delimiter": {
       "enum": [
        "paren",
        "brace",
        "bracket"
       ]
      }
     },
     "additionalProperties": false
    },
    "c": {
     "type": "array",
     "items": {
      "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/a"
     },
     "maxItems": 64
    },
    "d": {
     "type": "object",
     "required": [
      "kind",
      "id",
      "category",
      "text"
     ],
     "properties": {
      "id": {
       "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/a"
      },
      "kind": {
       "const": "literal"
      },
      "text": {
       "type": "string",
       "maxLength": 128,
       "minLength": 1
      },
      "category": {
       "enum": [
        "ident",
        "literal",
        "punct"
       ]
      }
     },
     "additionalProperties": false
    },
    "e": {
     "type": "object",
     "required": [
      "kind",
      "id",
      "body",
      "operator",
      "separator"
     ],
     "properties": {
      "id": {
       "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/a"
      },
      "body": {
       "type": "array",
       "items": {
        "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/a"
       },
       "maxItems": 32
      },
      "kind": {
       "const": "repeat"
      },
      "operator": {
       "enum": [
        "*",
        "+",
        "?"
       ]
      },
      "separator": {
       "type": [
        "object",
        "null"
       ],
       "required": [
        "category",
        "text"
       ],
       "properties": {
        "text": {
         "type": "string",
         "maxLength": 128,
         "minLength": 1
        },
        "category": {
         "enum": [
          "ident",
          "literal",
          "punct"
         ]
        }
       },
       "
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rust-macro-rules-token-tree-repetition-binding-expansion-verifier-f98ee189/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from detect.halowerk.com](https://www.zero.xyz/host/detect.halowerk.com/llms.txt)
