{"openapi":"3.1.0","info":{"title":"Test Matrix Shard Plan","version":"1.0.0","description":"Assign estimated tests longest-first to the least-loaded compatible worker shard and report the planned makespan.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/test-matrix-shard-plan/v1/check":{"post":{"operationId":"test_matrix_shard_plan","summary":"Assign estimated tests longest-first to the least-loaded compatible worker shard and report the planned makespan.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shards":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"capabilities":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["id","capabilities"],"additionalProperties":false}},"tests":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"seconds":{"type":"integer","minimum":1,"maximum":86400},"needs":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["id","seconds","needs"],"additionalProperties":false}}},"required":["shards","tests"],"additionalProperties":false},"example":{"shards":[{"id":"one","capabilities":["linux"]},{"id":"two","capabilities":["linux","gpu"]}],"tests":[{"id":"unit","seconds":5,"needs":["linux"]},{"id":"render","seconds":15,"needs":["gpu"]},{"id":"integration","seconds":8,"needs":["linux"]},{"id":"ios","seconds":1,"needs":["ios"]}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"estimated_seconds":15,"unassigned":["ios"],"shards":[{"id":"one","seconds":13,"tests":["integration","unit"]},{"id":"two","seconds":15,"tests":["render"]}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}