Exact metric regression budget check
Compare supplied baseline/candidate decimal measurements against explicit directional absolute and relative regression budgets. Missing values stay unknown; every configured budget must pass. No benchmarking, unit conversion, noise model or significance test.
data-assurance · Operation ID: metric-regression-check
Choose this operation when
- Gate supplied agent benchmark changes against explicit regression budgets
- Compare baseline and candidate measurements while preserving missing evidence
Outside this profile
- Extracting facts or judging truth, semantic correctness, evidence authenticity, causal effects, or production readiness
- Fetching data, executing models or user code, changing datasets, authorizing actions, or contacting live services
- Inferring population quality, statistical significance, uncertainty intervals, or generalization from a supplied sample
Exact release references
Static JSON contract · Markdown reference · Fixed example response
Complete input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"metrics": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"direction": {
"type": "string",
"enum": [
"lower_is_better",
"higher_is_better"
]
},
"baseline": {
"anyOf": [
{
"type": "string",
"maxLength": 44,
"pattern": "^-?(?:0|[1-9]\\d{0,23})(?:\\.\\d{1,18})?$",
"description": "Exact decimal string: up to 24 integer and 18 fractional digits; no exponent, plus sign, whitespace, or leading zeros."
},
{
"type": "null"
}
]
},
"candidate": {
"anyOf": [
{
"type": "string",
"maxLength": 44,
"pattern": "^-?(?:0|[1-9]\\d{0,23})(?:\\.\\d{1,18})?$",
"description": "Exact decimal string: up to 24 integer and 18 fractional digits; no exponent, plus sign, whitespace, or leading zeros."
},
{
"type": "null"
}
]
},
"maxAbsoluteRegression": {
"type": "string",
"maxLength": 44,
"pattern": "^-?(?:0|[1-9]\\d{0,23})(?:\\.\\d{1,18})?$",
"description": "Exact decimal string: up to 24 integer and 18 fractional digits; no exponent, plus sign, whitespace, or leading zeros."
},
"maxRelativeRegression": {
"type": "string",
"maxLength": 44,
"pattern": "^-?(?:0|[1-9]\\d{0,23})(?:\\.\\d{1,18})?$",
"description": "Exact decimal string: up to 24 integer and 18 fractional digits; no exponent, plus sign, whitespace, or leading zeros."
}
},
"required": [
"id",
"unit",
"direction",
"baseline",
"candidate"
],
"additionalProperties": false
}
}
},
"required": [
"metrics"
],
"additionalProperties": false
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "metric-regression-check",
"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": "exact-metric-regression-v1"
},
"advisoryOnly": {
"type": "boolean",
"const": true
},
"externalRequests": {
"type": "number",
"const": 0
},
"semanticValidityVerified": {
"type": "boolean",
"const": false
},
"status": {
"type": "string",
"enum": [
"passed",
"failed",
"unknown"
]
},
"passedCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"failedCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"unknownCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"metrics": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"status": {
"type": "string",
"enum": [
"passed",
"failed",
"unknown"
]
},
"missing": {
"maxItems": 2,
"type": "array",
"items": {
"type": "string",
"enum": [
"baseline",
"candidate"
]
}
},
"delta": {
"anyOf": [
{
"type": "object",
"properties": {
"numerator": {
"type": "string",
"maxLength": 2049,
"pattern": "^-?(?:0|[1-9]\\d*)$"
},
"denominator": {
"type": "string",
"maxLength": 2048,
"pattern": "^[1-9]\\d*$"
}
},
"required": [
"numerator",
"denominator"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"degradation": {
"anyOf": [
{
"type": "object",
"properties": {
"numerator": {
"type": "string",
"maxLength": 2049,
"pattern": "^-?(?:0|[1-9]\\d*)$"
},
"denominator": {
"type": "string",
"maxLength": 2048,
"pattern": "^[1-9]\\d*$"
}
},
"required": [
"numerator",
"denominator"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"relativeDegradation": {
"anyOf": [
{
"type": "object",
"properties": {
"numerator": {
"type": "string",
"maxLength": 2049,
"pattern": "^-?(?:0|[1-9]\\d*)$"
},
"denominator": {
"type": "string",
"maxLength": 2048,
"pattern": "^[1-9]\\d*$"
}
},
"required": [
"numerator",
"denominator"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"zeroBaseline": {
"type": [
"boolean",
"null"
]
},
"absoluteBudget": {
"anyOf": [
{
"type": "object",
"properties": {
"limit": {
"type": "object",
"properties": {
"numerator": {
"type": "string",
"maxLength": 2049,
"pattern": "^-?(?:0|[1-9]\\d*)$"
},
"denominator": {
"type": "string",
"maxLength": 2048,
"pattern": "^[1-9]\\d*$"
}
},
"required": [
"numerator",
"denominator"
],
"additionalProperties": false
},
"withinBudget": {
"type": "boolean"
}
},
"required": [
"limit",
"withinBudget"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"relativeBudget": {
"anyOf": [
{
"type": "object",
"properties": {
"limit": {
"type": "object",
"properties": {
"numerator": {
"type": "string",
"maxLength": 2049,
"pattern": "^-?(?:0|[1-9]\\d*)$"
},
"denominator": {
"type": "string",
"maxLength": 2048,
"pattern": "^[1-9]\\d*$"
}
},
"required": [
"numerator",
"denominator"
],
"additionalProperties": false
},
"withinBudget": {
"type": "boolean"
}
},
"required": [
"limit",
"withinBudget"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"unit",
"status",
"missing",
"delta",
"degradation",
"relativeDegradation",
"zeroBaseline",
"absoluteBudget",
"relativeBudget"
],
"additionalProperties": false
}
}
},
"required": [
"profile",
"advisoryOnly",
"externalRequests",
"semanticValidityVerified",
"status",
"passedCount",
"failedCount",
"unknownCount",
"metrics"
],
"additionalProperties": false
},
"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
}
Fixed example
One accepted fixed example, not a custom-input trial. No operation runs when this static page is requested.
Example input
{
"metrics": [
{
"id": "p95-latency",
"unit": "ms",
"direction": "lower_is_better",
"baseline": "100",
"candidate": "106",
"maxAbsoluteRegression": "10",
"maxRelativeRegression": "0.05"
}
]
}
Example response
{
"operation": "metric-regression-check",
"version": "0.29.0",
"result": {
"profile": "exact-metric-regression-v1",
"advisoryOnly": true,
"externalRequests": 0,
"semanticValidityVerified": false,
"status": "failed",
"passedCount": 0,
"failedCount": 1,
"unknownCount": 0,
"metrics": [
{
"id": "p95-latency",
"unit": "ms",
"status": "failed",
"missing": [],
"delta": {
"numerator": "6",
"denominator": "1"
},
"degradation": {
"numerator": "6",
"denominator": "1"
},
"relativeDegradation": {
"numerator": "3",
"denominator": "50"
},
"zeroBaseline": false,
"absoluteBudget": {
"limit": {
"numerator": "10",
"denominator": "1"
},
"withinBudget": true
},
"relativeBudget": {
"limit": {
"numerator": "5",
"denominator": "1"
},
"withinBudget": false
}
}
]
},
"provenance": {
"inputSha256": "91ca7032db19ed1509a034d76d4207e3a4816fdd2f1d8685772fae5e8d95c91a",
"outputSha256": "d3723d6e6614497e8f659f57baacc4bddc88d08396961c3a9d526f374f0a6c7d",
"deterministic": true,
"externalRequests": 0
}
}
Bounds and precision
JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.
{
"global": {
"requestBytes": 131072,
"responseBytes": 524288,
"jsonDepth": 32,
"jsonNodes": 20000,
"requestsPerMinute": 60,
"paidAttemptsPerMinute": 20,
"idempotencyHours": 24
},
"operation": {
"inputBytes": 100000,
"outputBytes": 400000,
"jsonNodes": 12000,
"depth": 20,
"findings": 200,
"decimalIntegerDigits": 24,
"decimalFractionDigits": 18,
"rationalDigits": 2048,
"metrics": 200
}
}
Complete schemas, descriptions and cross-field validation may impose additional limits.
Proposed price and protocol definitions
{
"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."
}
Protocol definitions: x402, mpp. MPP uses Tempo charge. Paid MCP execution is unsupported. All runtime readiness is not evaluated in this build.
API path templates, not endpoints on this documentation host
{
"x402": "/v1/x402/metric-regression-check",
"mpp": "/v1/mpp/metric-regression-check"
}
Required headers
{
"Content-Type": "application/json",
"Idempotency-Key": "random 16–128 character operation identifier"
}
Actual SDK challenge amount, asset, network, recipient and wallet costs must pass independent authorization. Preserve identical key, body, protocol and credential on retries; on PAYMENT_UNCERTAIN stop and reconcile.
Execution profile and provider conditions
{
"deterministic": true,
"externalRequests": 0,
"maxExternalRequests": 0,
"resultSnapshotPersisted": false,
"fixedExampleIsIllustrativeSnapshot": false,
"requiresPayment": true,
"supportsMcpExecution": false
}
Deterministic supplied-input operation with no external requests or stored request/result bodies. Payment infrastructure retains payment metadata and hashes.
Failure handling
- HTTP 400: Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch Correct the request before payment
- HTTP 402: Payment challenge or rejected payment Use official protocol SDK; inspect payment outcome before another payment
- HTTP 409: Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay
- HTTP 413: Input or generated output too large Reduce input; no payment attempted for validation failure
- HTTP 415: Unsupported media type or compression Send uncompressed application/json
- HTTP 422: Schema or service-specific semantic validation failure Correct input using returned error code; no payment attempted
- HTTP 429: Request/payment-attempt rate exceeded Wait for rate limit window; preserve existing payment identity
- HTTP 503: Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation
Declared requirements
Before any paid call, refresh the live operation contract and POST the complete bounded budgeted plan to the separate API's /preflight. Unknown requirements block selection; compatible preflight is not permission to spend.