ContractCases: success checks

Created by: AgentToolbox (first-party).
Version: 0.1.1. Beta.

Cost: from $0.01 USDC per published success. At least one valid boundary case and one negative case failing exactly its intended keyword and instance; every case revalidated against the complete accepted schema. Coverage gaps explicit; not certification.

These are paid-outcome checks, not a guarantee of usefulness, truth, certification or exhaustive coverage. Read the scope and failure policy in the tool guide. A qualifying negative verdict can still be a successful paid result.

Verify the current contract

Canonical checks JSON · Minimum payment challenge · Exact buyer procedure

Re-fetch the current JSON before authorizing. Hash its decoded canonical_json UTF-8 bytes, with no trailing newline, and compare sha256. The display below comes from the same published contract; a saved page is not a payment authorization.

```json
{
  "canonicalization": {
    "id": "agenttoolbox-json-v1",
    "encoding": "UTF-8 without BOM or trailing newline",
    "object_keys": "Recursively sorted by unsigned UTF-16 code units (ECMAScript default string sort).",
    "arrays": "Preserve order; no holes or additional properties.",
    "strings": "ECMAScript JSON.stringify escaping; reject lone UTF-16 surrogates; no Unicode normalization.",
    "numbers": "Finite IEEE-754 binary64 only; ECMAScript JSON.stringify serialization, including -0 as 0. Monetary atomic units remain decimal strings.",
    "values": "JSON null, booleans, strings, finite numbers, arrays and plain objects only. Reject undefined, functions, symbols, bigint, accessors, cycles and non-enumerable object properties.",
    "whitespace": "No insignificant whitespace.",
    "payment_requirements": "Hash the complete PaymentRequirements object in accepts, including extra. Preserve address/string case and array order; do not hash the challenge envelope, header base64 or payment signature."
  },
  "canonical_json": "{\"criteria\":{\"criteria_version\":\"1\",\"evaluation\":\"Output must pass the published output_schema, then every predicate below. These expressions are also evaluated by the server handler.\",\"failure\":{\"before_settlement\":[\"invalid_input\",\"output_schema_invalid\",\"predicate_false\",\"execution_error\",\"output_bound_exceeded\",\"durable_result_write_failed\"],\"settlement\":\"One attempt only after durable validated output; unknown or unconfirmed settlement withholds output and requires reconciliation.\"},\"rule_language\":\"agenttoolbox-predicate-v1\",\"rules\":[{\"id\":\"positive_count_matches_cases\",\"test\":{\"eq\":[{\"path\":\"summary.positive_cases\"},{\"count_where\":{\"as\":\"case\",\"source\":{\"path\":\"cases\"},\"test\":{\"eq\":[{\"path\":\"case.kind\"},\"positive_boundary\"]}}}]}},{\"id\":\"negative_count_matches_cases\",\"test\":{\"eq\":[{\"path\":\"summary.negative_cases\"},{\"count_where\":{\"as\":\"case\",\"source\":{\"path\":\"cases\"},\"test\":{\"eq\":[{\"path\":\"case.kind\"},\"negative_mutation\"]}}}]}},{\"id\":\"coverage_gaps_counted\",\"test\":{\"eq\":[{\"path\":\"summary.coverage_gaps\"},{\"add\":[{\"count\":{\"path\":\"coverage_gaps\"}},{\"path\":\"coverage_gaps_omitted\"}]}]}},{\"id\":\"every_case_revalidated_at_intended_location\",\"test\":{\"every\":{\"as\":\"case\",\"source\":{\"path\":\"cases\"},\"test\":{\"if\":[{\"eq\":[{\"path\":\"case.kind\"},\"positive_boundary\"]},{\"and\":[{\"eq\":[{\"path\":\"case.expected_verdict\"},\"valid\"]},{\"eq\":[{\"path\":\"case.validation.valid\"},true]},{\"eq\":[{\"count\":{\"path\":\"case.validation.errors\"}},0]}]},{\"and\":[{\"eq\":[{\"path\":\"case.expected_verdict\"},\"invalid\"]},{\"eq\":[{\"path\":\"case.validation.valid\"},false]},{\"eq\":[{\"count\":{\"path\":\"case.validation.errors\"}},1]},{\"eq\":[{\"path\":\"case.validation.errors.0.schema_pointer\"},{\"path\":\"case.schema_pointer\"}]},{\"eq\":[{\"path\":\"case.validation.errors.0.keyword\"},{\"path\":\"case.keyword\"}]},{\"eq\":[{\"path\":\"case.validation.errors.0.instance_pointer\"},{\"path\":\"case.instance_pointer\"}]}]}]}}}},{\"id\":\"product_output_byte_bound\",\"test\":{\"lte\":[{\"json_bytes\":{\"path\":\"$\"}},14000]}}],\"scope\":\"Deterministic bounded checks, not usefulness, truth, certification or independent live-payment proof.\"},\"format\":\"agenttoolbox-success-contract-v1\",\"input_schema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"additionalProperties\":false,\"properties\":{\"max_cases\":{\"default\":12,\"maximum\":24,\"minimum\":2,\"type\":\"integer\"},\"schema\":{\"additionalProperties\":{},\"description\":\"Explicit $schema=https://json-schema.org/draft/2020-12/schema required. Bounded subset; every schema node needs a single type. No references, patterns, formats or composition.\",\"propertyNames\":{\"type\":\"string\"},\"type\":\"object\"},\"valid_example\":{}},\"required\":[\"schema\",\"valid_example\",\"max_cases\"],\"type\":\"object\"},\"limits\":{\"array_items\":16,\"candidates\":160,\"cases\":24,\"instance_depth\":8,\"instance_nodes\":128,\"number_magnitude\":1000000000,\"output_bytes\":14000,\"properties_per_object\":25,\"schema_bytes\":8192,\"schema_depth\":3,\"schema_nodes\":64,\"seed_bytes\":2048,\"string_length\":128,\"subset\":{\"annotations\":[\"$schema\",\"title\",\"description\"],\"dialect\":\"2020-12 bounded subset\",\"keywords\":[\"type\",\"enum\",\"const\",\"properties\",\"required\",\"additionalProperties\",\"items\",\"minItems\",\"maxItems\",\"minLength\",\"maxLength\",\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],\"types\":[\"object\",\"array\",\"string\",\"number\",\"integer\",\"boolean\",\"null\"],\"unsupported\":[\"references\",\"composition\",\"type unions\",\"boolean schemas\",\"pattern\",\"format\",\"multipleOf\",\"unevaluated keywords\",\"remote resources\"]},\"total_properties\":25},\"output_schema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"additionalProperties\":false,\"properties\":{\"cases\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"expected_verdict\":{\"enum\":[\"valid\",\"invalid\"],\"type\":\"string\"},\"id\":{\"maxLength\":12,\"type\":\"string\"},\"instance_pointer\":{\"maxLength\":2048,\"type\":\"string\"},\"keyword\":{\"maxLength\":32,\"type\":\"string\"},\"kind\":{\"enum\":[\"positive_boundary\",\"negative_mutation\"],\"type\":\"string\"},\"schema_pointer\":{\"maxLength\":2048,\"type\":\"string\"},\"validation\":{\"additionalProperties\":false,\"properties\":{\"checked_assertions\":{\"exclusiveMinimum\":0,\"maximum\":9007199254740991,\"type\":\"integer\"},\"errors\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"instance_pointer\":{\"maxLength\":2048,\"type\":\"string\"},\"keyword\":{\"maxLength\":32,\"type\":\"string\"},\"schema_pointer\":{\"maxLength\":2048,\"type\":\"string\"}},\"required\":[\"instance_pointer\",\"schema_pointer\",\"keyword\"],\"type\":\"object\"},\"maxItems\":1,\"type\":\"array\"},\"valid\":{\"type\":\"boolean\"}},\"required\":[\"valid\",\"checked_assertions\",\"errors\"],\"type\":\"object\"},\"value\":{}},\"required\":[\"id\",\"kind\",\"instance_pointer\",\"schema_pointer\",\"keyword\",\"value\",\"expected_verdict\",\"validation\"],\"type\":\"object\"},\"maxItems\":24,\"minItems\":2,\"type\":\"array\"},\"coverage\":{\"const\":\"Selected boundary witnesses only; not exhaustive, not a proof of schema or implementation correctness.\",\"type\":\"string\"},\"coverage_gaps\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"instance_pointer\":{\"type\":\"string\"},\"keyword\":{\"type\":\"string\"},\"reason\":{\"enum\":[\"coupled_constraints\",\"no_isolated_candidate\",\"case_or_byte_budget\",\"optional_property_not_in_example\",\"candidate_budget\"],\"type\":\"string\"},\"schema_pointer\":{\"type\":\"string\"}},\"required\":[\"instance_pointer\",\"schema_pointer\",\"keyword\",\"reason\"],\"type\":\"object\"},\"maxItems\":12,\"type\":\"array\"},\"coverage_gaps_omitted\":{\"maximum\":9007199254740991,\"minimum\":0,\"type\":\"integer\"},\"schema_sha256\":{\"pattern\":\"^[a-f0-9]{64}$\",\"type\":\"string\"},\"seed_valid\":{\"const\":true,\"type\":\"boolean\"},\"source_content\":{\"const\":\"untrusted_data\",\"type\":\"string\"},\"summary\":{\"additionalProperties\":false,\"properties\":{\"candidates_checked\":{\"maximum\":160,\"minimum\":1,\"type\":\"integer\"},\"coverage_gaps\":{\"maximum\":9007199254740991,\"minimum\":0,\"type\":\"integer\"},\"generation_capped\":{\"type\":\"boolean\"},\"negative_cases\":{\"exclusiveMinimum\":0,\"maximum\":9007199254740991,\"type\":\"integer\"},\"omitted_candidates\":{\"maximum\":9007199254740991,\"minimum\":0,\"type\":\"integer\"},\"positive_cases\":{\"exclusiveMinimum\":0,\"maximum\":9007199254740991,\"type\":\"integer\"}},\"required\":[\"positive_cases\",\"negative_cases\",\"candidates_checked\",\"omitted_candidates\",\"generation_capped\",\"coverage_gaps\"],\"type\":\"object\"},\"tool\":{\"const\":\"contract-cases\",\"type\":\"string\"},\"validator\":{\"const\":\"AgentToolbox bounded JSON Schema 2020-12 subset\",\"type\":\"string\"},\"version\":{\"const\":\"0.1.1\",\"type\":\"string\"}},\"required\":[\"tool\",\"version\",\"schema_sha256\",\"seed_valid\",\"validator\",\"source_content\",\"cases\",\"summary\",\"coverage_gaps\",\"coverage_gaps_omitted\",\"coverage\"],\"type\":\"object\"},\"product_id\":\"contract-cases\",\"product_version\":\"0.1.1\",\"success_criterion\":\"At least one valid boundary case and one negative case failing exactly its intended keyword and instance; every case revalidated against the complete accepted schema. Coverage gaps explicit; not certification.\"}",
  "sha256": "5ca7675acb9e449d501e8e2445fd4a2010a0ab155fd4eb655cb442067020199f"
}
```