{
  "tool_id": "art-393-x402-v2-migration-linter",
  "note": "X402LINT-FIX-1: covers the NaN crash class (protocol_version coercion at declaredVersion + output_payload.declared_protocol_version, both routed through parseProtocolVersion now). Vectors: absent (baseline, unchanged behaviour), numeric, v-prefixed string x2, and an unparseable string that must refuse cleanly (error finding + X402_PROTOCOL_VERSION_UNPARSEABLE flag) rather than crash.",
  "vectors": [
    {
      "name": "absent_protocol_version",
      "policy_parameters": {},
      "output_payload": {
        "protocol_version": 2,
        "declared_protocol_version": null,
        "inferred_wire_version": 1,
        "deprecated_headers_found": [],
        "v2_headers_found": [],
        "score": 85,
        "errors": 1,
        "warnings": 0,
        "passes": 0,
        "findings": [
          { "level": "error", "msg": "No x402 headers or body supplied — nothing to lint." }
        ],
        "spec_note": "Pinned to x402 Protocol Version 2 (coinbase/x402 specs/x402-specification-v2.md, 2025-12-09). Header/body deltas checked here only; scheme and asset registries are plugins and are not hard-coded — verify against the current x402 scheme registry before relying on a scheme/network pass."
      },
      "compliance_flags": ["X402_V2_MIGRATION_CHECKED", "X402_WIRE_V1"],
      "golden_hash": "36ce2fadacfc11f3e980378c902cda2634ad8345eb18a70625f40f9ad1663fd6"
    },
    {
      "name": "numeric_2",
      "policy_parameters": { "protocol_version": 2 },
      "output_payload": {
        "protocol_version": 2,
        "declared_protocol_version": 2,
        "inferred_wire_version": 1,
        "deprecated_headers_found": [],
        "v2_headers_found": [],
        "score": 81,
        "errors": 1,
        "warnings": 1,
        "passes": 0,
        "findings": [
          { "level": "warn", "msg": "Declared protocol_version (2) does not match wire evidence (inferred v1)." },
          { "level": "error", "msg": "No x402 headers or body supplied — nothing to lint." }
        ],
        "spec_note": "Pinned to x402 Protocol Version 2 (coinbase/x402 specs/x402-specification-v2.md, 2025-12-09). Header/body deltas checked here only; scheme and asset registries are plugins and are not hard-coded — verify against the current x402 scheme registry before relying on a scheme/network pass."
      },
      "compliance_flags": ["X402_V2_MIGRATION_CHECKED", "X402_WIRE_V1"],
      "golden_hash": "edbe4422dc64153ee65cb55ab9f50e735924690c00c56c8d24cd44a119a477df"
    },
    {
      "name": "v_prefixed_v1",
      "policy_parameters": { "protocol_version": "v1" },
      "output_payload": {
        "protocol_version": 2,
        "declared_protocol_version": 1,
        "inferred_wire_version": 1,
        "deprecated_headers_found": [],
        "v2_headers_found": [],
        "score": 85,
        "errors": 1,
        "warnings": 0,
        "passes": 0,
        "findings": [
          { "level": "error", "msg": "No x402 headers or body supplied — nothing to lint." }
        ],
        "spec_note": "Pinned to x402 Protocol Version 2 (coinbase/x402 specs/x402-specification-v2.md, 2025-12-09). Header/body deltas checked here only; scheme and asset registries are plugins and are not hard-coded — verify against the current x402 scheme registry before relying on a scheme/network pass."
      },
      "compliance_flags": ["X402_V2_MIGRATION_CHECKED", "X402_WIRE_V1"],
      "golden_hash": "16024ef654fd0d5b5c5bc4d82942205290c2c974b1aec8e271fb2e75a9c96dbd"
    },
    {
      "name": "v_prefixed_v2",
      "policy_parameters": { "protocol_version": "v2" },
      "output_payload": {
        "protocol_version": 2,
        "declared_protocol_version": 2,
        "inferred_wire_version": 1,
        "deprecated_headers_found": [],
        "v2_headers_found": [],
        "score": 81,
        "errors": 1,
        "warnings": 1,
        "passes": 0,
        "findings": [
          { "level": "warn", "msg": "Declared protocol_version (2) does not match wire evidence (inferred v1)." },
          { "level": "error", "msg": "No x402 headers or body supplied — nothing to lint." }
        ],
        "spec_note": "Pinned to x402 Protocol Version 2 (coinbase/x402 specs/x402-specification-v2.md, 2025-12-09). Header/body deltas checked here only; scheme and asset registries are plugins and are not hard-coded — verify against the current x402 scheme registry before relying on a scheme/network pass."
      },
      "compliance_flags": ["X402_V2_MIGRATION_CHECKED", "X402_WIRE_V1"],
      "golden_hash": "d818d3e6618b3e7bd4ec8c8ca94a61627477c23ff791590a7c0f7229f7f51a01"
    },
    {
      "name": "unparseable_version",
      "policy_parameters": { "protocol_version": "garbage-xyz" },
      "output_payload": {
        "protocol_version": 2,
        "declared_protocol_version": null,
        "inferred_wire_version": 1,
        "deprecated_headers_found": [],
        "v2_headers_found": [],
        "score": 70,
        "errors": 2,
        "warnings": 0,
        "passes": 0,
        "findings": [
          { "level": "error", "msg": "protocol_version \"garbage-xyz\" could not be parsed as a version number (expected e.g. 2 or \"v2\") — treating as unspecified." },
          { "level": "error", "msg": "No x402 headers or body supplied — nothing to lint." }
        ],
        "spec_note": "Pinned to x402 Protocol Version 2 (coinbase/x402 specs/x402-specification-v2.md, 2025-12-09). Header/body deltas checked here only; scheme and asset registries are plugins and are not hard-coded — verify against the current x402 scheme registry before relying on a scheme/network pass."
      },
      "compliance_flags": ["X402_V2_MIGRATION_CHECKED", "X402_WIRE_V1", "X402_PROTOCOL_VERSION_UNPARSEABLE"],
      "golden_hash": "dbbf400b2fd963adfa353add518426af1523a65f7b07f08330cd45354647eb64"
    }
  ]
}
