Test Matrix Shard Plan

Assign estimated tests longest-first to the least-loaded compatible worker shard and report the planned makespan.

Custom requests cost 0.04 USDC on Base.

Download example JSON · OpenAPI · Source and usage

Pay with a browser wallet · Open example in checkout

POST a JSON request to /test-matrix-shard-plan/v1/check with an x402 V2 client.

Worked example

Request

{
  "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"
      ]
    }
  ]
}

Result

{
  "estimated_seconds": 15,
  "unassigned": [
    "ios"
  ],
  "shards": [
    {
      "id": "one",
      "seconds": 13,
      "tests": [
        "integration",
        "unit"
      ]
    },
    {
      "id": "two",
      "seconds": 15,
      "tests": [
        "render"
      ]
    }
  ]
}

Support catalog maintenance through GitHub Sponsors. Sponsor gptenv · Sponsor Jeremy Carter