Exact fixed-slot cost assignment
Choose an exact minimum-cost complete one-job-per-slot assignment over caller-declared nonoverlapping slots and admissible edges, with lexical ties and a verifiable optimum or Hall-deficiency certificate. No live availability check, reservation or job dispatch.
workflow-assurance · Operation ID: assignment-cost-optimize
Choose this operation when
- Caller declares all admissible edges and pairwise nonoverlapping slots in one time coordinate system
Outside this profile
- General precedence or resource scheduling, overlapping slots, travel-time or skill inference
- Live calendar availability, slot reservation, real job dispatch, payments or currency conversion
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": {
"jobIds": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"slots": {
"minItems": 1,
"maxItems": 32,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"start": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"end": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"id",
"start",
"end"
],
"additionalProperties": false
}
},
"edges": {
"maxItems": 512,
"type": "array",
"items": {
"type": "object",
"properties": {
"jobId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"slotId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"cost": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
}
},
"required": [
"jobId",
"slotId",
"cost"
],
"additionalProperties": false
}
},
"timeUnit": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"timeOrigin": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"costUnit": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"jobIds",
"slots",
"edges",
"timeUnit",
"timeOrigin",
"costUnit"
],
"additionalProperties": false
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "assignment-cost-optimize",
"type": "string"
},
"version": {
"const": "0.29.0",
"type": "string"
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "object",
"properties": {
"profile": {
"type": "string",
"const": "fixed-slot-exact-assignment-v1"
},
"externalRequests": {
"type": "number",
"const": 0
},
"execution": {
"type": "boolean",
"const": false
},
"availabilityVerified": {
"type": "boolean",
"const": false
},
"timeUnit": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"timeOrigin": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"costUnit": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"jobIds": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"slotIds": {
"minItems": 1,
"maxItems": 32,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"status": {
"type": "string",
"const": "optimal"
},
"assignments": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"jobId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"slotId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"start": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"end": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"cost": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
}
},
"required": [
"jobId",
"slotId",
"start",
"end",
"cost"
],
"additionalProperties": false
}
},
"schedule": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"jobId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"slotId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"start": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"end": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"cost": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
}
},
"required": [
"jobId",
"slotId",
"start",
"end",
"cost"
],
"additionalProperties": false
}
},
"unusedSlotIds": {
"maxItems": 31,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"totalCost": {
"type": "object",
"properties": {
"numerator": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]*)$"
},
"denominator": {
"type": "string",
"pattern": "^[1-9][0-9]*$"
}
},
"required": [
"numerator",
"denominator"
],
"additionalProperties": false
},
"certificate": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "min-cost-flow-potentials"
},
"scale": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]*)$"
},
"primaryMultiplier": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]*)$"
},
"tieBase": {
"type": "integer",
"minimum": 2,
"maximum": 33
},
"combinedCost": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]*)$"
},
"vertexPotentials": {
"minItems": 4,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^(?:0|-?[1-9][0-9]*)$"
}
},
"requiredFlow": {
"type": "integer",
"minimum": 1,
"maximum": 16
},
"achievedFlow": {
"type": "integer",
"minimum": 1,
"maximum": 16
}
},
"required": [
"kind",
"scale",
"primaryMultiplier",
"tieBase",
"combinedCost",
"vertexPotentials",
"requiredFlow",
"achievedFlow"
],
"additionalProperties": false
}
},
"required": [
"profile",
"externalRequests",
"execution",
"availabilityVerified",
"timeUnit",
"timeOrigin",
"costUnit",
"jobIds",
"slotIds",
"status",
"assignments",
"schedule",
"unusedSlotIds",
"totalCost",
"certificate"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"profile": {
"type": "string",
"const": "fixed-slot-exact-assignment-v1"
},
"externalRequests": {
"type": "number",
"const": 0
},
"execution": {
"type": "boolean",
"const": false
},
"availabilityVerified": {
"type": "boolean",
"const": false
},
"timeUnit": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"timeOrigin": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"costUnit": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"jobIds": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"slotIds": {
"minItems": 1,
"maxItems": 32,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"status": {
"type": "string",
"const": "infeasible"
},
"schedule": {
"type": "null"
},
"maximumCardinality": {
"type": "integer",
"minimum": 0,
"maximum": 15
},
"witness": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "hall-deficiency"
},
"jobIds": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"neighborSlotIds": {
"maxItems": 32,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"deficiency": {
"type": "integer",
"minimum": 1,
"maximum": 16
},
"maximumMatching": {
"maxItems": 15,
"type": "array",
"items": {
"type": "object",
"properties": {
"jobId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"slotId": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"jobId",
"slotId"
],
"additionalProperties": false
}
}
},
"required": [
"kind",
"jobIds",
"neighborSlotIds",
"deficiency",
"maximumMatching"
],
"additionalProperties": false
}
},
"required": [
"profile",
"externalRequests",
"execution",
"availabilityVerified",
"timeUnit",
"timeOrigin",
"costUnit",
"jobIds",
"slotIds",
"status",
"schedule",
"maximumCardinality",
"witness"
],
"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
{
"jobIds": [
"a",
"b",
"c"
],
"slots": [
{
"id": "s1",
"start": 0,
"end": 10
},
{
"id": "s2",
"start": 10,
"end": 20
},
{
"id": "s3",
"start": 20,
"end": 30
}
],
"edges": [
{
"jobId": "a",
"slotId": "s1",
"cost": "7"
},
{
"jobId": "a",
"slotId": "s2",
"cost": "1"
},
{
"jobId": "a",
"slotId": "s3",
"cost": "4"
},
{
"jobId": "b",
"slotId": "s1",
"cost": "2"
},
{
"jobId": "b",
"slotId": "s2",
"cost": "6"
},
{
"jobId": "b",
"slotId": "s3",
"cost": "5"
},
{
"jobId": "c",
"slotId": "s1",
"cost": "3"
},
{
"jobId": "c",
"slotId": "s2",
"cost": "4"
},
{
"jobId": "c",
"slotId": "s3",
"cost": "1"
}
],
"timeUnit": "minute",
"timeOrigin": "caller-defined zero",
"costUnit": "model cost units"
}
Example response
{
"operation": "assignment-cost-optimize",
"version": "0.29.0",
"result": {
"profile": "fixed-slot-exact-assignment-v1",
"externalRequests": 0,
"execution": false,
"availabilityVerified": false,
"timeUnit": "minute",
"timeOrigin": "caller-defined zero",
"costUnit": "model cost units",
"jobIds": [
"a",
"b",
"c"
],
"slotIds": [
"s1",
"s2",
"s3"
],
"status": "optimal",
"assignments": [
{
"jobId": "a",
"slotId": "s2",
"start": 10,
"end": 20,
"cost": "1"
},
{
"jobId": "b",
"slotId": "s1",
"start": 0,
"end": 10,
"cost": "2"
},
{
"jobId": "c",
"slotId": "s3",
"start": 20,
"end": 30,
"cost": "1"
}
],
"schedule": [
{
"jobId": "b",
"slotId": "s1",
"start": 0,
"end": 10,
"cost": "2"
},
{
"jobId": "a",
"slotId": "s2",
"start": 10,
"end": 20,
"cost": "1"
},
{
"jobId": "c",
"slotId": "s3",
"start": 20,
"end": 30,
"cost": "1"
}
],
"unusedSlotIds": [],
"totalCost": {
"numerator": "4",
"denominator": "1"
},
"certificate": {
"kind": "min-cost-flow-potentials",
"scale": "1",
"primaryMultiplier": "64",
"tieBase": 4,
"combinedCost": "274",
"vertexPotentials": [
"0",
"48",
"0",
"62",
"128",
"128",
"128",
"128"
],
"requiredFlow": 3,
"achievedFlow": 3
}
},
"provenance": {
"inputSha256": "f9e5201837d942fee4208f1463702123eb7efe360904719bc8393f0680cdfd7f",
"outputSha256": "e078060ea2c9b79dfff96c4e2bcff3a77cd038736ab4285f0d4d4561e1e2065f",
"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,
"jobs": 16,
"slots": 32,
"edges": 512,
"tickMaximum": 1000000000000,
"decimalIntegerDigits": 12,
"decimalFractionDigits": 6,
"vertices": 50,
"residualArcs": 1120,
"augmentations": 16,
"maximumVertexSelectionChecks": 40000,
"maximumEdgeRelaxationChecks": 17920
}
}
Complete schemas, descriptions and cross-field validation may impose additional limits.
Proposed price and protocol definitions
{
"unit": "one successful operation call",
"proposedNominalUsd": "0.01",
"sixDecimalTokenBaseUnits": "10000",
"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/assignment-cost-optimize",
"mpp": "/v1/mpp/assignment-cost-optimize"
}
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.