{
  "id": "json-contract-negative-cases",
  "name": "Targeted JSON contract negative fixture composer",
  "description": "Compose invalid payloads from a caller-supplied valid seed with one structural edit, an exact target assertion and the complete bounded failed-assertion set.",
  "category": "api-assurance",
  "priceUsd": "0.005",
  "pricingStatus": "proposed-unverified",
  "pricing": {
    "unit": "one successful operation call",
    "proposedNominalUsd": "0.005",
    "sixDecimalTokenBaseUnits": "5000",
    "subscription": false,
    "includesPayerWalletOrNetworkFees": false,
    "liveQuoteVerified": false,
    "condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
  },
  "intents": [
    "generate targeted negative request payloads from a valid JSON seed and supported schema",
    "compose one-edit contract violations with checked constraint isolation"
  ],
  "whenToUse": [
    "generate targeted negative request payloads from a valid JSON seed and supported schema",
    "compose one-edit contract violations with checked constraint isolation"
  ],
  "whenNotToUse": [
    "Target rejection guarantees, expected HTTP status, fuzz attacks or a mutation-testing score",
    "A valid seed is missing or incompatible with the supported structural schema",
    "Arbitrary JSON Schema, formats, regexes, references, combinators, nested objects or nested arrays",
    "Executing target tests, fetching services, running supplied code or proving security"
  ],
  "capabilities": [
    "Caller-supplied seed works independently of the valid-fixture tool",
    "One inert JSON Patch per generated case, explicit assertion identities and complete failed-assertion manifests",
    "requireIsolated suppresses fixtures with additional failures; unavailable requests have explicit reasons",
    "Closed constructive-json-schema-v1 profile; unsupported keywords are rejected rather than ignored",
    "Networkless deterministic supplied-data computation; no target behavior or full input-space coverage claim",
    "Atomic complete bounded computation before the payment challenge; no partial packet on resource overflow"
  ],
  "limits": {
    "inputBytes": 100000,
    "outputBytes": 300000,
    "inputNodes": 12000,
    "outputNodes": 50000,
    "depth": 16,
    "schemaNodes": 80,
    "properties": 32,
    "enumMembers": 16,
    "arrayItems": 16,
    "stringLength": 256,
    "fixtures": 128,
    "goals": 512,
    "mutations": 64,
    "validatorNodeVisits": 50000,
    "candidateBytes": 2000000,
    "jsonNodes": 12000,
    "profile": "constructive-json-schema-v1"
  },
  "related": [
    "json-schema-fixtures-compose",
    "json-schema-check",
    "json-patch"
  ],
  "errorCodes": [
    "INPUT_LIMIT",
    "OUTPUT_LIMIT",
    "COMPLEXITY_LIMIT",
    "INVALID_JSON",
    "INVALID_NUMBER",
    "INVALID_UNICODE",
    "UNSAFE_KEY",
    "UNSUPPORTED_SCHEMA",
    "INVALID_SCHEMA",
    "SCHEMA_LIMIT",
    "WORK_LIMIT",
    "GOAL_LIMIT",
    "FIXTURE_LIMIT",
    "SEED_LIMIT",
    "INVALID_SEED",
    "DUPLICATE_ID",
    "INVALID_POINTER",
    "MUTATION_LIMIT",
    "INTERNAL_INVARIANT"
  ],
  "requirementsProfile": {
    "format": "declared-requirements-v1",
    "facts": {
      "execution.suppliedCode": false,
      "execution.remoteMutation": false,
      "execution.llmInference": false,
      "execution.paidMcp": false,
      "verification.semanticTruth": false,
      "verification.sourceAuthenticity": false,
      "verification.liveVulnerabilities": false,
      "numbers.arbitraryPrecisionJson": false,
      "numbers.model": "ieee754-binary64",
      "privacy.requestBodyPersisted": false,
      "execution.deterministic": true,
      "execution.networkAccess": false,
      "privacy.resultBodyPersisted": false,
      "payment.x402": true,
      "payment.mpp": true,
      "operation.id": "json-contract-negative-cases",
      "operation.category": "api-assurance",
      "limit.httpRequestBytes": 131072,
      "limit.requestBytes": 100000,
      "limit.responseBytes": 524288,
      "limit.resultBytes": 300000,
      "limit.jsonDepth": 16,
      "limit.jsonNodes": 12000,
      "testing.targetExecuted": false,
      "testing.behaviorVerified": false,
      "testing.bugFindingGuaranteed": false,
      "testing.externalHarnessAccess": false,
      "testing.generatedArtifactsAreInert": true,
      "negativeCases.profile": "constructive-json-schema-v1",
      "negativeCases.maxMutations": 64,
      "negativeCases.maxValidatorNodeVisits": 50000,
      "negativeCases.arbitraryJsonSchema": false,
      "negativeCases.validSeedRequired": true,
      "negativeCases.oneStructuralEditPerCase": true,
      "negativeCases.allProfileFailuresReported": true,
      "negativeCases.targetRejectionVerified": false,
      "negativeCases.isolationGuaranteed": false,
      "input.mutations.maxItems": 64,
      "input.mutations.minItems": 1
    },
    "unknownPolicy": "Undeclared requirements are unknown, never compatible. Matching declared facts does not establish semantic fit or input validity.",
    "preflight": "/preflight"
  },
  "documentation": "/reference/tools/json-contract-negative-cases.md",
  "serviceContract": "/reference/services/json-contract-negative-cases.json",
  "errors": [
    {
      "status": 400,
      "meaning": "Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch",
      "retry": "Correct the request before payment"
    },
    {
      "status": 402,
      "meaning": "Payment challenge or rejected payment",
      "retry": "Use official protocol SDK; inspect payment outcome before another payment"
    },
    {
      "status": 409,
      "meaning": "Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN",
      "retry": "Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay"
    },
    {
      "status": 413,
      "meaning": "Input or generated output too large",
      "retry": "Reduce input; no payment attempted for validation failure"
    },
    {
      "status": 415,
      "meaning": "Unsupported media type or compression",
      "retry": "Send uncompressed application/json"
    },
    {
      "status": 422,
      "meaning": "Schema or service-specific semantic validation failure",
      "retry": "Correct input using returned error code; no payment attempted"
    },
    {
      "status": 429,
      "meaning": "Request/payment-attempt rate exceeded",
      "retry": "Wait for rate limit window; preserve existing payment identity"
    },
    {
      "status": 503,
      "meaning": "Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement",
      "retry": "Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation"
    }
  ],
  "numericPrecision": "JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.",
  "paymentWorkflow": {
    "discoveryOnly": false,
    "supportedProtocols": [
      "x402",
      "mpp"
    ],
    "x402": {
      "credentialHeader": "PAYMENT-SIGNATURE",
      "challengeHeader": "PAYMENT-REQUIRED",
      "receiptHeader": "PAYMENT-RESPONSE",
      "version": 2,
      "scheme": "exact",
      "paymentIdentifier": "payment-identifier extension MUST equal the HTTP Idempotency-Key",
      "sdk": "@x402/core with @x402/evm"
    },
    "mpp": {
      "supported": true,
      "credentialHeader": "Authorization",
      "challengeHeader": "WWW-Authenticate",
      "receiptHeader": "Payment-Receipt",
      "method": "tempo",
      "intent": "charge",
      "sdk": "mppx",
      "tokenDecimals": 6
    },
    "steps": [
      "Check configured readiness and the exact service schema",
      "Generate a fresh random Idempotency-Key for this operation; never use a discovery probe fixture for purchases",
      "Send valid input without a credential to obtain the official protocol challenge",
      "Use the official SDK and authorized wallet to fulfill the challenge",
      "Retry only with identical key, body, protocol and credential",
      "On PAYMENT_UNCERTAIN stop and request operator reconciliation; never blindly pay again"
    ],
    "versionedRetries": "Request fingerprint includes service release version. Retries across a version upgrade can conflict; coordinate upgrades outside the 24-hour replay window and reconcile pending attempts.",
    "docs": "/llms.txt"
  },
  "method": "POST",
  "paths": {
    "x402": "/v1/x402/json-contract-negative-cases",
    "mpp": "/v1/mpp/json-contract-negative-cases"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "schema": {
        "$ref": "#/$defs/__schema0"
      },
      "seed": {
        "$ref": "#/$defs/__schema0"
      },
      "mutations": {
        "minItems": 1,
        "maxItems": 64,
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "path": {
                  "type": "string",
                  "maxLength": 1024
                },
                "requireIsolated": {
                  "default": false,
                  "type": "boolean"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "removeRequired",
                    "belowMinimum",
                    "aboveMaximum",
                    "shortenString",
                    "lengthenString",
                    "shortenArray",
                    "lengthenArray"
                  ]
                }
              },
              "required": [
                "id",
                "path",
                "kind"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "path": {
                  "type": "string",
                  "maxLength": 1024
                },
                "requireIsolated": {
                  "default": false,
                  "type": "boolean"
                },
                "kind": {
                  "type": "string",
                  "const": "replaceType"
                },
                "replacementType": {
                  "type": "string",
                  "enum": [
                    "null",
                    "boolean",
                    "integer",
                    "number",
                    "string",
                    "array",
                    "object"
                  ]
                }
              },
              "required": [
                "id",
                "path",
                "kind",
                "replacementType"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "path": {
                  "type": "string",
                  "maxLength": 1024
                },
                "requireIsolated": {
                  "default": false,
                  "type": "boolean"
                },
                "kind": {
                  "type": "string",
                  "const": "outsideEnum"
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "string",
                      "maxLength": 1024
                    }
                  ]
                }
              },
              "required": [
                "id",
                "path",
                "kind",
                "value"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "path": {
                  "type": "string",
                  "maxLength": 1024
                },
                "requireIsolated": {
                  "default": false,
                  "type": "boolean"
                },
                "kind": {
                  "type": "string",
                  "const": "addProperty"
                },
                "name": {
                  "type": "string",
                  "maxLength": 128
                }
              },
              "required": [
                "id",
                "path",
                "kind",
                "name"
              ],
              "additionalProperties": false
            }
          ]
        }
      }
    },
    "required": [
      "schema",
      "seed",
      "mutations"
    ],
    "additionalProperties": false,
    "$defs": {
      "__schema0": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema0"
            }
          },
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/$defs/__schema0"
            }
          }
        ]
      }
    }
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "operation",
      "version",
      "result",
      "provenance"
    ],
    "properties": {
      "operation": {
        "const": "json-contract-negative-cases",
        "type": "string"
      },
      "version": {
        "const": "0.29.0",
        "type": "string"
      },
      "result": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "profile": {
            "type": "string",
            "const": "constructive-json-schema-v1"
          },
          "status": {
            "type": "string",
            "const": "complete"
          },
          "cases": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "generated",
                    "unavailable"
                  ]
                },
                "value": {
                  "$ref": "#/properties/result/$defs/__schema0"
                },
                "patch": {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "op": {
                              "type": "string",
                              "const": "remove"
                            },
                            "path": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "op",
                            "path"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "op": {
                              "type": "string",
                              "enum": [
                                "add",
                                "replace"
                              ]
                            },
                            "path": {
                              "type": "string"
                            },
                            "value": {
                              "$ref": "#/properties/result/$defs/__schema0"
                            }
                          },
                          "required": [
                            "op",
                            "path",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "target": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "keyword": {
                          "type": "string",
                          "enum": [
                            "type",
                            "const",
                            "enum",
                            "minimum",
                            "maximum",
                            "minLength",
                            "maxLength",
                            "minItems",
                            "maxItems",
                            "required",
                            "additionalProperties"
                          ]
                        },
                        "schemaPath": {
                          "type": "string"
                        },
                        "instancePath": {
                          "type": "string"
                        },
                        "property": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "keyword",
                        "schemaPath",
                        "instancePath",
                        "property"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "failures": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "keyword": {
                        "type": "string",
                        "enum": [
                          "type",
                          "const",
                          "enum",
                          "minimum",
                          "maximum",
                          "minLength",
                          "maxLength",
                          "minItems",
                          "maxItems",
                          "required",
                          "additionalProperties"
                        ]
                      },
                      "schemaPath": {
                        "type": "string"
                      },
                      "instancePath": {
                        "type": "string"
                      },
                      "property": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "keyword",
                      "schemaPath",
                      "instancePath",
                      "property"
                    ],
                    "additionalProperties": false
                  }
                },
                "isolated": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "status",
                "patch",
                "target",
                "failures",
                "isolated",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "testing": {
            "type": "object",
            "properties": {
              "targetExecuted": {
                "type": "boolean",
                "const": false
              },
              "behaviorVerified": {
                "type": "boolean",
                "const": false
              },
              "fullInputSpaceCoverage": {
                "type": "boolean",
                "const": false
              }
            },
            "required": [
              "targetExecuted",
              "behaviorVerified",
              "fullInputSpaceCoverage"
            ],
            "additionalProperties": false
          },
          "metrics": {
            "type": "object",
            "properties": {
              "schemaNodes": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "validatorNodeVisits": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "schemaNodes",
              "validatorNodeVisits"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "profile",
          "status",
          "cases",
          "testing",
          "metrics"
        ],
        "additionalProperties": false,
        "$defs": {
          "__schema0": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/properties/result/$defs/__schema0"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/properties/result/$defs/__schema0"
                }
              }
            ]
          }
        }
      },
      "provenance": {
        "type": "object",
        "required": [
          "inputSha256",
          "outputSha256",
          "deterministic",
          "externalRequests"
        ],
        "properties": {
          "inputSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "outputSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "deterministic": {
            "const": true
          },
          "externalRequests": {
            "const": 0
          }
        }
      }
    },
    "additionalProperties": false
  },
  "exampleInput": {
    "schema": {
      "type": "object",
      "required": [
        "count",
        "mode"
      ],
      "properties": {
        "count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3
        },
        "mode": {
          "type": "string",
          "enum": [
            "fast",
            "safe"
          ]
        }
      },
      "additionalProperties": false
    },
    "seed": {
      "count": 1,
      "mode": "fast"
    },
    "mutations": [
      {
        "id": "missing",
        "kind": "removeRequired",
        "path": "/count",
        "requireIsolated": true
      },
      {
        "id": "small",
        "kind": "belowMinimum",
        "path": "/count",
        "requireIsolated": true
      },
      {
        "id": "large",
        "kind": "aboveMaximum",
        "path": "/count",
        "requireIsolated": true
      },
      {
        "id": "enum",
        "kind": "outsideEnum",
        "path": "/mode",
        "value": "other",
        "requireIsolated": true
      },
      {
        "id": "extra",
        "kind": "addProperty",
        "path": "",
        "name": "extra",
        "requireIsolated": true
      }
    ]
  },
  "exampleResponse": {
    "operation": "json-contract-negative-cases",
    "version": "0.29.0",
    "result": {
      "profile": "constructive-json-schema-v1",
      "status": "complete",
      "cases": [
        {
          "id": "missing",
          "kind": "removeRequired",
          "status": "generated",
          "value": {
            "mode": "fast"
          },
          "patch": {
            "op": "remove",
            "path": "/count"
          },
          "target": {
            "keyword": "required",
            "schemaPath": "/required/0",
            "instancePath": "",
            "property": "count"
          },
          "failures": [
            {
              "keyword": "required",
              "schemaPath": "/required/0",
              "instancePath": "",
              "property": "count"
            }
          ],
          "isolated": true,
          "reason": null
        },
        {
          "id": "small",
          "kind": "belowMinimum",
          "status": "generated",
          "value": {
            "count": 0,
            "mode": "fast"
          },
          "patch": {
            "op": "replace",
            "path": "/count",
            "value": 0
          },
          "target": {
            "keyword": "minimum",
            "schemaPath": "/properties/count/minimum",
            "instancePath": "/count",
            "property": null
          },
          "failures": [
            {
              "keyword": "minimum",
              "schemaPath": "/properties/count/minimum",
              "instancePath": "/count",
              "property": null
            }
          ],
          "isolated": true,
          "reason": null
        },
        {
          "id": "large",
          "kind": "aboveMaximum",
          "status": "generated",
          "value": {
            "count": 4,
            "mode": "fast"
          },
          "patch": {
            "op": "replace",
            "path": "/count",
            "value": 4
          },
          "target": {
            "keyword": "maximum",
            "schemaPath": "/properties/count/maximum",
            "instancePath": "/count",
            "property": null
          },
          "failures": [
            {
              "keyword": "maximum",
              "schemaPath": "/properties/count/maximum",
              "instancePath": "/count",
              "property": null
            }
          ],
          "isolated": true,
          "reason": null
        },
        {
          "id": "enum",
          "kind": "outsideEnum",
          "status": "generated",
          "value": {
            "count": 1,
            "mode": "other"
          },
          "patch": {
            "op": "replace",
            "path": "/mode",
            "value": "other"
          },
          "target": {
            "keyword": "enum",
            "schemaPath": "/properties/mode/enum",
            "instancePath": "/mode",
            "property": null
          },
          "failures": [
            {
              "keyword": "enum",
              "schemaPath": "/properties/mode/enum",
              "instancePath": "/mode",
              "property": null
            }
          ],
          "isolated": true,
          "reason": null
        },
        {
          "id": "extra",
          "kind": "addProperty",
          "status": "generated",
          "value": {
            "count": 1,
            "mode": "fast",
            "extra": null
          },
          "patch": {
            "op": "add",
            "path": "/extra",
            "value": null
          },
          "target": {
            "keyword": "additionalProperties",
            "schemaPath": "/additionalProperties",
            "instancePath": "",
            "property": "extra"
          },
          "failures": [
            {
              "keyword": "additionalProperties",
              "schemaPath": "/additionalProperties",
              "instancePath": "",
              "property": "extra"
            }
          ],
          "isolated": true,
          "reason": null
        }
      ],
      "testing": {
        "targetExecuted": false,
        "behaviorVerified": false,
        "fullInputSpaceCoverage": false
      },
      "metrics": {
        "schemaNodes": 3,
        "validatorNodeVisits": 17
      }
    },
    "provenance": {
      "inputSha256": "92b1781c5d4fb22662c0f3b12949608d22c2d3049848b4f4578d94b179aebd08",
      "outputSha256": "c7d676c4af4f285bf4b45d99110910f7d394a6bdf6c8490543577d7cc0651ac9",
      "deterministic": true,
      "externalRequests": 0
    }
  },
  "requiredHeaders": {
    "Content-Type": "application/json",
    "Idempotency-Key": "random 16–128 character operation identifier"
  },
  "fixedExample": "/reference/examples/json-contract-negative-cases.json",
  "execution": {
    "deterministic": true,
    "externalRequests": 0,
    "maxExternalRequests": 0,
    "resultSnapshotPersisted": false,
    "fixedExampleIsIllustrativeSnapshot": false,
    "requiresPayment": true,
    "supportsMcpExecution": false
  },
  "releaseSnapshot": {
    "format": "static-release-reference-v1",
    "sourceVersion": "0.29.0",
    "sourceRegistrySha256": "a2b5ec09bf6c38b9d2879d746a4fded374f5928b445377b0270ef6aa8e6cac65",
    "generatedAt": "2026-10-06T15:38:00Z",
    "releaseAcceptance": "not-verified-by-generator",
    "runtimeReadiness": "not-evaluated",
    "livePaymentsVerified": false,
    "indexingVerified": false,
    "apiOrigin": null,
    "notice": "Build-time release reference. Runtime readiness, deployment, payment settlement and external indexing are not evaluated here. Prices are proposed; this file cannot authorize execution or payment."
  }
}
