Replay trace divergence check
Align two supplied execution traces by stable step ID, distinguish reordered/missing/extra steps and compare operation, canonical JSON requests, outcomes and result presence. Returns digest evidence without executing a replay.
workflow-assurance · Operation ID: replay-divergence-check
Choose this operation when
- Locate deterministic replay divergence between recorded agent runs
- Compare step-level requests and outputs after a tool or prompt upgrade
Outside this profile
- Executing tools, sending messages, retrying effects, restoring state, or contacting live services
- Authenticating evidence, verifying signatures or identities, granting permission, or enforcing authorization
- Inferring facts omitted from the supplied artifact snapshot or guaranteeing exactly-once execution
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": {
"baseline": {
"maxItems": 128,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"request": {
"$ref": "#/$defs/__schema0"
},
"outcome": {
"type": "string",
"enum": [
"success",
"error",
"unknown"
]
},
"result": {
"$ref": "#/$defs/__schema0"
}
},
"required": [
"id",
"operation",
"request",
"outcome"
],
"additionalProperties": false
}
},
"candidate": {
"maxItems": 128,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"request": {
"$ref": "#/$defs/__schema0"
},
"outcome": {
"type": "string",
"enum": [
"success",
"error",
"unknown"
]
},
"result": {
"$ref": "#/$defs/__schema0"
}
},
"required": [
"id",
"operation",
"request",
"outcome"
],
"additionalProperties": false
}
}
},
"required": [
"baseline",
"candidate"
],
"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"
}
}
]
}
}
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "replay-divergence-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": "replay-divergence-v1"
},
"equivalent": {
"type": "boolean"
},
"advisoryOnly": {
"type": "boolean",
"const": true
},
"digestProfile": {
"type": "string",
"const": "sorted-json-sha256-v1"
},
"matchingPrefixLength": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"commonStepCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"orderPreserved": {
"type": "boolean"
},
"firstDivergence": {
"anyOf": [
{
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"baselineId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100
},
{
"type": "null"
}
]
},
"candidateId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100
},
{
"type": "null"
}
]
}
},
"required": [
"index",
"baselineId",
"candidateId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"missingStepIds": {
"maxItems": 128,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"extraStepIds": {
"maxItems": 128,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"comparisons": {
"maxItems": 128,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"baselineIndex": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"candidateIndex": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sameOperation": {
"type": "boolean"
},
"sameRequest": {
"type": "boolean"
},
"sameOutcome": {
"type": "boolean"
},
"sameResult": {
"type": "boolean"
},
"baselineRequestSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"candidateRequestSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"baselineResultSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"candidateResultSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"id",
"baselineIndex",
"candidateIndex",
"sameOperation",
"sameRequest",
"sameOutcome",
"sameResult",
"baselineRequestSha256",
"candidateRequestSha256",
"baselineResultSha256",
"candidateResultSha256"
],
"additionalProperties": false
}
},
"limitations": {
"type": "array",
"items": {
"type": "string"
}
},
"findings": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"severity": {
"type": "string",
"enum": [
"error",
"warning"
]
},
"path": {
"type": "string"
},
"message": {
"type": "string"
},
"relatedIds": {
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
}
},
"required": [
"code",
"severity",
"path",
"message",
"relatedIds"
],
"additionalProperties": false
}
},
"findingCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"errorCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"truncated": {
"type": "boolean"
}
},
"required": [
"profile",
"equivalent",
"advisoryOnly",
"digestProfile",
"matchingPrefixLength",
"commonStepCount",
"orderPreserved",
"firstDivergence",
"missingStepIds",
"extraStepIds",
"comparisons",
"limitations",
"findings",
"findingCount",
"errorCount",
"truncated"
],
"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
{
"baseline": [
{
"id": "step-1",
"operation": "extract",
"request": {
"text": "hello"
},
"outcome": "success",
"result": {
"count": 1
}
}
],
"candidate": [
{
"id": "step-1",
"operation": "extract",
"request": {
"text": "hello"
},
"outcome": "success",
"result": {
"count": 2
}
}
]
}
Example response
{
"operation": "replay-divergence-check",
"version": "0.29.0",
"result": {
"profile": "replay-divergence-v1",
"equivalent": false,
"advisoryOnly": true,
"digestProfile": "sorted-json-sha256-v1",
"matchingPrefixLength": 0,
"commonStepCount": 1,
"orderPreserved": true,
"firstDivergence": {
"index": 0,
"baselineId": "step-1",
"candidateId": "step-1"
},
"missingStepIds": [],
"extraStepIds": [],
"comparisons": [
{
"id": "step-1",
"baselineIndex": 0,
"candidateIndex": 0,
"sameOperation": true,
"sameRequest": true,
"sameOutcome": true,
"sameResult": false,
"baselineRequestSha256": "cbbbdcd27692344de5dbab3abcaba413fb0f45307267de7081401576df1cb176",
"candidateRequestSha256": "cbbbdcd27692344de5dbab3abcaba413fb0f45307267de7081401576df1cb176",
"baselineResultSha256": "dda59c1dd5dc7304423acc22eafddcb12e7550b4a1ac96525c6ea6eb8bcd5313",
"candidateResultSha256": "8ea34acc65cbbb9d9d54427c6a777d14668c7a6443bcdb56ad56fbfaf6de413e"
}
],
"limitations": [
"Compares exact supplied JSON traces without executing or predicting a replay.",
"Step IDs must be unique within each trace; repeated attempts need distinct IDs.",
"Digest profile sorts keys by UTF-16 and uses JavaScript JSON numbers; it is not RFC 8785 or a signature. Result hashes include presence so absent differs from null.",
"Unknown outcomes and omitted effects cannot establish equivalent behavior outside these traces."
],
"findings": [
{
"code": "RESULT_DIVERGED",
"severity": "error",
"path": "/candidate/0",
"message": "result differs from the aligned baseline step",
"relatedIds": [
"step-1"
]
}
],
"findingCount": 1,
"errorCount": 1,
"truncated": false
},
"provenance": {
"inputSha256": "7053e487f5944c064974aeea44d3a57370d71b16669bb704de01deaedfce2fd7",
"outputSha256": "23ef080e8f51a0ad59ece5d5958fdc0221beed339139c5c8dd0c14465934f17e",
"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,
"events": 256,
"actors": 32,
"traceSteps": 128,
"observations": 256,
"stepsPerTrace": 128
}
}
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/replay-divergence-check",
"mpp": "/v1/mpp/replay-divergence-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.