Skip to content

Broaden REG-012 type field validation to accept common variants #7

Description

@a6b8

Problem

The RegistrationValidator only accepts one exact value for the type field:

const SPEC_TYPE_VALUE = 'https://eips.ethereum.org/EIPS/eip-8004#registration-v1'

Any deviation triggers REG-012: Invalid value "..." (expected "...").

Impact

5,672 REG-012 errors across all datasets, but many are clearly intended to reference ERC-8004.

On-chain type values found:

Value Count Assessment
https://eips.ethereum.org/EIPS/eip-8004#registration-v1 (valid) Exact match
https://eips.ethereum.org/EIPs/eip-8004#registration-v1 1,000 Case difference in path (EIPs vs EIPS)
https://eips.ethereum.org/EIPS/eip-8004#registration 1,978 Missing -v1 suffix
erc8004-agent-registration-v1 561 Short form identifier
https://eips.ethereum.org/EIPS/eip-8004 105 Missing fragment
user 2,156 Non-standard (probably OpenClaw default)
AgentRegistration 8 Non-standard
Various typos ~15 Typos in URL (ethereem, RIPS, EIP)

Required Changes

In RegistrationValidator.mjs:

  1. Keep strict validation for the exact SPEC_TYPE_VALUE — this is what status: true requires
  2. Add specific messages for recognizable variants:
    • Case-insensitive match → REG-012a: Type URL has incorrect casing (expected "...EIPS..." got "...EIPs...")
    • Missing -v1REG-012b: Type URL missing version fragment "#registration-v1"
    • Short form erc8004-agent-registration-v1REG-012c: Uses short-form type identifier instead of full URL
    • Just the base URL without fragment → REG-012d: Type URL missing fragment "#registration-v1"

This gives better diagnostics without accepting incorrect values as valid.

Validation Data

Validated against ~69,000 Dune-downloaded on-chain registration events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions