{
  "openapi": "3.1.0",
  "info": {
    "title": "ghazaryantech.com API",
    "description": "The API behind ghazaryantech.com: the JVM it runs on, and the lab's experiments, which run here on the server rather than in the browser. It is public and needs no key.\n\nResponses are JSON, or server-sent events where an experiment reports as it goes. Errors are RFC 9457 problem details with a stable `code`. Experiments and what the site's forms send are limited per client address, and say where a client stands in the `RateLimit-Policy` and `RateLimit` headers. `API-Version` selects the version.",
    "contact": {
      "name": "Armen Ghazaryan",
      "url": "https://ghazaryantech.com/"
    },
    "version": "1"
  },
  "externalDocs": {
    "description": "The reference, rendered",
    "url": "https://ghazaryantech.com/api-reference/"
  },
  "servers": [
    {
      "url": "https://ghazaryantech.com"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Runtime",
      "description": "The JVM this API runs on, and its database."
    },
    {
      "name": "Lab: the JVM",
      "description": "Experiments on the server's JVM: each answers with what it measured, on this machine, just now."
    },
    {
      "name": "Lab: PostgreSQL",
      "description": "Experiments on a real PostgreSQL: a connection pool, transactions, search and delivery."
    },
    {
      "name": "Lab: payments",
      "description": "A simulated 3-D Secure 2 access control server: an AReq checked, weighed against the exemptions from strong customer authentication, and answered, with a challenge where one is due."
    },
    {
      "name": "Traces",
      "description": "What OpenTelemetry recorded while a lab run ran: its spans, kept in memory for a while."
    },
    {
      "name": "Site",
      "description": "What the site's pages ask of it: a page view counted without cookies or anyone's address, an introduction taken, and a job posting checked against the record."
    }
  ],
  "paths": {
    "/api/assistant": {
      "get": {
        "tags": [
          "Site"
        ],
        "summary": "What the assistant can do here",
        "description": "Whether an account ready for it could ask a question of its own now and, if not, why; how long a question may be and how many a conversation takes; and the examples, the prepared answers and the gate's demonstrations, which run on replies kept for them whatever the answer.",
        "operationId": "getAssistantStatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAssistant.Status"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-11-08",
                    "description": "The response to `GET /api/assistant`. Arrays are cut to their first 4 items.",
                    "value": {
                      "live": true,
                      "off": null,
                      "offWords": null,
                      "questionCharacters": 500,
                      "questions": 12,
                      "sections": 69,
                      "examples": [
                        {
                          "name": "who",
                          "question": "Who is Armen?",
                          "about": "A question the record answers, from where he works and the areas he goes deep in.",
                          "source": "SCRIPTED",
                          "kind": "PREPARED",
                          "offers": []
                        },
                        {
                          "name": "stack",
                          "question": "What does he work with now?",
                          "about": "A question the record answers, from his current role.",
                          "source": "SCRIPTED",
                          "kind": "PREPARED",
                          "offers": []
                        },
                        {
                          "name": "three-d-secure",
                          "question": "What did he do on 3-D Secure?",
                          "about": "A question the record answers, from his years at Worldline and the area of expertise they back.",
                          "source": "SCRIPTED",
                          "kind": "PREPARED",
                          "offers": []
                        },
                        {
                          "name": "experience",
                          "question": "How many years of experience does he have?",
                          "about": "A question the record answers, from his roles and when Java began for him.",
                          "source": "SCRIPTED",
                          "kind": "PREPARED",
                          "offers": []
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "assistant-status",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/assistant/examples/{name}/answers": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Ask an example question",
        "description": "Server-sent events: one of the example questions, answered on the reply kept for it through the same gate. No model is called, and nothing is spent. `sentence` for each sentence let through, with the sections of the site's record it cites, each with its title and address on the site; `withheld` for a sentence held back, with why: it named what nothing it cited mentions (and what), it cited nothing, it shared nothing with what it cited, or it spoke in the first person, as the owner; `action` for each thing the guide shows, in its place among the sentences: a page to open (`show_page`, with its path), something to point at (`point_at`), an experiment to run (`run_experiment`, with its preset and whether on the server), a tour to start (`start_tour`) or a next step to offer (`offer`), each with its label; then `done`, with the refusal and its words when there is no answer from the record, how many sentences were shown and held back, how many actions were taken, and who wrote the answer at what cost, its cache tokens and the time to its first word; `error` instead if the model fails on the way.",
        "operationId": "streamAssistantExample",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "The example's name, from the status",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,60}$"
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent events, as the operation describes them. An `error` event ends a stream that fails, with a problem:\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-11-08",
                    "description": "The stream that answered `POST /api/assistant/examples/leading/answers`.",
                    "value": "event:sentence\ndata:{\"text\":\"At Picsart, Armen reviews code and mentors mid-level engineers.\",\"citations\":[{\"id\":\"practice:reviews-and-mentoring\",\"title\":\"How I work: Reviews and mentoring\",\"url\":\"/#working\"}]}\n\n: 1 event left out\n\nevent:sentence\ndata:{\"text\":\"He also takes part in CI/CD, observability with Datadog and ELK, and p99 latency and throughput tuning.\",\"citations\":[{\"id\":\"practice:production\",\"title\":\"How I work: Production\",\"url\":\"/#working\"}]}\n\nevent:done\ndata:{\"refusal\":null,\"words\":null,\"shown\":3,\"withheld\":0,\"questionsLeft\":null,\"drafting\":{\"model\":\"scripted\",\"source\":\"SCRIPTED\",\"inputTokens\":null,\"outputTokens\":null,\"costUsd\":null,\"latencyMillis\":10,\"cacheReadTokens\":null,\"cacheWriteTokens\":null,\"firstTextMillis\":null},\"actions\":0}\n\n"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `NAME_INVALID`: `name` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "NAME_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found.\n\n- `EXAMPLE_NOT_FOUND`: There is no example by that name.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "EXAMPLE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "assistant-examples",
          "quota": 20,
          "window": 60
        }
      }
    },
    "/api/assistant/match": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Find the prepared answer a question asks for",
        "description": "A question typed without an account, matched to a prepared answer by the record's terms, the hiring topics and its words: the example's name to ask for, a refusal by rule (pay, private life) with its words, or neither, when only an account's question could answer it. No model is called, and nothing of the question is kept: what went unmatched is counted by the topics it names.",
        "operationId": "matchAssistantQuestion",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssistantController.Typed"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAssistant.Matched"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-11-08",
                    "description": "The response to `POST /api/assistant/match`.",
                    "value": {
                      "example": "kafka",
                      "refusal": null,
                      "words": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `UNREADABLE_BODY`: The body is not the JSON the operation takes.\n- `QUESTION_INVALID`: `question` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "UNREADABLE_BODY",
                            "QUESTION_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large.\n\n- `CONTENT_TOO_LARGE`: The body is larger than any operation takes: the API reads 2 MB of JSON at most.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CONTENT_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "assistant-match",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/database": {
      "get": {
        "tags": [
          "Runtime"
        ],
        "summary": "The database and its migrations",
        "description": "The PostgreSQL server's version and the Flyway migrations applied: whether the database is there, and up to date. 503 without one.",
        "operationId": "getDatabase",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseInfo"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/database`. Arrays are cut to their first 4 items.",
                    "value": {
                      "version": "17.11",
                      "migrations": [
                        {
                          "version": "1",
                          "description": "lab schema",
                          "installedOn": "2026-10-03T05:23:22.166415Z",
                          "success": true
                        },
                        {
                          "version": "2",
                          "description": "ledger",
                          "installedOn": "2026-10-03T05:56:28.695017Z",
                          "success": true
                        },
                        {
                          "version": "3",
                          "description": "catalogue",
                          "installedOn": "2026-10-03T07:52:57.560606Z",
                          "success": true
                        },
                        {
                          "version": "4",
                          "description": "outbox",
                          "installedOn": "2026-10-03T16:00:34.010216Z",
                          "success": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED",
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "database",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/fit/challenge": {
      "get": {
        "tags": [
          "Site"
        ],
        "summary": "A proof-of-work challenge for a fit check",
        "description": "A challenge by version 1 of ALTCHA's protocol, as for introductions but ten times the work, good for one fit check and ten minutes. Refused while a posting of one's own cannot run.",
        "operationId": "getFitCheckChallenge",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Challenge"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/fit/challenge`.",
                    "value": {
                      "algorithm": "SHA-256",
                      "challenge": "b1e68bc88fb30dd592efa96486346e486f7178c06d3a69d4076bc7b940bd2ef8",
                      "maxnumber": 1000000,
                      "salt": "b6dbb258ca6b9cd624863497?expires=1791068410&purpose=fit-check&",
                      "signature": "c919b488b7dec71173429b88c2841c9a29ca371d03553598f28ba8e751156e52"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `FIT_CHECK_OFF`: A posting of one's own cannot be checked here now: the status says why.\n- `BUDGET_SPENT`: Today's budget for this is spent. It starts again at midnight UTC.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "FIT_CHECK_OFF",
                            "BUDGET_SPENT",
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "fit-check-challenges",
          "quota": 10,
          "window": 60
        }
      }
    },
    "/api/fit/examples/{name}/runs": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Check an example posting",
        "description": "One of the example postings, run end to end on the replies kept for it: no model is called, and nothing is spent.",
        "operationId": "runFitCheckExample",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "The example's name, from the status",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,60}$"
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FitResult"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-11-08",
                    "description": "The response to `POST /api/fit/examples/payments-tech-lead/runs`. Arrays are cut to their first 4 items.",
                    "value": {
                      "requirements": [
                        {
                          "text": "7+ years of backend development in Java, including recent Spring Boot",
                          "must": true,
                          "rating": "DIRECT",
                          "claim": "Java in production since 2017: Synopsys, then Worldline, then Picsart, whose services are Java 21 and Spring Boot.",
                          "missing": "",
                          "evidence": [
                            {
                              "title": "Picsart: Senior Software Engineer (Jan 2023–now)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Worldline: Java Developer, Payment Security (3-D Secure) (Jul 2019–Jan 2023)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Synopsys: Java Developer (Dec 2017–Jul 2019)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Where I work from, and how",
                              "kind": "profile",
                              "url": "/#contact"
                            }
                          ],
                          "withheld": false
                        },
                        {
                          "text": "Experience with card payments: 3-D Secure, PCI DSS, issuer or acquirer integrations",
                          "must": true,
                          "rating": "DIRECT",
                          "claim": "Three and a half years on 3-D Secure 2.x at Worldline: integrations with acquirers and issuers, PCI DSS, and the edge cases of the critical transaction path.",
                          "missing": "",
                          "evidence": [
                            {
                              "title": "Worldline: Java Developer, Payment Security (3-D Secure) (Jul 2019–Jan 2023)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Payment security",
                              "kind": "expertise",
                              "url": "/#expertise"
                            }
                          ],
                          "withheld": false
                        },
                        {
                          "text": "Production experience with PostgreSQL and Kafka",
                          "must": true,
                          "rating": "DIRECT",
                          "claim": "Event-driven pipelines on Kafka in production at Picsart, and Kafka with PostgreSQL and Oracle at Worldline.",
                          "missing": "",
                          "evidence": [
                            {
                              "title": "Picsart: Senior Software Engineer (Jan 2023–now)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Worldline: Java Developer, Payment Security (3-D Secure) (Jul 2019–Jan 2023)",
                              "kind": "role",
                              "url": "/#experience"
                            }
                          ],
                          "withheld": false
                        },
                        {
                          "text": "Kubernetes in production, on AWS or GCP",
                          "must": true,
                          "rating": "DIRECT",
                          "claim": "Services on Kubernetes (GKE) at Picsart and on Kubernetes at Worldline; GCP and AWS are among the CV's cloud skills.",
                          "missing": "AWS is not described in a role.",
                          "evidence": [
                            {
                              "title": "Picsart: Senior Software Engineer (Jan 2023–now)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Worldline: Java Developer, Payment Security (3-D Secure) (Jul 2019–Jan 2023)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Skills on the CV: Cloud & delivery",
                              "kind": "skills",
                              "url": "/#experience"
                            }
                          ],
                          "withheld": false
                        }
                      ],
                      "withheld": 0,
                      "drafting": {
                        "model": "scripted",
                        "source": "SCRIPTED",
                        "calls": 2,
                        "inputTokens": null,
                        "outputTokens": null,
                        "costUsd": null,
                        "latencyMillis": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `NAME_INVALID`: `name` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "NAME_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found.\n\n- `EXAMPLE_NOT_FOUND`: There is no example by that name.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "EXAMPLE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content.\n\n- `NO_REQUIREMENTS_FOUND`: The posting asks for nothing a candidate could show.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "NO_REQUIREMENTS_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "fit-check-examples",
          "quota": 20,
          "window": 60
        }
      }
    },
    "/api/fit/public": {
      "get": {
        "tags": [
          "Site"
        ],
        "summary": "What the fit check can do here",
        "description": "Whether a posting of your own can be checked now and, if not, why; how long it may be; and the examples, which run on replies kept for them whatever the answer.",
        "operationId": "getFitCheckStatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFitChecks.Status"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-11-08",
                    "description": "The response to `GET /api/fit/public`. Arrays are cut to their first 4 items.",
                    "value": {
                      "live": true,
                      "off": null,
                      "offWords": null,
                      "postingCharacters": 6000,
                      "examples": [
                        {
                          "name": "ai-backend",
                          "company": "Example Commerce",
                          "role": "Senior Backend Engineer, AI Features",
                          "about": "AI on record is generative AI at Picsart and this site’s own assistant; LLM APIs at work, prompt injection, multi-tenant SaaS, Python and retrieval-augmented generation are not.",
                          "source": "SCRIPTED"
                        },
                        {
                          "name": "hidden-instruction",
                          "company": "Example Robotics",
                          "role": "Senior Java Developer, Robotics Backend",
                          "about": "An attack: the posting tells the model to invent Rust and German, and the scripted reply obeys. The claim check catches every invention: a draft cannot be published until the owner fixes it, and a visitor's result withholds the claim.",
                          "source": "SCRIPTED"
                        },
                        {
                          "name": "munich-onsite",
                          "company": "Example Bank",
                          "role": "Java Developer, Munich",
                          "about": "The stack fits; German at C2 and five days on site in Munich do not, and the site does not say whether he would relocate.",
                          "source": "SCRIPTED"
                        },
                        {
                          "name": "payments-tech-lead",
                          "company": "Example Payments",
                          "role": "Tech Lead, Payments Platform",
                          "about": "A close fit on payments, Java and Kafka; mentoring is on record but leading a team is not, and the site says nothing of English or German.",
                          "source": "SCRIPTED"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "fit-check-status",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/fit/runs": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Check a posting",
        "description": "Reads the posting's requirements with a language model, shortlists the evidence on this site for each in code, has the model rate each against its shortlist only, and checks every claim against the evidence it cites. Nothing of the posting is kept, and the result has no link: it is yours alone. A claim the check found naming what its evidence does not is withheld.",
        "operationId": "runFitCheck",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicFitCheckController.Posting"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FitResult"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-11-08",
                    "description": "The response to `POST /api/fit/examples/payments-tech-lead/runs`. No visitor's posting is recorded: an example's run, which answers in the same shape, stands in for one. Arrays are cut to their first 4 items.",
                    "value": {
                      "requirements": [
                        {
                          "text": "7+ years of backend development in Java, including recent Spring Boot",
                          "must": true,
                          "rating": "DIRECT",
                          "claim": "Java in production since 2017: Synopsys, then Worldline, then Picsart, whose services are Java 21 and Spring Boot.",
                          "missing": "",
                          "evidence": [
                            {
                              "title": "Picsart: Senior Software Engineer (Jan 2023–now)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Worldline: Java Developer, Payment Security (3-D Secure) (Jul 2019–Jan 2023)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Synopsys: Java Developer (Dec 2017–Jul 2019)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Where I work from, and how",
                              "kind": "profile",
                              "url": "/#contact"
                            }
                          ],
                          "withheld": false
                        },
                        {
                          "text": "Experience with card payments: 3-D Secure, PCI DSS, issuer or acquirer integrations",
                          "must": true,
                          "rating": "DIRECT",
                          "claim": "Three and a half years on 3-D Secure 2.x at Worldline: integrations with acquirers and issuers, PCI DSS, and the edge cases of the critical transaction path.",
                          "missing": "",
                          "evidence": [
                            {
                              "title": "Worldline: Java Developer, Payment Security (3-D Secure) (Jul 2019–Jan 2023)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Payment security",
                              "kind": "expertise",
                              "url": "/#expertise"
                            }
                          ],
                          "withheld": false
                        },
                        {
                          "text": "Production experience with PostgreSQL and Kafka",
                          "must": true,
                          "rating": "DIRECT",
                          "claim": "Event-driven pipelines on Kafka in production at Picsart, and Kafka with PostgreSQL and Oracle at Worldline.",
                          "missing": "",
                          "evidence": [
                            {
                              "title": "Picsart: Senior Software Engineer (Jan 2023–now)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Worldline: Java Developer, Payment Security (3-D Secure) (Jul 2019–Jan 2023)",
                              "kind": "role",
                              "url": "/#experience"
                            }
                          ],
                          "withheld": false
                        },
                        {
                          "text": "Kubernetes in production, on AWS or GCP",
                          "must": true,
                          "rating": "DIRECT",
                          "claim": "Services on Kubernetes (GKE) at Picsart and on Kubernetes at Worldline; GCP and AWS are among the CV's cloud skills.",
                          "missing": "AWS is not described in a role.",
                          "evidence": [
                            {
                              "title": "Picsart: Senior Software Engineer (Jan 2023–now)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Worldline: Java Developer, Payment Security (3-D Secure) (Jul 2019–Jan 2023)",
                              "kind": "role",
                              "url": "/#experience"
                            },
                            {
                              "title": "Skills on the CV: Cloud & delivery",
                              "kind": "skills",
                              "url": "/#experience"
                            }
                          ],
                          "withheld": false
                        }
                      ],
                      "withheld": 0,
                      "drafting": {
                        "model": "scripted",
                        "source": "SCRIPTED",
                        "calls": 2,
                        "inputTokens": null,
                        "outputTokens": null,
                        "costUsd": null,
                        "latencyMillis": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `UNREADABLE_BODY`: The body is not the JSON the operation takes.\n- `POSTING_INVALID`: `posting` breaks a constraint its schema gives.\n- `ALTCHA_INVALID`: `altcha` breaks a constraint its schema gives.\n- `PROOF_OF_WORK_EXPIRED`: The challenge expired before it was used: solve a new one.\n- `PROOF_OF_WORK_INVALID`: The proof of work does not solve a challenge this server issued for this, or was used already.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "UNREADABLE_BODY",
                            "POSTING_INVALID",
                            "ALTCHA_INVALID",
                            "PROOF_OF_WORK_EXPIRED",
                            "PROOF_OF_WORK_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large.\n\n- `CONTENT_TOO_LARGE`: The body is larger than any operation takes: the API reads 2 MB of JSON at most.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CONTENT_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content.\n\n- `NO_REQUIREMENTS_FOUND`: The posting asks for nothing a candidate could show.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "NO_REQUIREMENTS_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway.\n\n- `MODEL_REFUSED`: The model declined to answer.\n- `MODEL_REPLY_CUT_SHORT`: The model's reply was cut short.\n- `MODEL_REPLY_MALFORMED`: The model's reply could not be read.\n- `MODEL_REQUEST_REJECTED`: The model's provider rejected the request.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "MODEL_REFUSED",
                            "MODEL_REPLY_CUT_SHORT",
                            "MODEL_REPLY_MALFORMED",
                            "MODEL_REQUEST_REJECTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `FIT_CHECK_OFF`: A posting of one's own cannot be checked here now: the status says why.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.\n- `MODEL_RATE_LIMITED`: The model's provider is limiting requests; try again in a minute.\n- `MODEL_OVERLOADED`: The model's provider is overloaded; try again shortly.\n- `MODEL_UNAVAILABLE`: The model's provider cannot be reached.\n- `BUDGET_SPENT`: Today's budget for this is spent. It starts again at midnight UTC.\n- `MODEL_BUSY`: As many calls as this allows are running; try again in a minute.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "FIT_CHECK_OFF",
                            "DATABASE_UNAVAILABLE",
                            "MODEL_RATE_LIMITED",
                            "MODEL_OVERLOADED",
                            "MODEL_UNAVAILABLE",
                            "BUDGET_SPENT",
                            "MODEL_BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "fit-check-runs",
          "quota": 3,
          "window": 3600
        }
      }
    },
    "/api/guide/events": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Say that a tour started or finished",
        "description": "Tours play in the browser without a model, so the page says when one starts and when one ends, by the tour's id, and the guide's daily counts take it; nothing else in the body is read. A request with Sec-GPC: 1 or DNT: 1, or one another site's page sent, is answered alike and not counted.",
        "operationId": "recordGuideEvent",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuideEventController.Event"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `UNREADABLE_BODY`: The body is not the JSON the operation takes.\n- `EVENT_INVALID`: `event` breaks a constraint its schema gives.\n- `TOUR_INVALID`: `tour` breaks a constraint its schema gives.\n- `TOUR_UNKNOWN`: There is no tour by that id in the site's manifest.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "UNREADABLE_BODY",
                            "EVENT_INVALID",
                            "TOUR_INVALID",
                            "TOUR_UNKNOWN"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large.\n\n- `CONTENT_TOO_LARGE`: The body is larger than any operation takes: the API reads 2 MB of JSON at most.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CONTENT_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "guide-events",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/introductions": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Draft an introduction",
        "description": "Who you are and what you want to say, with a solved challenge in `altcha`, and, if you choose, your conversation with the site's guide in `conversation`, as text. The draft comes back as it will be kept, with the token that confirms it; it waits 30 minutes for that. Leave `website` out: it is there for programs that fill in every field.",
        "operationId": "draftIntroduction",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Draft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preview"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `POST /api/introductions`.",
                    "value": {
                      "id": "08804f3c-ec62-450d-81b2-3801ea63419a",
                      "name": "Alex Example",
                      "email": "alex@example.com",
                      "company": "Example GmbH",
                      "role": "Engineering manager",
                      "message": "Hello! We are hiring a Java tech lead in Berlin, remote first. Would you like to talk next week?",
                      "token": "cahlfxIXq4_6oQB3Y7VPmndLRC6logBg3rXpupffM7w",
                      "confirmBy": "2026-10-03T18:35:01.707971423Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `UNREADABLE_BODY`: The body is not the JSON the operation takes.\n- `NAME_INVALID`: `name` breaks a constraint its schema gives.\n- `EMAIL_INVALID`: `email` breaks a constraint its schema gives.\n- `COMPANY_INVALID`: `company` breaks a constraint its schema gives.\n- `ROLE_INVALID`: `role` breaks a constraint its schema gives.\n- `MESSAGE_INVALID`: `message` breaks a constraint its schema gives.\n- `CONVERSATION_INVALID`: `conversation` breaks a constraint its schema gives.\n- `ALTCHA_INVALID`: `altcha` breaks a constraint its schema gives.\n- `TOO_MANY_LINKS`: The message carries more links than a few words to a person would.\n- `CONVERSATION_TOO_MANY_LINKS`: The conversation sent with the introduction carries more links than a conversation with the guide would.\n- `PROOF_OF_WORK_EXPIRED`: The challenge expired before it was used: solve a new one.\n- `PROOF_OF_WORK_INVALID`: The proof of work does not solve a challenge this server issued for this, or was used already.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "UNREADABLE_BODY",
                            "NAME_INVALID",
                            "EMAIL_INVALID",
                            "COMPANY_INVALID",
                            "ROLE_INVALID",
                            "MESSAGE_INVALID",
                            "CONVERSATION_INVALID",
                            "ALTCHA_INVALID",
                            "TOO_MANY_LINKS",
                            "CONVERSATION_TOO_MANY_LINKS",
                            "PROOF_OF_WORK_EXPIRED",
                            "PROOF_OF_WORK_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large.\n\n- `CONTENT_TOO_LARGE`: The body is larger than any operation takes: the API reads 2 MB of JSON at most.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CONTENT_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.\n- `DATABASE_NOT_MIGRATED`: The database lacks the experiment's tables: its migrations have not run.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED",
                            "DATABASE_NOT_MIGRATED",
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "introductions",
          "quota": 10,
          "window": 3600
        }
      }
    },
    "/api/introductions/challenge": {
      "get": {
        "tags": [
          "Site"
        ],
        "summary": "A proof-of-work challenge",
        "description": "A challenge by version 1 of ALTCHA's protocol, to solve before sending a draft: find the number from 0 to `maxnumber` whose SHA-256, after the salt, is the challenge. Good for ten minutes and for one draft.",
        "operationId": "getIntroductionChallenge",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Challenge"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/introductions/challenge`.",
                    "value": {
                      "algorithm": "SHA-256",
                      "challenge": "7e2c8fc8b6d775d8e0b87adcdd3fccf3762b38d243ea9baccb36b4e55711ba5e",
                      "maxnumber": 100000,
                      "salt": "d935dc0d911fea7a18d0f41d?expires=1791061866&purpose=introduction&",
                      "signature": "126bae74a27bdf4cf812b4a26b237365098e79ed4bc23893f249736bc3d5c6a5"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "introduction-challenges",
          "quota": 20,
          "window": 60
        }
      }
    },
    "/api/introductions/{id}/confirmation": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Confirm an introduction",
        "description": "Sends the draft on, with the token it came back with. Confirming twice is confirming once.",
        "operationId": "confirmIntroduction",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The draft's id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Confirmation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.\n- `UNREADABLE_BODY`: The body is not the JSON the operation takes.\n- `TOKEN_INVALID`: `token` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "INVALID_PARAMETER",
                            "UNREADABLE_BODY",
                            "TOKEN_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found.\n\n- `INTRODUCTION_NOT_FOUND`: No draft with that id and token is waiting.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTRODUCTION_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict.\n\n- `INTRODUCTION_EXPIRED`: The draft was not confirmed in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTRODUCTION_EXPIRED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large.\n\n- `CONTENT_TOO_LARGE`: The body is larger than any operation takes: the API reads 2 MB of JSON at most.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CONTENT_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.\n- `DATABASE_NOT_MIGRATED`: The database lacks the experiment's tables: its migrations have not run.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED",
                            "DATABASE_NOT_MIGRATED",
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "introductions",
          "quota": 10,
          "window": 3600
        }
      }
    },
    "/api/lab/fibonacci": {
      "get": {
        "tags": [
          "Lab: the JVM"
        ],
        "summary": "Five ways to compute F(n)",
        "description": "Naive recursion, memoized recursion, a loop, matrix exponentiation and fast doubling, on BigInteger. Each reports OK with the median of up to five timed runs after warm-up, or SKIPPED with the reason, STACK_OVERFLOW or TIMEOUT. Two races compute at a time; a third waits two seconds, then 429 BUSY.",
        "operationId": "runFibonacci",
        "parameters": [
          {
            "name": "n",
            "in": "query",
            "description": "Which Fibonacci number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000000,
              "minimum": 0
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FibonacciReport"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/lab/fibonacci?n=90`. Arrays are cut to their first 4 items.",
                    "value": {
                      "n": 90,
                      "digits": 19,
                      "leadingDigits": "2880067194370816120",
                      "trailingDigits": "2880067194370816120",
                      "value": "2880067194370816120",
                      "results": [
                        {
                          "algorithm": "NAIVE_RECURSION",
                          "label": "Naive recursion",
                          "complexity": "O(φⁿ)",
                          "status": "SKIPPED",
                          "nanos": null,
                          "runs": 0,
                          "operations": null,
                          "maxDepth": null,
                          "note": "Skipped above n = 40: would need ≈9.3×10^18 calls"
                        },
                        {
                          "algorithm": "MEMOIZED_RECURSION",
                          "label": "Memoized recursion",
                          "complexity": "O(n)",
                          "status": "OK",
                          "nanos": 10653,
                          "runs": 5,
                          "operations": 179,
                          "maxDepth": 90,
                          "note": null
                        },
                        {
                          "algorithm": "ITERATIVE",
                          "label": "Iterative",
                          "complexity": "O(n) additions",
                          "status": "OK",
                          "nanos": 4695,
                          "runs": 5,
                          "operations": 89,
                          "maxDepth": null,
                          "note": null
                        },
                        {
                          "algorithm": "MATRIX_POWER",
                          "label": "Matrix exponentiation",
                          "complexity": "O(log n) multiplications",
                          "status": "OK",
                          "nanos": 16122,
                          "runs": 5,
                          "operations": 80,
                          "maxDepth": null,
                          "note": null
                        }
                      ],
                      "environment": {
                        "javaVersion": "25.0.4.1",
                        "availableProcessors": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.\n- `N_OUT_OF_RANGE`: `n` is outside 0 to 1,000,000.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER",
                            "N_OUT_OF_RANGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "fibonacci",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/lab/jit": {
      "get": {
        "tags": [
          "Lab: the JVM"
        ],
        "summary": "Watch the JIT compile, then deoptimise",
        "description": "A cold copy of a small loop, in a class loader of its own, timed in 240 batches as its call site meets one, two, then four receiver types, with the compilations and deoptimisations Flight Recorder reported for it, each placed in its batch. One benchmark at a time on the server.",
        "operationId": "runJit",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JitReport"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/lab/jit`. Arrays are cut to their first 4 items.",
                    "value": {
                      "completed": true,
                      "callsPerBatch": 20000,
                      "batches": [
                        {
                          "index": 0,
                          "shape": "MONOMORPHIC",
                          "nanos": 487827
                        },
                        {
                          "index": 1,
                          "shape": "MONOMORPHIC",
                          "nanos": 301288
                        },
                        {
                          "index": 2,
                          "shape": "MONOMORPHIC",
                          "nanos": 323336
                        },
                        {
                          "index": 3,
                          "shape": "MONOMORPHIC",
                          "nanos": 292164
                        }
                      ],
                      "events": [
                        {
                          "batch": 0,
                          "kind": "COMPILED",
                          "method": "Shapes.Circle.<init>",
                          "detail": "c1, tier 2"
                        },
                        {
                          "batch": 0,
                          "kind": "COMPILED",
                          "method": "Shapes.Circle.area",
                          "detail": "c1, tier 2"
                        },
                        {
                          "batch": 3,
                          "kind": "COMPILED",
                          "method": "Shapes.totalArea",
                          "detail": "c1, tier 3, on-stack replacement"
                        },
                        {
                          "batch": 3,
                          "kind": "COMPILED",
                          "method": "Shapes.totalArea",
                          "detail": "c1, tier 3"
                        }
                      ],
                      "summary": {
                        "firstNanos": 487827,
                        "monomorphicNanos": 66602,
                        "bimorphicNanos": 71202,
                        "megamorphicNanos": 54182
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `JIT_UNAVAILABLE`: Flight Recorder is not available on this server.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "JIT_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "jit",
          "quota": 10,
          "window": 60
        }
      }
    },
    "/api/lab/leak/stream": {
      "get": {
        "tags": [
          "Lab: the JVM"
        ],
        "summary": "A memory leak on a real collector",
        "description": "Server-sent events: a JVM of its own, 64 MB of heap, runs the leak or its fix under Serial, G1 or ZGC. `start`; `gc` for every collection that reports the heap; `stopped` for every quarter second in which the application stood still; then `end` with OUT_OF_MEMORY and when, or SURVIVED after 20 s; or `error`.",
        "operationId": "streamLeak",
        "parameters": [
          {
            "name": "collector",
            "in": "query",
            "description": "The garbage collector the child JVM runs",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "SERIAL",
                "G1",
                "Z"
              ]
            }
          },
          {
            "name": "policy",
            "in": "query",
            "description": "LEAK, a map that never lets go; FIX, weak values with a time to live",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "LEAK",
                "FIX"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent events, as the operation describes them. An `error` event ends a stream that fails, with a problem:\n\n- `LEAK_UNAVAILABLE`: The server cannot start the JVM a run needs.\n- `CANCELLED`: The run was stopped before it finished, as when the server shuts down.\n- `TIMEOUT`: The run took too long and was stopped.\n- `CHILD_FAILED`: The run's JVM ended without finishing it.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The stream that answered `GET /api/lab/leak/stream?collector=Z&policy=FIX`. Of its 130 events, the first and the last of each kind.",
                    "value": "event:start\ndata:{\"collector\":\"Z\",\"policy\":\"FIX\",\"heapMB\":64,\"seconds\":20}\n\nevent:gc\ndata:{\"at\":90,\"gcId\":0,\"name\":\"Major Collection (Warmup)\",\"beforeMB\":8,\"afterMB\":8,\"includesOld\":true}\n\n: 2 events left out\n\nevent:stopped\ndata:{\"from\":0,\"stopped\":{\"pauses\":15,\"pauseMillis\":0.128,\"longestPauseMillis\":0.063,\"stalls\":0,\"stallMillis\":0.0}}\n\n: 122 events left out\n\nevent:gc\ndata:{\"at\":19678,\"gcId\":70,\"name\":\"Major Collection (Proactive)\",\"beforeMB\":32,\"afterMB\":18,\"includesOld\":true}\n\nevent:stopped\ndata:{\"from\":19500,\"stopped\":{\"pauses\":8,\"pauseMillis\":0.058,\"longestPauseMillis\":0.015,\"stalls\":0,\"stallMillis\":0.0}}\n\nevent:end\ndata:{\"outcome\":\"SURVIVED\",\"atMillis\":20000,\"collections\":71,\"oldCollections\":49,\"stopped\":{\"pauses\":311,\"pauseMillis\":1.971,\"longestPauseMillis\":0.063,\"stalls\":0,\"stallMillis\":0.0}}\n\n"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `LEAK_UNAVAILABLE`: The server cannot start the JVM a run needs.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "LEAK_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "leak",
          "quota": 6,
          "window": 60
        }
      }
    },
    "/api/lab/ledger/reconciliation": {
      "get": {
        "tags": [
          "Lab: PostgreSQL"
        ],
        "summary": "Reconcile the ledger",
        "description": "The drift between cached balances and entries, as the last run left it.",
        "operationId": "getReconciliation",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reconciliation"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/lab/ledger/reconciliation`.",
                    "value": {
                      "accountsDrifted": 0,
                      "moneyCreated": 0,
                      "moneyDestroyed": 0,
                      "worst": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.\n- `DATABASE_NOT_MIGRATED`: The database lacks the experiment's tables: its migrations have not run.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED",
                            "DATABASE_NOT_MIGRATED",
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "database",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/lab/ledger/runs": {
      "post": {
        "tags": [
          "Lab: PostgreSQL"
        ],
        "summary": "A ledger under concurrent transfers",
        "description": "Resets the ledger, makes the same 1,000 transfers from 16 connections under one strategy, then checks four invariants by SQL and reconciles cached balances against entries. A POST: it rewrites the ledger. The response names the run's `traceId`.",
        "operationId": "runLedger",
        "parameters": [
          {
            "name": "strategy",
            "in": "query",
            "description": "How a transfer moves the money",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "READ_MODIFY_WRITE",
                "GUARDED_UPDATE",
                "LOCK_UNORDERED",
                "LOCK_ORDERED",
                "OPTIMISTIC",
                "SERIALIZABLE"
              ]
            }
          },
          {
            "name": "hotSpot",
            "in": "query",
            "description": "The share of transfers between four hot accounts, in per cent",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 100,
              "minimum": 0
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerReport"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `POST /api/lab/ledger/runs?strategy=LOCK_ORDERED&hotSpot=20`.",
                    "value": {
                      "strategy": "LOCK_ORDERED",
                      "hotSpotPercent": 20,
                      "transfers": 1000,
                      "workers": 16,
                      "committed": 1000,
                      "insufficientFunds": 0,
                      "gaveUp": 0,
                      "failed": 0,
                      "notStarted": 0,
                      "deadlocks": 0,
                      "serializationFailures": 0,
                      "conflicts": 0,
                      "elapsedMs": 1115,
                      "throughput": 896.2,
                      "latencyP50Ms": 4,
                      "latencyP99Ms": 158,
                      "invariants": [
                        {
                          "name": "Money is neither created nor destroyed",
                          "holds": true,
                          "detail": "100,000.00 in all, as at the start"
                        },
                        {
                          "name": "No balance below zero",
                          "holds": true,
                          "detail": "every account covers itself"
                        },
                        {
                          "name": "Every transfer’s entries sum to zero",
                          "holds": true,
                          "detail": "the database refuses any that do not"
                        },
                        {
                          "name": "Balances agree with the entries",
                          "holds": true,
                          "detail": "reconciliation finds nothing"
                        }
                      ],
                      "reconciliation": {
                        "accountsDrifted": 0,
                        "moneyCreated": 0,
                        "moneyDestroyed": 0,
                        "worst": []
                      },
                      "traceId": "768f8b85a124217574c2aa423fd75119"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.\n- `HOT_SPOT_OUT_OF_RANGE`: `hotSpot` is outside 0 to 100.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER",
                            "HOT_SPOT_OUT_OF_RANGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.\n- `DATABASE_NOT_MIGRATED`: The database lacks the experiment's tables: its migrations have not run.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.\n- `INTERRUPTED`: The run was interrupted, as when the server shuts down.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED",
                            "DATABASE_NOT_MIGRATED",
                            "DATABASE_UNAVAILABLE",
                            "INTERRUPTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "ledger",
          "quota": 6,
          "window": 60
        }
      }
    },
    "/api/lab/outbox/runs": {
      "post": {
        "tags": [
          "Lab: PostgreSQL"
        ],
        "summary": "An outbox under crash injection",
        "description": "Places 500 orders under one of three designs while processes die at chosen moments, then counts on the database what was lost, invented, sent again and done again. A POST: it empties the experiment's tables.",
        "operationId": "runOutbox",
        "parameters": [
          {
            "name": "design",
            "in": "query",
            "description": "How the service saves and announces an order",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "COMMIT_THEN_PUBLISH",
                "PUBLISH_THEN_COMMIT",
                "OUTBOX"
              ]
            }
          },
          {
            "name": "crashPercent",
            "in": "query",
            "description": "The chance of dying at each crash point, each time one is reached",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 50,
              "minimum": 0
            }
          },
          {
            "name": "dedup",
            "in": "query",
            "description": "Whether the consumer acts on each message id once",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutboxReport"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `POST /api/lab/outbox/runs?design=OUTBOX&crashPercent=10&dedup=true`.",
                    "value": {
                      "design": "OUTBOX",
                      "crashPercent": 10,
                      "dedup": true,
                      "orders": 500,
                      "answered": 446,
                      "committed": 446,
                      "published": 446,
                      "duplicatePublishes": 58,
                      "lost": 0,
                      "phantoms": 0,
                      "deliveries": 566,
                      "effects": 446,
                      "duplicateEffects": 0,
                      "missingEffects": 0,
                      "effectsWithoutOrder": 0,
                      "crashes": {
                        "BETWEEN_WRITES": 0,
                        "RELAY_AFTER_PUBLISH": 58,
                        "CONSUMER_AFTER_EFFECT": 62,
                        "BEFORE_COMMIT": 54
                      },
                      "restarts": 120,
                      "elapsedMs": 2602,
                      "verdicts": [
                        {
                          "name": "Every saved order was announced",
                          "holds": true,
                          "detail": "the broker has an event for every order"
                        },
                        {
                          "name": "Nothing was announced that did not happen",
                          "holds": true,
                          "detail": "every event has its order"
                        },
                        {
                          "name": "Every order was acted on exactly once",
                          "holds": true,
                          "detail": "one action per saved order, none for anything else"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.\n- `CRASH_PERCENT_OUT_OF_RANGE`: `crashPercent` is outside 0 to 50.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER",
                            "CRASH_PERCENT_OUT_OF_RANGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.\n- `DATABASE_NOT_MIGRATED`: The database lacks the experiment's tables: its migrations have not run.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.\n- `INTERRUPTED`: The run was interrupted, as when the server shuts down.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED",
                            "DATABASE_NOT_MIGRATED",
                            "DATABASE_UNAVAILABLE",
                            "INTERRUPTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "outbox",
          "quota": 6,
          "window": 60
        }
      }
    },
    "/api/lab/pool/stream": {
      "get": {
        "tags": [
          "Lab: PostgreSQL"
        ],
        "summary": "Ten thousand threads, twenty connections",
        "description": "Server-sent events: requests on virtual threads against a PostgreSQL pool of the run's own, for 5 s, under an admission policy. `start` (with the pool's ceiling by Little's law, and the run's `traceId`), `progress` every 200 ms, `result`, then `done`; `error` when the pool cannot be opened.",
        "operationId": "streamPool",
        "parameters": [
          {
            "name": "poolSize",
            "in": "query",
            "description": "Connections in the run's pool",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 20,
              "minimum": 5
            }
          },
          {
            "name": "holdMillis",
            "in": "query",
            "description": "How long each request holds its connection",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 500,
              "minimum": 10
            }
          },
          {
            "name": "rate",
            "in": "query",
            "description": "Requests arriving each second",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000,
              "minimum": 10
            }
          },
          {
            "name": "policy",
            "in": "query",
            "description": "What a request does when every connection is taken",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "UNBOUNDED",
                "THROTTLE",
                "FAIL_FAST"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent events, as the operation describes them. An `error` event ends a stream that fails, with a problem:\n\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.\n- `CANCELLED`: The run was stopped before it finished, as when the server shuts down.\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The stream that answered `GET /api/lab/pool/stream?poolSize=10&holdMillis=50&rate=500&policy=THROTTLE`. Of its 67 events, the first and the last of each kind.",
                    "value": "event:start\ndata:{\"spec\":{\"poolSize\":10,\"holdMillis\":50,\"ratePerSecond\":500,\"policy\":\"THROTTLE\"},\"requests\":2500,\"capacityPerSecond\":200.0,\"connectionTimeoutMs\":1000,\"traceId\":\"5fb11f17c661cff72c3895fd7b917c95\"}\n\nevent:progress\ndata:{\"elapsedMs\":201,\"arrived\":101,\"completed\":30,\"timedOut\":0,\"rejected\":0,\"holding\":10,\"waitingForConnection\":0,\"waitingAtGate\":61}\n\n: 62 events left out\n\nevent:progress\ndata:{\"elapsedMs\":12683,\"arrived\":2500,\"completed\":2500,\"timedOut\":0,\"rejected\":0,\"holding\":0,\"waitingForConnection\":0,\"waitingAtGate\":0}\n\nevent:result\ndata:{\"requests\":2500,\"completed\":2500,\"timedOut\":0,\"rejected\":0,\"cutOff\":0,\"failed\":0,\"elapsedMs\":12683,\"throughput\":197.1,\"capacityPerSecond\":200.0,\"latencyP50Ms\":3861,\"latencyP99Ms\":7627,\"acquireP50Ms\":0,\"acquireP99Ms\":0}\n\nevent:done\ndata:{}\n\n"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.\n- `POOL_SIZE_OUT_OF_RANGE`: `poolSize` is outside 5 to 20.\n- `HOLD_MILLIS_OUT_OF_RANGE`: `holdMillis` is outside 10 to 500.\n- `RATE_OUT_OF_RANGE`: `rate` is outside 10 to 1,000.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER",
                            "POOL_SIZE_OUT_OF_RANGE",
                            "HOLD_MILLIS_OUT_OF_RANGE",
                            "RATE_OUT_OF_RANGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "pool",
          "quota": 6,
          "window": 60
        }
      }
    },
    "/api/lab/profiler": {
      "get": {
        "tags": [
          "Lab: the JVM"
        ],
        "summary": "Where the time goes, by Flight Recorder",
        "description": "A scenario profiled while it runs: its flame graph, hottest frames, monitor waits, allocation by class and collections, as the problem or as its fix. One benchmark at a time on the server.",
        "operationId": "runProfiler",
        "parameters": [
          {
            "name": "scenario",
            "in": "query",
            "description": "The workload to profile",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "HOT_LOCK",
                "ALLOCATION_CHURN",
                "QUADRATIC_DEDUPE"
              ]
            }
          },
          {
            "name": "variant",
            "in": "query",
            "description": "PROBLEM, as written first; FIX, as it should be",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "PROBLEM",
                "FIX"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileReport"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/lab/profiler?scenario=HOT_LOCK&variant=PROBLEM`.",
                    "value": {
                      "scenario": "HOT_LOCK",
                      "variant": "PROBLEM",
                      "completed": true,
                      "wallMs": 2274,
                      "threads": 4,
                      "checksum": "10000000",
                      "samples": 199,
                      "tree": {
                        "name": "all",
                        "total": 199,
                        "self": 0,
                        "children": [
                          {
                            "name": "HotLock.incrementUnderMonitor",
                            "total": 199,
                            "self": 83,
                            "children": [
                              {
                                "name": "HotLock.Counter.increment",
                                "total": 116,
                                "self": 116,
                                "children": []
                              }
                            ]
                          }
                        ]
                      },
                      "hottest": [
                        {
                          "frame": "HotLock.Counter.increment",
                          "self": 116,
                          "share": 0.583
                        },
                        {
                          "frame": "HotLock.incrementUnderMonitor",
                          "self": 83,
                          "share": 0.417
                        }
                      ],
                      "locks": {
                        "waits": 8266,
                        "totalMs": 3187,
                        "monitor": "HotLock.Counter"
                      },
                      "allocations": {
                        "sampledBytes": 0,
                        "byClass": []
                      },
                      "gc": {
                        "collections": 1,
                        "pauseTotalMs": 10,
                        "longestPauseMs": 10
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `INTERRUPTED`: The run was interrupted, as when the server shuts down.\n- `PROFILER_UNAVAILABLE`: Flight Recorder is not available on this server.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERRUPTED",
                            "PROFILER_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "profiler",
          "quota": 10,
          "window": 60
        }
      }
    },
    "/api/lab/search": {
      "get": {
        "tags": [
          "Lab: PostgreSQL"
        ],
        "summary": "Search a million rows four ways",
        "description": "The same words in a catalogue of a million products: ILIKE on every row, the same ILIKE on a trigram index, word similarity, full text. Each counts every match, returns ten, and is explained by PostgreSQL.",
        "operationId": "runSearch",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "The words, trimmed: at most 60 characters, no control characters",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 60,
              "minLength": 1,
              "pattern": "^[^\\x00-\\x1F\\x7F]*$"
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchReport"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/lab/search?q=walnut%20desk`. Arrays are cut to their first 4 items.",
                    "value": {
                      "query": "walnut desk",
                      "catalogue": {
                        "products": 1000000,
                        "bytes": 262594560
                      },
                      "methods": [
                        {
                          "method": "SCAN",
                          "outcome": "COMPLETED",
                          "total": 1995,
                          "top": [
                            {
                              "id": 776484,
                              "title": "Alder & Co Scandinavian walnut desk, charcoal",
                              "category": "Tables",
                              "priceCents": 38356,
                              "score": null
                            },
                            {
                              "id": 386607,
                              "title": "Alder & Co Scandinavian walnut desk, ivory",
                              "category": "Tables",
                              "priceCents": 43950,
                              "score": null
                            },
                            {
                              "id": 54282,
                              "title": "Alder & Co Scandinavian walnut desk, ochre",
                              "category": "Tables",
                              "priceCents": 95455,
                              "score": null
                            },
                            {
                              "id": 173738,
                              "title": "Alder & Co classic walnut desk, terracotta",
                              "category": "Tables",
                              "priceCents": 29096,
                              "score": null
                            }
                          ],
                          "plan": {
                            "access": "EVERY_ROW",
                            "index": null,
                            "workers": 2,
                            "rowsRead": 999999,
                            "blocksHit": 4163,
                            "blocksRead": 17396,
                            "planningMs": 0.126,
                            "executionMs": 424.019,
                            "steps": [
                              {
                                "depth": 0,
                                "node": "Limit",
                                "on": null,
                                "rows": 10,
                                "loops": 1
                              },
                              {
                                "depth": 1,
                                "node": "WindowAgg",
                                "on": null,
                                "rows": 10,
                                "loops": 1
                              },
                              {
                                "depth": 2,
                                "node": "Gather Merge",
                                "on": null,
                                "rows": 1995,
                                "loops": 1
                              },
                              {
                                "depth": 3,
                                "node": "Sort",
                                "on": null,
                                "rows": 665,
                                "loops": 3
                              }
                            ]
                          }
                        },
                        {
                          "method": "TRIGRAM",
                          "outcome": "COMPLETED",
                          "total": 1995,
                          "top": [
                            {
                              "id": 776484,
                              "title": "Alder & Co Scandinavian walnut desk, charcoal",
                              "category": "Tables",
                              "priceCents": 38356,
                              "score": null
                            },
                            {
                              "id": 386607,
                              "title": "Alder & Co Scandinavian walnut desk, ivory",
                              "category": "Tables",
                              "priceCents": 43950,
                              "score": null
                            },
                            {
                              "id": 54282,
                              "title": "Alder & Co Scandinavian walnut desk, ochre",
                              "category": "Tables",
                              "priceCents": 95455,
                              "score": null
                            },
                            {
                              "id": 173738,
                              "title": "Alder & Co classic walnut desk, terracotta",
                              "category": "Tables",
                              "priceCents": 29096,
                              "score": null
                            }
                          ],
                          "plan": {
                            "access": "INDEX",
                            "index": "products_title_trgm",
                            "workers": 0,
                            "rowsRead": 1995,
                            "blocksHit": 2175,
                            "blocksRead": 0,
                            "planningMs": 0.109,
                            "executionMs": 9.666,
                            "steps": [
                              {
                                "depth": 0,
                                "node": "Limit",
                                "on": null,
                                "rows": 10,
                                "loops": 1
                              },
                              {
                                "depth": 1,
                                "node": "Sort",
                                "on": null,
                                "rows": 10,
                                "loops": 1
                              },
                              {
                                "depth": 2,
                                "node": "WindowAgg",
                                "on": null,
                                "rows": 1995,
                                "loops": 1
                              },
                              {
                                "depth": 3,
                                "node": "Bitmap Heap Scan",
                                "on": "products",
                                "rows": 1995,
                                "loops": 1
                              }
                            ]
                          }
                        },
                        {
                          "method": "TYPO",
                          "outcome": "COMPLETED",
                          "total": 1995,
                          "top": [
                            {
                              "id": 899,
                              "title": "Fenwick classic walnut desk, black",
                              "category": "Tables",
                              "priceCents": 71261,
                              "score": 1
                            },
                            {
                              "id": 1245,
                              "title": "Brume vintage walnut desk, ochre",
                              "category": "Tables",
                              "priceCents": 84226,
                              "score": 1
                            },
                            {
                              "id": 1339,
                              "title": "Alder & Co curved walnut desk, white",
                              "category": "Tables",
                              "priceCents": 91197,
                              "score": 1
                            },
                            {
                              "id": 1566,
                              "title": "Ashby tall walnut desk, white",
                              "category": "Tables",
                              "priceCents": 38831,
                              "score": 1
                            }
                          ],
                          "plan": {
                            "access": "INDEX",
                            "index": "products_title_trgm",
                            "workers": 0,
                            "rowsRead": 3597,
                            "blocksHit": 3707,
                            "blocksRead": 0,
                            "planningMs": 0.383,
                            "executionMs": 37.53,
                            "steps": [
                              {
                                "depth": 0,
                                "node": "Limit",
                                "on": null,
                                "rows": 10,
                                "loops": 1
                              },
                              {
                                "depth": 1,
                                "node": "Sort",
                                "on": null,
                                "rows": 10,
                                "loops": 1
                              },
                              {
                                "depth": 2,
                                "node": "WindowAgg",
                                "on": null,
                                "rows": 1995,
                                "loops": 1
                              },
                              {
                                "depth": 3,
                                "node": "Bitmap Heap Scan",
                                "on": "products",
                                "rows": 1995,
                                "loops": 1
                              }
                            ]
                          }
                        },
                        {
                          "method": "FULL_TEXT",
                          "outcome": "COMPLETED",
                          "total": 1995,
                          "top": [
                            {
                              "id": 899,
                              "title": "Fenwick classic walnut desk, black",
                              "category": "Tables",
                              "priceCents": 71261,
                              "score": 0.09910322
                            },
                            {
                              "id": 1245,
                              "title": "Brume vintage walnut desk, ochre",
                              "category": "Tables",
                              "priceCents": 84226,
                              "score": 0.09910322
                            },
                            {
                              "id": 1339,
                              "title": "Alder & Co curved walnut desk, white",
                              "category": "Tables",
                              "priceCents": 91197,
                              "score": 0.09910322
                            },
                            {
                              "id": 1566,
                              "title": "Ashby tall walnut desk, white",
                              "category": "Tables",
                              "priceCents": 38831,
                              "score": 0.09910322
                            }
                          ],
                          "plan": {
                            "access": "INDEX",
                            "index": "products_search",
                            "workers": 0,
                            "rowsRead": 1995,
                            "blocksHit": 2027,
                            "blocksRead": 0,
                            "planningMs": 0.05,
                            "executionMs": 4.428,
                            "steps": [
                              {
                                "depth": 0,
                                "node": "Limit",
                                "on": null,
                                "rows": 10,
                                "loops": 1
                              },
                              {
                                "depth": 1,
                                "node": "Sort",
                                "on": null,
                                "rows": 10,
                                "loops": 1
                              },
                              {
                                "depth": 2,
                                "node": "WindowAgg",
                                "on": null,
                                "rows": 1995,
                                "loops": 1
                              },
                              {
                                "depth": 3,
                                "node": "Bitmap Heap Scan",
                                "on": "products",
                                "rows": 1995,
                                "loops": 1
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `Q_INVALID`: `q` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "Q_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.\n- `DATABASE_NOT_MIGRATED`: The database lacks the experiment's tables: its migrations have not run.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED",
                            "DATABASE_NOT_MIGRATED",
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "search",
          "quota": 10,
          "window": 60
        }
      }
    },
    "/api/lab/threads/stream": {
      "get": {
        "tags": [
          "Lab: the JVM"
        ],
        "summary": "Platform threads against virtual threads",
        "description": "Server-sent events: the same workload on a fixed pool of platform threads, then on virtual threads. `start` and `result` for each, `progress` between, then `done`. Each `result` carries `pinnedEvents`, the virtual phase's pinning count from Flight Recorder. One benchmark at a time on the server.",
        "operationId": "streamThreads",
        "parameters": [
          {
            "name": "tasks",
            "in": "query",
            "description": "Tasks to run",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 20000,
              "minimum": 1
            }
          },
          {
            "name": "ioMillis",
            "in": "query",
            "description": "Milliseconds each task sleeps, or computes",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "name": "poolSize",
            "in": "query",
            "description": "Platform threads in the fixed pool",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "name": "workload",
            "in": "query",
            "description": "Sleep, sleep holding a monitor, sleep beneath a native frame, or compute",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "IO",
                "SYNCHRONIZED",
                "NATIVE",
                "CPU"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent events, as the operation describes them. An `error` event ends a stream that fails, with a problem:\n\n- `CANCELLED`: The run was stopped before it finished, as when the server shuts down.\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The stream that answered `GET /api/lab/threads/stream?tasks=2000&ioMillis=20&poolSize=100&workload=IO`. Of its 19 events, the first and the last of each kind.",
                    "value": "event:start\ndata:{\"executor\":\"PLATFORM\",\"tasks\":2000,\"poolSize\":100,\"workload\":\"IO\",\"ioMillis\":20,\"carrierThreads\":1}\n\nevent:progress\ndata:{\"executor\":\"PLATFORM\",\"completed\":400,\"elapsedMs\":100}\n\n: 3 events left out\n\nevent:result\ndata:{\"executor\":\"PLATFORM\",\"tasks\":2000,\"completed\":2000,\"wallMs\":415,\"throughputPerSec\":4817.5,\"waitP50Ms\":180,\"waitP99Ms\":378,\"timedOut\":false,\"peakLiveThreads\":128,\"pinnedEvents\":null}\n\nevent:start\ndata:{\"executor\":\"VIRTUAL\",\"tasks\":2000,\"poolSize\":null,\"workload\":\"IO\",\"ioMillis\":20,\"carrierThreads\":1}\n\n: 9 events left out\n\nevent:progress\ndata:{\"executor\":\"VIRTUAL\",\"completed\":2000,\"elapsedMs\":997}\n\nevent:result\ndata:{\"executor\":\"VIRTUAL\",\"tasks\":2000,\"completed\":2000,\"wallMs\":25,\"throughputPerSec\":78456.2,\"waitP50Ms\":1,\"waitP99Ms\":3,\"timedOut\":false,\"peakLiveThreads\":28,\"pinnedEvents\":0}\n\nevent:done\ndata:{}\n\n"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.\n- `TASKS_OUT_OF_RANGE`: `tasks` is outside 1 to 20,000.\n- `IO_MILLIS_OUT_OF_RANGE`: `ioMillis` is outside 1 to 1,000.\n- `POOL_SIZE_OUT_OF_RANGE`: `poolSize` is outside 1 to 1,000.\n- `CPU_BUDGET_EXCEEDED`: The CPU workload asks for more computation than a run may spend: tasks × ioMillis is capped.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER",
                            "TASKS_OUT_OF_RANGE",
                            "IO_MILLIS_OUT_OF_RANGE",
                            "POOL_SIZE_OUT_OF_RANGE",
                            "CPU_BUDGET_EXCEEDED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `NATIVE_UNAVAILABLE`: The NATIVE workload's native frame could not be linked on this server.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "NATIVE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "threads",
          "quota": 6,
          "window": 60
        }
      }
    },
    "/api/lab/threads/thread-locals": {
      "get": {
        "tags": [
          "Lab: the JVM"
        ],
        "summary": "The ThreadLocal trap",
        "description": "For each way of getting a date formatter, on each executor, the formatters created, heap allocated per task and wall time: a ThreadLocal cache that works on a pool of platform threads creates one per task on virtual threads.",
        "operationId": "runThreadLocals",
        "parameters": [
          {
            "name": "tasks",
            "in": "query",
            "description": "Tasks to run",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 20000,
              "minimum": 1
            }
          },
          {
            "name": "poolSize",
            "in": "query",
            "description": "Platform threads in the fixed pool",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadLocalReport"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/lab/threads/thread-locals?tasks=10000&poolSize=200`. Arrays are cut to their first 4 items.",
                    "value": {
                      "tasks": 10000,
                      "poolSize": 200,
                      "carrierThreads": 1,
                      "cells": [
                        {
                          "source": "THREAD_LOCAL",
                          "executor": "PLATFORM",
                          "formattersCreated": 200,
                          "allocatedBytesPerTask": 706,
                          "wallMicros": 210484
                        },
                        {
                          "source": "THREAD_LOCAL",
                          "executor": "VIRTUAL",
                          "formattersCreated": 10000,
                          "allocatedBytesPerTask": 2831,
                          "wallMicros": 116645
                        },
                        {
                          "source": "PER_CALL",
                          "executor": "PLATFORM",
                          "formattersCreated": 10000,
                          "allocatedBytesPerTask": 2394,
                          "wallMicros": 269622
                        },
                        {
                          "source": "PER_CALL",
                          "executor": "VIRTUAL",
                          "formattersCreated": 10000,
                          "allocatedBytesPerTask": 2700,
                          "wallMicros": 27316
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.\n- `TASKS_OUT_OF_RANGE`: `tasks` is outside 1 to 20,000.\n- `POOL_SIZE_OUT_OF_RANGE`: `poolSize` is outside 1 to 1,000.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER",
                            "TASKS_OUT_OF_RANGE",
                            "POOL_SIZE_OUT_OF_RANGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.\n- `BUSY`: The server is running another benchmark, or its lab workers are all taken.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED",
                            "BUSY"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `INTERRUPTED`: The run was interrupted, as when the server shuts down.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERRUPTED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "threads",
          "quota": 6,
          "window": 60
        }
      }
    },
    "/api/lab/threeds/authentications": {
      "post": {
        "tags": [
          "Lab: payments"
        ],
        "summary": "Send an AReq to a simulated ACS",
        "description": "An AReq of EMV 3-D Secure 2.2.0, as a 3DS Server would send it: a JSON object of string elements, a subset of the specification's, flat; at most 80 of them, each at most 4,096 characters. The simulated ACS checks it, answering an invalid one with an Erro; asks its risk rules, among them the exemptions from strong customer authentication; and answers with an ARes: authenticated without friction, a challenge, not authenticated or rejected. Every message on the way, the rules' reasoning and the time each hop takes.",
        "operationId": "runThreeDsAuthentication",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 4096
                },
                "maxProperties": 80,
                "propertyNames": {
                  "maxLength": 64
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreeDsRun"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-04",
                    "description": "The response to `POST /api/lab/threeds/authentications`. Arrays are cut to their first 4 items.",
                    "value": {
                      "acsTransID": "4047e5c5-b8d6-4f1f-b971-1dc97734deb3",
                      "phase": "CHALLENGED",
                      "transStatus": null,
                      "steps": [
                        {
                          "from": "3DS Server",
                          "to": "ACS",
                          "via": "Directory Server",
                          "message": "AReq",
                          "fields": {
                            "messageType": "AReq",
                            "messageVersion": "2.2.0",
                            "deviceChannel": "02",
                            "messageCategory": "01",
                            "threeDSServerTransID": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e",
                            "threeDSServerRefNumber": "3DS-SERVER-EXAMPLE-01",
                            "threeDSServerURL": "https://3ds-server.example/results",
                            "threeDSRequestorID": "requestor-0001",
                            "threeDSRequestorName": "Example Shop",
                            "threeDSRequestorURL": "https://shop.example",
                            "threeDSRequestorAuthenticationInd": "01",
                            "threeDSCompInd": "Y",
                            "acctNumber": "4111111111111111",
                            "acquirerBIN": "400551",
                            "acquirerMerchantID": "merchant-0001",
                            "mcc": "5732",
                            "merchantCountryCode": "276",
                            "merchantName": "Example Shop",
                            "purchaseAmount": "75000",
                            "purchaseCurrency": "978",
                            "purchaseExponent": "2",
                            "purchaseDate": "20261004120000",
                            "browserAcceptHeader": "text/html,application/xhtml+xml",
                            "browserJavaEnabled": "false",
                            "browserJavascriptEnabled": "true",
                            "browserLanguage": "en-GB",
                            "browserColorDepth": "24",
                            "browserScreenHeight": "900",
                            "browserScreenWidth": "1440",
                            "browserTZ": "-240",
                            "browserUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
                            "notificationURL": "https://shop.example/3ds/notify",
                            "addrMatch": "Y",
                            "dsTransID": "6224dbca-ce3e-4e0e-a3c3-5e2be56a98db",
                            "dsReferenceNumber": "DS-SIMULATED-01",
                            "dsURL": "https://ds.example/results"
                          },
                          "note": "As the 3DS Server sent it, with what the directory server adds on the way: dsTransID, dsReferenceNumber and dsURL."
                        },
                        {
                          "from": "ACS",
                          "to": "3DS Server",
                          "via": "Directory Server",
                          "message": "ARes",
                          "fields": {
                            "messageType": "ARes",
                            "messageVersion": "2.2.0",
                            "threeDSServerTransID": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e",
                            "acsTransID": "4047e5c5-b8d6-4f1f-b971-1dc97734deb3",
                            "acsReferenceNumber": "ACS-SIMULATED-01",
                            "dsTransID": "6224dbca-ce3e-4e0e-a3c3-5e2be56a98db",
                            "dsReferenceNumber": "DS-SIMULATED-01",
                            "transStatus": "C",
                            "acsChallengeMandated": "Y",
                            "authenticationType": "02",
                            "acsURL": "https://acs.example/challenge"
                          },
                          "note": "A challenge: the 3DS Server is to send the cardholder’s browser to the acsURL."
                        },
                        {
                          "from": "3DS Server",
                          "to": "ACS",
                          "via": "Browser",
                          "message": "CReq",
                          "fields": {
                            "messageType": "CReq",
                            "messageVersion": "2.2.0",
                            "threeDSServerTransID": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e",
                            "acsTransID": "4047e5c5-b8d6-4f1f-b971-1dc97734deb3",
                            "challengeWindowSize": "05"
                          },
                          "note": "Posted through the cardholder’s browser to the acsURL."
                        },
                        {
                          "from": "ACS",
                          "to": "Browser",
                          "via": null,
                          "message": "Challenge page",
                          "fields": {
                            "page": "Enter the code we sent by text message to •••• 0042."
                          },
                          "note": "The ACS’s own page in the cardholder’s browser, not a 3-D Secure message."
                        }
                      ],
                      "rules": [
                        {
                          "rule": "Card on record",
                          "decided": false,
                          "words": "The issuer knows the card."
                        },
                        {
                          "rule": "Not reported stolen",
                          "decided": false,
                          "words": "The card is not reported lost or stolen."
                        },
                        {
                          "rule": "Cardholder present",
                          "decided": false,
                          "words": "The cardholder is there, in a browser or an app."
                        },
                        {
                          "rule": "Requestor’s mandate",
                          "decided": false,
                          "words": "The requestor mandates no challenge."
                        }
                      ],
                      "challenge": {
                        "sentTo": "•••• 0042",
                        "code": "845323",
                        "triesLeft": 3
                      },
                      "valueCheck": null,
                      "budget": [
                        {
                          "name": "AReq: 3DS Server to directory server",
                          "millis": 40,
                          "measured": false
                        },
                        {
                          "name": "AReq: directory server to ACS",
                          "millis": 40,
                          "measured": false
                        },
                        {
                          "name": "The ACS: the check and the rules",
                          "millis": 44.64375,
                          "measured": true
                        },
                        {
                          "name": "ARes: ACS to directory server",
                          "millis": 40,
                          "measured": false
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `UNREADABLE_BODY`: The body is not the JSON the operation takes.\n- `AREQ_INVALID`: `areq` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "UNREADABLE_BODY",
                            "AREQ_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large.\n\n- `CONTENT_TOO_LARGE`: The body is larger than any operation takes: the API reads 2 MB of JSON at most.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CONTENT_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "threeds",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/lab/threeds/authentications/{acsTransID}/challenge": {
      "post": {
        "tags": [
          "Lab: payments"
        ],
        "summary": "Answer a challenge",
        "description": "The cardholder's code for a transaction the ACS challenged, for five minutes after it did. A right code ends the challenge authenticated, a third wrong one ends it failed; either way with the RReq, the RRes and the final CRes.",
        "operationId": "runThreeDsChallenge",
        "parameters": [
          {
            "name": "acsTransID",
            "in": "path",
            "description": "The ACS's id for the transaction, from its ARes",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThreeDsLabController.Answer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreeDsRun"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-04",
                    "description": "The response to `POST /api/lab/threeds/authentications/4047e5c5-b8d6-4f1f-b971-1dc97734deb3/challenge`. Arrays are cut to their first 4 items.",
                    "value": {
                      "acsTransID": "4047e5c5-b8d6-4f1f-b971-1dc97734deb3",
                      "phase": "AUTHENTICATED",
                      "transStatus": "Y",
                      "steps": [
                        {
                          "from": "Browser",
                          "to": "ACS",
                          "via": null,
                          "message": "Challenge page",
                          "fields": {
                            "code": "845323"
                          },
                          "note": "The cardholder’s code, posted to the ACS’s page."
                        },
                        {
                          "from": "ACS",
                          "to": "3DS Server",
                          "via": "Directory Server",
                          "message": "RReq",
                          "fields": {
                            "messageType": "RReq",
                            "messageVersion": "2.2.0",
                            "threeDSServerTransID": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e",
                            "acsTransID": "4047e5c5-b8d6-4f1f-b971-1dc97734deb3",
                            "dsTransID": "6224dbca-ce3e-4e0e-a3c3-5e2be56a98db",
                            "messageCategory": "01",
                            "authenticationType": "02",
                            "interactionCounter": "01",
                            "transStatus": "Y",
                            "eci": "05",
                            "authenticationValue": "VkF21zQ2iZjlS4gndDrGKNdZ4DM="
                          },
                          "note": "How the challenge ended, with the authentication value for the authorisation."
                        },
                        {
                          "from": "3DS Server",
                          "to": "ACS",
                          "via": "Directory Server",
                          "message": "RRes",
                          "fields": {
                            "messageType": "RRes",
                            "messageVersion": "2.2.0",
                            "threeDSServerTransID": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e",
                            "acsTransID": "4047e5c5-b8d6-4f1f-b971-1dc97734deb3",
                            "dsTransID": "6224dbca-ce3e-4e0e-a3c3-5e2be56a98db",
                            "resultsStatus": "01"
                          },
                          "note": "The 3DS Server has the results."
                        },
                        {
                          "from": "ACS",
                          "to": "3DS Server",
                          "via": "Browser",
                          "message": "CRes",
                          "fields": {
                            "messageType": "CRes",
                            "messageVersion": "2.2.0",
                            "threeDSServerTransID": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e",
                            "acsTransID": "4047e5c5-b8d6-4f1f-b971-1dc97734deb3",
                            "challengeCompletionInd": "Y",
                            "transStatus": "Y"
                          },
                          "note": "The last CRes, posted through the browser to the notificationURL: the cardholder is back at the merchant."
                        }
                      ],
                      "rules": [],
                      "challenge": null,
                      "valueCheck": {
                        "amount": "€750.00",
                        "checks": true,
                        "otherAmount": "€750.01",
                        "checksForOther": false
                      },
                      "budget": [
                        {
                          "name": "The code: browser to ACS",
                          "millis": 40,
                          "measured": false
                        },
                        {
                          "name": "The ACS: the code checked",
                          "millis": 4.411184,
                          "measured": true
                        },
                        {
                          "name": "RReq: ACS to directory server",
                          "millis": 40,
                          "measured": false
                        },
                        {
                          "name": "RReq: directory server to 3DS Server",
                          "millis": 40,
                          "measured": false
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `UNREADABLE_BODY`: The body is not the JSON the operation takes.\n- `ACS_TRANS_ID_INVALID`: `acsTransID` breaks a constraint its schema gives.\n- `CODE_INVALID`: `code` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "UNREADABLE_BODY",
                            "ACS_TRANS_ID_INVALID",
                            "CODE_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found.\n\n- `CHALLENGE_NOT_FOUND`: No challenge with that id is waiting: it ended, its five minutes passed, or it never began.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CHALLENGE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict.\n\n- `CHALLENGE_ENDED`: Another answer ended the challenge while this one was on its way.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CHALLENGE_ENDED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large.\n\n- `CONTENT_TOO_LARGE`: The body is larger than any operation takes: the API reads 2 MB of JSON at most.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "CONTENT_TOO_LARGE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "threeds",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/runtime": {
      "get": {
        "tags": [
          "Runtime"
        ],
        "summary": "The JVM this API runs on",
        "description": "Java version and vendor, the VM, Spring Boot's version, CPUs, the largest heap, the garbage collectors, start time, uptime, the Cloud Run revision, and how the JVM was started: its collector, its AOT cache, compact object headers, its -XX options (never system properties) and the memory it sees.",
        "operationId": "getRuntime",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeInfo"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/runtime`. Arrays are cut to their first 4 items.",
                    "value": {
                      "javaVersion": "25.0.4.1",
                      "javaVendor": "Eclipse Adoptium",
                      "vm": "OpenJDK 64-Bit Server VM",
                      "springBootVersion": "4.1.1",
                      "availableProcessors": 1,
                      "maxHeapBytes": 389283840,
                      "garbageCollectors": [
                        "Copy",
                        "MarkSweepCompact"
                      ],
                      "startedAt": "2026-10-03T18:04:10.604Z",
                      "uptimeMs": 6144,
                      "revision": null,
                      "jvm": {
                        "collector": "Serial",
                        "aotCache": "api.aot",
                        "aotCacheInUse": true,
                        "compactObjectHeaders": true,
                        "flags": [
                          "-XX:MaxRAMPercentage=75",
                          "-XX:InitialRAMPercentage=25",
                          "-XX:+ExitOnOutOfMemoryError",
                          "-XX:+UseSerialGC"
                        ],
                        "memoryLimitBytes": 536870912
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/telemetry": {
      "get": {
        "tags": [
          "Runtime"
        ],
        "summary": "One sample of the JVM",
        "description": "Heap and non-heap memory, collections and their time, threads, CPU load and loaded classes, now.",
        "operationId": "getTelemetry",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetrySample"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/telemetry`.",
                    "value": {
                      "t": 1791050656747,
                      "uptimeMs": 6203,
                      "heap": {
                        "used": 28988208,
                        "committed": 129761280,
                        "max": 389283840
                      },
                      "nonHeapUsed": 23555400,
                      "gc": [
                        {
                          "name": "Copy",
                          "count": 4,
                          "timeMs": 74
                        },
                        {
                          "name": "MarkSweepCompact",
                          "count": 0,
                          "timeMs": 0
                        }
                      ],
                      "threads": {
                        "live": 22,
                        "daemon": 18,
                        "peak": 22
                      },
                      "cpu": {
                        "process": 0.3,
                        "system": 0.297
                      },
                      "classesLoaded": 11718
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/telemetry/stream": {
      "get": {
        "tags": [
          "Runtime"
        ],
        "summary": "The JVM, every second",
        "description": "Server-sent events: first `history`, up to the last 90 samples, oldest first; then `sample` every second; after 120 s, `end` with `{\"reason\":\"max-duration\"}`. Streams are capped in number. Close the stream on `end`: a browser's EventSource would otherwise open it again.",
        "operationId": "streamTelemetry",
        "parameters": [
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent events, as the operation describes them.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The stream that answered `GET /api/telemetry/stream`. Of its 123 events, the first and the last of each kind.",
                    "value": "event:history\ndata:[{\"t\":1791050656059,\"uptimeMs\":5515,\"heap\":{\"used\":41680216,\"committed\":129761280,\"max\":389283840},\"nonHeapUsed\":15566672,\"gc\":[{\"name\":\"Copy\",\"count\":3,\"timeMs\":59},{\"name\":\"MarkSweepCompact\",\"count\":0,\"timeMs\":0}],\"threads\":{\"live\":16,\"daemon\":12,\"peak\":16},\"cpu\":{\"process\":0.975,\"system\":0.978},\"classesLoaded\":10568}]\n\nevent:sample\ndata:{\"t\":1791050656700,\"uptimeMs\":6157,\"heap\":{\"used\":27984808,\"committed\":129761280,\"max\":389283840},\"nonHeapUsed\":23348312,\"gc\":[{\"name\":\"Copy\",\"count\":4,\"timeMs\":74},{\"name\":\"MarkSweepCompact\",\"count\":0,\"timeMs\":0}],\"threads\":{\"live\":22,\"daemon\":18,\"peak\":22},\"cpu\":{\"process\":1.0,\"system\":1.0},\"classesLoaded\":11681}\n\n: 119 events left out\n\nevent:sample\ndata:{\"t\":1791050776053,\"uptimeMs\":125515,\"heap\":{\"used\":41824256,\"committed\":129761280,\"max\":389283840},\"nonHeapUsed\":41230288,\"gc\":[{\"name\":\"Copy\",\"count\":12,\"timeMs\":108},{\"name\":\"MarkSweepCompact\",\"count\":0,\"timeMs\":0}],\"threads\":{\"live\":24,\"daemon\":20,\"peak\":226},\"cpu\":{\"process\":0.025,\"system\":0.003},\"classesLoaded\":12920}\n\nevent:end\ndata:{\"reason\":\"max-duration\"}\n\n"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `TOO_MANY_STREAMS`: As many live streams are open as the server serves.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "TOO_MANY_STREAMS"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "telemetry-stream",
          "quota": 20,
          "window": 60
        }
      }
    },
    "/api/traces/{traceId}": {
      "get": {
        "tags": [
          "Traces"
        ],
        "summary": "A run's trace",
        "description": "Every span of a recent pool or ledger run, by the id its result carried: parent, start, duration, attributes. The server keeps the last 8 traces, in memory.",
        "operationId": "getTrace",
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "description": "The trace's id, 32 hexadecimal digits",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunTrace"
                },
                "examples": {
                  "recorded": {
                    "summary": "Recorded on 2026-10-03",
                    "description": "The response to `GET /api/traces/5fb11f17c661cff72c3895fd7b917c95`. Arrays are cut to their first 4 items.",
                    "value": {
                      "traceId": "5fb11f17c661cff72c3895fd7b917c95",
                      "durationMs": 13153.35,
                      "spans": [
                        {
                          "id": "2da16a10d34079ee",
                          "parentId": null,
                          "name": "http get /api/lab/pool/stream",
                          "startMs": 0,
                          "durationMs": 13153.35,
                          "attributes": {
                            "exception": "none",
                            "status": "200",
                            "http.url": "/api/lab/pool/stream",
                            "outcome": "SUCCESS",
                            "method": "GET",
                            "uri": "/api/lab/pool/stream"
                          },
                          "error": false
                        },
                        {
                          "id": "b38c5e8f619bd311",
                          "parentId": "2da16a10d34079ee",
                          "name": "lab.pool.run",
                          "startMs": 5.84,
                          "durationMs": 13145.49,
                          "attributes": {
                            "lab.hold.ms": "50",
                            "lab.policy": "THROTTLE",
                            "lab.pool.size": "10",
                            "lab.rate": "500"
                          },
                          "error": false
                        },
                        {
                          "id": "325be140c1f47906",
                          "parentId": "b38c5e8f619bd311",
                          "name": "lab.pool.fill",
                          "startMs": 6.24,
                          "durationMs": 451.82,
                          "attributes": {},
                          "error": false
                        },
                        {
                          "id": "00f28578c45720ce",
                          "parentId": "b38c5e8f619bd311",
                          "name": "lab.pool.request",
                          "startMs": 460.12,
                          "durationMs": 53.33,
                          "attributes": {
                            "request.outcome": "COMPLETED",
                            "request.index": "0"
                          },
                          "error": false
                        }
                      ],
                      "dropped": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `TRACE_ID_INVALID`: `traceId` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "TRACE_ID_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found.\n\n- `TRACE_NOT_FOUND`: No trace with that id is kept: the server keeps the last runs' traces only.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "TRACE_NOT_FOUND"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "traces",
          "quota": 30,
          "window": 60
        }
      }
    },
    "/api/visits": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Count a page view",
        "description": "The beacon the site's pages send as they are shown: the path, the tag of a tagged link, the host that referred the visitor and the size of screen, with the day's pseudonym of the visitor, an HMAC of address and user agent under a salt that lasts a day. Neither is stored. A request with `Sec-GPC: 1` or `DNT: 1`, one a browser says another site's page sent (`Sec-Fetch-Site`), or one from a user agent that says it is a program, is answered the same and leaves nothing.",
        "operationId": "recordVisit",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "description": "The page's path, without query or fragment",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^/[A-Za-z0-9/._~-]{0,199}$"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "The tag of the link the visitor came by: acme, from ?r=acme",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]{0,39}$"
            }
          },
          {
            "name": "referrer",
            "in": "query",
            "description": "The host of the page that linked here, never its path",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9.-]{1,253}$"
            }
          },
          {
            "name": "viewport",
            "in": "query",
            "description": "The size of screen: narrower than 640 CSS pixels, narrower than 1,024, or wider",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "NARROW",
                "MEDIUM",
                "WIDE"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/API-Version"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "400": {
            "description": "Bad Request.\n\n- `UNSUPPORTED_API_VERSION`: `API-Version` names a version the API does not have.\n- `MISSING_PARAMETER`: A required parameter is missing.\n- `INVALID_PARAMETER`: A parameter does not parse: not a number, or not one of its values.\n- `PATH_INVALID`: `path` breaks a constraint its schema gives.\n- `TAG_INVALID`: `tag` breaks a constraint its schema gives.\n- `REFERRER_INVALID`: `referrer` breaks a constraint its schema gives.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNSUPPORTED_API_VERSION",
                            "MISSING_PARAMETER",
                            "INVALID_PARAMETER",
                            "PATH_INVALID",
                            "TAG_INVALID",
                            "REFERRER_INVALID"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.\n\n- `RATE_LIMITED`: More requests from this address than the operation's limit allows.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "RATE_LIMITED"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.\n\n- `INTERNAL_ERROR`: Something failed on the server's side.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.\n\n- `DATABASE_NOT_CONFIGURED`: The server runs without a database.\n- `DATABASE_NOT_MIGRATED`: The database lacks the experiment's tables: its migrations have not run.\n- `DATABASE_UNAVAILABLE`: The database cannot be reached, or cannot give connections in time.",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "DATABASE_NOT_CONFIGURED",
                            "DATABASE_NOT_MIGRATED",
                            "DATABASE_UNAVAILABLE"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "policy": "visits",
          "quota": 60,
          "window": 60
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AlgorithmResult": {
        "type": "object",
        "properties": {
          "algorithm": {
            "type": "string",
            "enum": [
              "NAIVE_RECURSION",
              "MEMOIZED_RECURSION",
              "ITERATIVE",
              "MATRIX_POWER",
              "FAST_DOUBLING"
            ]
          },
          "label": {
            "type": "string"
          },
          "complexity": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "OK",
              "SKIPPED",
              "STACK_OVERFLOW",
              "TIMEOUT"
            ]
          },
          "nanos": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "runs": {
            "type": "integer",
            "format": "int32"
          },
          "operations": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "maxDepth": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "algorithm",
          "complexity",
          "label",
          "runs",
          "status"
        ]
      },
      "AssistantController.Typed": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1
          }
        },
        "required": [
          "question"
        ]
      },
      "Challenge": {
        "type": "object",
        "properties": {
          "algorithm": {
            "type": "string"
          },
          "challenge": {
            "type": "string"
          },
          "maxnumber": {
            "type": "integer",
            "format": "int32"
          },
          "salt": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          }
        },
        "required": [
          "algorithm",
          "challenge",
          "maxnumber",
          "salt",
          "signature"
        ]
      },
      "Confirmation": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1
          }
        },
        "required": [
          "token"
        ]
      },
      "DatabaseInfo": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "migrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatabaseInfo.Migration"
            }
          }
        },
        "required": [
          "migrations",
          "version"
        ]
      },
      "DatabaseInfo.Migration": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "installedOn": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "description",
          "installedOn",
          "success",
          "version"
        ]
      },
      "Draft": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "minLength": 1
          },
          "company": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100,
            "minLength": 1
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100,
            "minLength": 1
          },
          "message": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1
          },
          "conversation": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12000,
            "minLength": 1
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "altcha": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1
          }
        },
        "required": [
          "altcha",
          "email",
          "message",
          "name"
        ]
      },
      "FibonacciReport": {
        "type": "object",
        "properties": {
          "n": {
            "type": "integer",
            "format": "int32"
          },
          "digits": {
            "type": "integer",
            "format": "int32"
          },
          "leadingDigits": {
            "type": "string"
          },
          "trailingDigits": {
            "type": "string"
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlgorithmResult"
            }
          },
          "environment": {
            "$ref": "#/components/schemas/FibonacciReport.Environment"
          }
        },
        "required": [
          "digits",
          "environment",
          "leadingDigits",
          "n",
          "results",
          "trailingDigits"
        ]
      },
      "FibonacciReport.Environment": {
        "type": "object",
        "properties": {
          "javaVersion": {
            "type": "string"
          },
          "availableProcessors": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "availableProcessors",
          "javaVersion"
        ]
      },
      "FitChecks.ExampleSummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "about": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "LIVE",
              "RECORDED",
              "SCRIPTED"
            ]
          }
        },
        "required": [
          "about",
          "company",
          "name",
          "role",
          "source"
        ]
      },
      "FitPage.Cited": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "title",
          "url"
        ]
      },
      "FitPage.Drafting": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "LIVE",
              "RECORDED",
              "SCRIPTED"
            ]
          },
          "calls": {
            "type": "integer",
            "format": "int32"
          },
          "inputTokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "outputTokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "costUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "latencyMillis": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "calls",
          "latencyMillis",
          "model",
          "source"
        ]
      },
      "FitPage.Line": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "must": {
            "type": "boolean"
          },
          "rating": {
            "type": "string",
            "enum": [
              "DIRECT",
              "ADJACENT",
              "NONE"
            ]
          },
          "claim": {
            "type": "string"
          },
          "missing": {
            "type": "string"
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FitPage.Cited"
            }
          },
          "withheld": {
            "type": "boolean"
          }
        },
        "required": [
          "claim",
          "evidence",
          "missing",
          "must",
          "rating",
          "text",
          "withheld"
        ]
      },
      "FitResult": {
        "type": "object",
        "properties": {
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FitPage.Line"
            }
          },
          "withheld": {
            "type": "integer",
            "format": "int32"
          },
          "drafting": {
            "$ref": "#/components/schemas/FitPage.Drafting"
          }
        },
        "required": [
          "drafting",
          "requirements",
          "withheld"
        ]
      },
      "GuideEventController.Event": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string",
            "minLength": 1,
            "pattern": "tour_started|tour_finished"
          },
          "tour": {
            "type": "string",
            "minLength": 1,
            "pattern": "[a-z0-9-]{1,40}"
          }
        },
        "required": [
          "event",
          "tour"
        ]
      },
      "Invariant.Verdict": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "holds": {
            "type": "boolean"
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail",
          "holds",
          "name"
        ]
      },
      "JitReport": {
        "type": "object",
        "properties": {
          "completed": {
            "type": "boolean"
          },
          "callsPerBatch": {
            "type": "integer",
            "format": "int32"
          },
          "batches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JitReport.Batch"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JitReport.Event"
            }
          },
          "summary": {
            "$ref": "#/components/schemas/JitReport.Summary"
          }
        },
        "required": [
          "batches",
          "callsPerBatch",
          "completed",
          "events",
          "summary"
        ]
      },
      "JitReport.Batch": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "shape": {
            "type": "string",
            "enum": [
              "MONOMORPHIC",
              "BIMORPHIC",
              "MEGAMORPHIC"
            ]
          },
          "nanos": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "index",
          "nanos",
          "shape"
        ]
      },
      "JitReport.Event": {
        "type": "object",
        "properties": {
          "batch": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "type": "string",
            "enum": [
              "COMPILED",
              "DEOPTIMIZED"
            ]
          },
          "method": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "batch",
          "detail",
          "kind",
          "method"
        ]
      },
      "JitReport.Summary": {
        "type": "object",
        "properties": {
          "firstNanos": {
            "type": "integer",
            "format": "int64"
          },
          "monomorphicNanos": {
            "type": "integer",
            "format": "int64"
          },
          "bimorphicNanos": {
            "type": "integer",
            "format": "int64"
          },
          "megamorphicNanos": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "bimorphicNanos",
          "firstNanos",
          "megamorphicNanos",
          "monomorphicNanos"
        ]
      },
      "JvmFacts": {
        "type": "object",
        "properties": {
          "collector": {
            "type": "string"
          },
          "aotCache": {
            "type": [
              "string",
              "null"
            ]
          },
          "aotCacheInUse": {
            "type": "boolean"
          },
          "compactObjectHeaders": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "memoryLimitBytes": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "aotCacheInUse",
          "collector",
          "flags",
          "memoryLimitBytes"
        ]
      },
      "LedgerReport": {
        "type": "object",
        "properties": {
          "strategy": {
            "type": "string",
            "enum": [
              "READ_MODIFY_WRITE",
              "GUARDED_UPDATE",
              "LOCK_UNORDERED",
              "LOCK_ORDERED",
              "OPTIMISTIC",
              "SERIALIZABLE"
            ]
          },
          "hotSpotPercent": {
            "type": "integer",
            "format": "int32"
          },
          "transfers": {
            "type": "integer",
            "format": "int32"
          },
          "workers": {
            "type": "integer",
            "format": "int32"
          },
          "committed": {
            "type": "integer",
            "format": "int32"
          },
          "insufficientFunds": {
            "type": "integer",
            "format": "int32"
          },
          "gaveUp": {
            "type": "integer",
            "format": "int32"
          },
          "failed": {
            "type": "integer",
            "format": "int32"
          },
          "notStarted": {
            "type": "integer",
            "format": "int32"
          },
          "deadlocks": {
            "type": "integer",
            "format": "int32"
          },
          "serializationFailures": {
            "type": "integer",
            "format": "int32"
          },
          "conflicts": {
            "type": "integer",
            "format": "int32"
          },
          "elapsedMs": {
            "type": "integer",
            "format": "int64"
          },
          "throughput": {
            "type": "number",
            "format": "double"
          },
          "latencyP50Ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "latencyP99Ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "invariants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invariant.Verdict"
            }
          },
          "reconciliation": {
            "$ref": "#/components/schemas/Reconciliation"
          },
          "traceId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "committed",
          "conflicts",
          "deadlocks",
          "elapsedMs",
          "failed",
          "gaveUp",
          "hotSpotPercent",
          "insufficientFunds",
          "invariants",
          "notStarted",
          "reconciliation",
          "serializationFailures",
          "strategy",
          "throughput",
          "transfers",
          "workers"
        ]
      },
      "OutboxReport": {
        "type": "object",
        "properties": {
          "design": {
            "type": "string",
            "enum": [
              "COMMIT_THEN_PUBLISH",
              "PUBLISH_THEN_COMMIT",
              "OUTBOX"
            ]
          },
          "crashPercent": {
            "type": "integer",
            "format": "int32"
          },
          "dedup": {
            "type": "boolean"
          },
          "orders": {
            "type": "integer",
            "format": "int32"
          },
          "answered": {
            "type": "integer",
            "format": "int32"
          },
          "committed": {
            "type": "integer",
            "format": "int32"
          },
          "published": {
            "type": "integer",
            "format": "int32"
          },
          "duplicatePublishes": {
            "type": "integer",
            "format": "int32"
          },
          "lost": {
            "type": "integer",
            "format": "int32"
          },
          "phantoms": {
            "type": "integer",
            "format": "int32"
          },
          "deliveries": {
            "type": "integer",
            "format": "int32"
          },
          "effects": {
            "type": "integer",
            "format": "int32"
          },
          "duplicateEffects": {
            "type": "integer",
            "format": "int32"
          },
          "missingEffects": {
            "type": "integer",
            "format": "int32"
          },
          "effectsWithoutOrder": {
            "type": "integer",
            "format": "int32"
          },
          "crashes": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "restarts": {
            "type": "integer",
            "format": "int32"
          },
          "elapsedMs": {
            "type": "integer",
            "format": "int64"
          },
          "verdicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutboxReport.Verdict"
            }
          }
        },
        "required": [
          "answered",
          "committed",
          "crashPercent",
          "crashes",
          "dedup",
          "deliveries",
          "design",
          "duplicateEffects",
          "duplicatePublishes",
          "effects",
          "effectsWithoutOrder",
          "elapsedMs",
          "lost",
          "missingEffects",
          "orders",
          "phantoms",
          "published",
          "restarts",
          "verdicts"
        ]
      },
      "OutboxReport.Verdict": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "holds": {
            "type": "boolean"
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail",
          "holds",
          "name"
        ]
      },
      "PlanSummary": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string",
            "enum": [
              "EVERY_ROW",
              "INDEX"
            ]
          },
          "index": {
            "type": [
              "string",
              "null"
            ]
          },
          "workers": {
            "type": "integer",
            "format": "int32"
          },
          "rowsRead": {
            "type": "integer",
            "format": "int64"
          },
          "blocksHit": {
            "type": "integer",
            "format": "int64"
          },
          "blocksRead": {
            "type": "integer",
            "format": "int64"
          },
          "planningMs": {
            "type": "number",
            "format": "double"
          },
          "executionMs": {
            "type": "number",
            "format": "double"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanSummary.Step"
            }
          }
        },
        "required": [
          "access",
          "blocksHit",
          "blocksRead",
          "executionMs",
          "planningMs",
          "rowsRead",
          "steps",
          "workers"
        ]
      },
      "PlanSummary.Step": {
        "type": "object",
        "properties": {
          "depth": {
            "type": "integer",
            "format": "int32"
          },
          "node": {
            "type": "string"
          },
          "on": {
            "type": [
              "string",
              "null"
            ]
          },
          "rows": {
            "type": "integer",
            "format": "int64"
          },
          "loops": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "depth",
          "loops",
          "node",
          "rows"
        ]
      },
      "Preview": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "conversation": {
            "type": [
              "string",
              "null"
            ]
          },
          "token": {
            "type": "string"
          },
          "confirmBy": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "confirmBy",
          "email",
          "id",
          "message",
          "name",
          "token"
        ]
      },
      "Problem": {
        "type": "object",
        "description": "An RFC 9457 problem: what went wrong, for a person in `detail` and for a program in `code`.",
        "examples": [
          {
            "detail": "n must be between 0 and 1000000",
            "instance": "/api/lab/fibonacci",
            "status": 400,
            "title": "Bad Request",
            "code": "N_OUT_OF_RANGE"
          }
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri-reference",
            "description": "The kind of problem. Absent, it is about:blank: the status says it all."
          },
          "title": {
            "type": "string",
            "description": "The status's reason phrase."
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status."
          },
          "detail": {
            "type": "string",
            "description": "What went wrong, for a person."
          },
          "instance": {
            "type": "string",
            "format": "uri-reference",
            "description": "The request's path; absent from a stream's error event."
          },
          "code": {
            "type": "string",
            "description": "What went wrong, for a program: stable across releases, unlike the detail."
          }
        },
        "required": [
          "code",
          "detail",
          "status",
          "title"
        ]
      },
      "ProfileReport": {
        "type": "object",
        "properties": {
          "scenario": {
            "type": "string",
            "enum": [
              "HOT_LOCK",
              "ALLOCATION_CHURN",
              "QUADRATIC_DEDUPE"
            ]
          },
          "variant": {
            "type": "string",
            "enum": [
              "PROBLEM",
              "FIX"
            ]
          },
          "completed": {
            "type": "boolean"
          },
          "wallMs": {
            "type": "integer",
            "format": "int64"
          },
          "threads": {
            "type": "integer",
            "format": "int32"
          },
          "checksum": {
            "type": "string"
          },
          "samples": {
            "type": "integer",
            "format": "int32"
          },
          "tree": {
            "$ref": "#/components/schemas/ProfileReport.Frame"
          },
          "hottest": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileReport.HotFrame"
            }
          },
          "locks": {
            "$ref": "#/components/schemas/ProfileReport.Locks"
          },
          "allocations": {
            "$ref": "#/components/schemas/ProfileReport.Allocations"
          },
          "gc": {
            "$ref": "#/components/schemas/ProfileReport.Gc"
          }
        },
        "required": [
          "allocations",
          "checksum",
          "completed",
          "gc",
          "hottest",
          "locks",
          "samples",
          "scenario",
          "threads",
          "tree",
          "variant",
          "wallMs"
        ]
      },
      "ProfileReport.AllocatedClass": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "format": "int64"
          },
          "share": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "bytes",
          "share",
          "type"
        ]
      },
      "ProfileReport.Allocations": {
        "type": "object",
        "properties": {
          "sampledBytes": {
            "type": "integer",
            "format": "int64"
          },
          "byClass": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileReport.AllocatedClass"
            }
          }
        },
        "required": [
          "byClass",
          "sampledBytes"
        ]
      },
      "ProfileReport.Frame": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "self": {
            "type": "integer",
            "format": "int32"
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileReport.Frame"
            }
          }
        },
        "required": [
          "children",
          "name",
          "self",
          "total"
        ]
      },
      "ProfileReport.Gc": {
        "type": "object",
        "properties": {
          "collections": {
            "type": "integer",
            "format": "int32"
          },
          "pauseTotalMs": {
            "type": "integer",
            "format": "int64"
          },
          "longestPauseMs": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "collections",
          "longestPauseMs",
          "pauseTotalMs"
        ]
      },
      "ProfileReport.HotFrame": {
        "type": "object",
        "properties": {
          "frame": {
            "type": "string"
          },
          "self": {
            "type": "integer",
            "format": "int32"
          },
          "share": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "frame",
          "self",
          "share"
        ]
      },
      "ProfileReport.Locks": {
        "type": "object",
        "properties": {
          "waits": {
            "type": "integer",
            "format": "int64"
          },
          "totalMs": {
            "type": "integer",
            "format": "int64"
          },
          "monitor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "totalMs",
          "waits"
        ]
      },
      "PublicAssistant.ExampleSummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "about": {
            "type": "string"
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "LIVE",
                  "RECORDED",
                  "SCRIPTED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "PREPARED",
              "DEMO"
            ]
          },
          "offers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "about",
          "kind",
          "name",
          "offers",
          "question"
        ]
      },
      "PublicAssistant.Matched": {
        "type": "object",
        "properties": {
          "example": {
            "type": [
              "string",
              "null"
            ]
          },
          "refusal": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "PAY",
                  "PRIVATE_LIFE",
                  "NOT_IN_RECORD",
                  "UNGROUNDED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "words": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PublicAssistant.Status": {
        "type": "object",
        "properties": {
          "live": {
            "type": "boolean"
          },
          "off": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "OFF",
                  "NO_MODEL",
                  "NO_PRICE",
                  "NO_DATABASE",
                  "BUDGET_SPENT"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "offWords": {
            "type": [
              "string",
              "null"
            ]
          },
          "questionCharacters": {
            "type": "integer",
            "format": "int32"
          },
          "questions": {
            "type": "integer",
            "format": "int32"
          },
          "sections": {
            "type": "integer",
            "format": "int32"
          },
          "examples": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicAssistant.ExampleSummary"
            }
          }
        },
        "required": [
          "examples",
          "live",
          "questionCharacters",
          "questions",
          "sections"
        ]
      },
      "PublicFitCheckController.Posting": {
        "type": "object",
        "properties": {
          "posting": {
            "type": "string",
            "maxLength": 6000,
            "minLength": 1
          },
          "altcha": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1
          }
        },
        "required": [
          "altcha",
          "posting"
        ]
      },
      "PublicFitChecks.Status": {
        "type": "object",
        "properties": {
          "live": {
            "type": "boolean"
          },
          "off": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "OFF",
                  "NO_MODEL",
                  "NO_PRICE",
                  "NO_DATABASE",
                  "BUDGET_SPENT"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "offWords": {
            "type": [
              "string",
              "null"
            ]
          },
          "postingCharacters": {
            "type": "integer",
            "format": "int32"
          },
          "examples": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FitChecks.ExampleSummary"
            }
          }
        },
        "required": [
          "examples",
          "live",
          "postingCharacters"
        ]
      },
      "Reconciliation": {
        "type": "object",
        "properties": {
          "accountsDrifted": {
            "type": "integer",
            "format": "int32"
          },
          "moneyCreated": {
            "type": "integer",
            "format": "int64"
          },
          "moneyDestroyed": {
            "type": "integer",
            "format": "int64"
          },
          "worst": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reconciliation.Drift"
            }
          }
        },
        "required": [
          "accountsDrifted",
          "moneyCreated",
          "moneyDestroyed",
          "worst"
        ]
      },
      "Reconciliation.Drift": {
        "type": "object",
        "properties": {
          "account": {
            "type": "integer",
            "format": "int32"
          },
          "cached": {
            "type": "integer",
            "format": "int64"
          },
          "fromEntries": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "account",
          "cached",
          "fromEntries"
        ]
      },
      "RiskEngine.Asked": {
        "type": "object",
        "properties": {
          "rule": {
            "type": "string"
          },
          "decided": {
            "type": "boolean"
          },
          "words": {
            "type": "string"
          }
        },
        "required": [
          "decided",
          "rule",
          "words"
        ]
      },
      "RunTrace": {
        "type": "object",
        "properties": {
          "traceId": {
            "type": "string"
          },
          "durationMs": {
            "type": "number",
            "format": "double"
          },
          "spans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunTrace.Span"
            }
          },
          "dropped": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "dropped",
          "durationMs",
          "spans",
          "traceId"
        ]
      },
      "RunTrace.Span": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "startMs": {
            "type": "number",
            "format": "double"
          },
          "durationMs": {
            "type": "number",
            "format": "double"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "error": {
            "type": "boolean"
          }
        },
        "required": [
          "attributes",
          "durationMs",
          "error",
          "id",
          "name",
          "startMs"
        ]
      },
      "RuntimeInfo": {
        "type": "object",
        "properties": {
          "javaVersion": {
            "type": "string"
          },
          "javaVendor": {
            "type": "string"
          },
          "vm": {
            "type": "string"
          },
          "springBootVersion": {
            "type": "string"
          },
          "availableProcessors": {
            "type": "integer",
            "format": "int32"
          },
          "maxHeapBytes": {
            "type": "integer",
            "format": "int64"
          },
          "garbageCollectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "uptimeMs": {
            "type": "integer",
            "format": "int64"
          },
          "revision": {
            "type": [
              "string",
              "null"
            ]
          },
          "jvm": {
            "$ref": "#/components/schemas/JvmFacts"
          }
        },
        "required": [
          "availableProcessors",
          "garbageCollectors",
          "javaVendor",
          "javaVersion",
          "jvm",
          "maxHeapBytes",
          "springBootVersion",
          "startedAt",
          "uptimeMs",
          "vm"
        ]
      },
      "SearchReport": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "catalogue": {
            "$ref": "#/components/schemas/SearchReport.Catalogue"
          },
          "methods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchReport.Method"
            }
          }
        },
        "required": [
          "catalogue",
          "methods",
          "query"
        ]
      },
      "SearchReport.Catalogue": {
        "type": "object",
        "properties": {
          "products": {
            "type": "integer",
            "format": "int64"
          },
          "bytes": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "bytes",
          "products"
        ]
      },
      "SearchReport.Method": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "SCAN",
              "TRIGRAM",
              "TYPO",
              "FULL_TEXT"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "COMPLETED",
              "TIMED_OUT"
            ]
          },
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "top": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchReport.Product"
            }
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlanSummary"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "method",
          "outcome",
          "top",
          "total"
        ]
      },
      "SearchReport.Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "priceCents": {
            "type": "integer",
            "format": "int32"
          },
          "score": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        },
        "required": [
          "category",
          "id",
          "priceCents",
          "title"
        ]
      },
      "TelemetrySample": {
        "type": "object",
        "properties": {
          "t": {
            "type": "integer",
            "format": "int64"
          },
          "uptimeMs": {
            "type": "integer",
            "format": "int64"
          },
          "heap": {
            "$ref": "#/components/schemas/TelemetrySample.Heap"
          },
          "nonHeapUsed": {
            "type": "integer",
            "format": "int64"
          },
          "gc": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TelemetrySample.Gc"
            }
          },
          "threads": {
            "$ref": "#/components/schemas/TelemetrySample.Threads"
          },
          "cpu": {
            "$ref": "#/components/schemas/TelemetrySample.Cpu"
          },
          "classesLoaded": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "classesLoaded",
          "cpu",
          "gc",
          "heap",
          "nonHeapUsed",
          "t",
          "threads",
          "uptimeMs"
        ]
      },
      "TelemetrySample.Cpu": {
        "type": "object",
        "properties": {
          "process": {
            "type": "number",
            "format": "double"
          },
          "system": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "process",
          "system"
        ]
      },
      "TelemetrySample.Gc": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "timeMs": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "count",
          "name",
          "timeMs"
        ]
      },
      "TelemetrySample.Heap": {
        "type": "object",
        "properties": {
          "used": {
            "type": "integer",
            "format": "int64"
          },
          "committed": {
            "type": "integer",
            "format": "int64"
          },
          "max": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "committed",
          "max",
          "used"
        ]
      },
      "TelemetrySample.Threads": {
        "type": "object",
        "properties": {
          "live": {
            "type": "integer",
            "format": "int32"
          },
          "daemon": {
            "type": "integer",
            "format": "int32"
          },
          "peak": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "daemon",
          "live",
          "peak"
        ]
      },
      "ThreadLocalReport": {
        "type": "object",
        "properties": {
          "tasks": {
            "type": "integer",
            "format": "int32"
          },
          "poolSize": {
            "type": "integer",
            "format": "int32"
          },
          "carrierThreads": {
            "type": "integer",
            "format": "int32"
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThreadLocalReport.Cell"
            }
          }
        },
        "required": [
          "carrierThreads",
          "cells",
          "poolSize",
          "tasks"
        ]
      },
      "ThreadLocalReport.Cell": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "THREAD_LOCAL",
              "PER_CALL",
              "SHARED"
            ]
          },
          "executor": {
            "type": "string",
            "enum": [
              "PLATFORM",
              "VIRTUAL"
            ]
          },
          "formattersCreated": {
            "type": "integer",
            "format": "int64"
          },
          "allocatedBytesPerTask": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "wallMicros": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "executor",
          "formattersCreated",
          "source",
          "wallMicros"
        ]
      },
      "ThreeDsLabController.Answer": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\d{1,8}"
          }
        },
        "required": [
          "code"
        ]
      },
      "ThreeDsRun": {
        "type": "object",
        "properties": {
          "acsTransID": {
            "type": "string"
          },
          "phase": {
            "type": "string",
            "enum": [
              "INVALID",
              "FRICTIONLESS",
              "CHALLENGED",
              "AUTHENTICATED",
              "FAILED",
              "NOT_AUTHENTICATED",
              "REJECTED"
            ]
          },
          "transStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThreeDsRun.Step"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RiskEngine.Asked"
            }
          },
          "challenge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThreeDsRun.Challenge"
              },
              {
                "type": "null"
              }
            ]
          },
          "valueCheck": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThreeDsRun.ValueCheck"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThreeDsRun.Hop"
            }
          }
        },
        "required": [
          "acsTransID",
          "budget",
          "phase",
          "rules",
          "steps"
        ]
      },
      "ThreeDsRun.Challenge": {
        "type": "object",
        "properties": {
          "sentTo": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "triesLeft": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "code",
          "sentTo",
          "triesLeft"
        ]
      },
      "ThreeDsRun.Hop": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "millis": {
            "type": "number",
            "format": "double"
          },
          "measured": {
            "type": "boolean"
          }
        },
        "required": [
          "measured",
          "millis",
          "name"
        ]
      },
      "ThreeDsRun.Step": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "via": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "fields",
          "from",
          "message",
          "to"
        ]
      },
      "ThreeDsRun.ValueCheck": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string"
          },
          "checks": {
            "type": "boolean"
          },
          "otherAmount": {
            "type": "string"
          },
          "checksForOther": {
            "type": "boolean"
          }
        },
        "required": [
          "amount",
          "checks",
          "checksForOther",
          "otherAmount"
        ]
      }
    },
    "parameters": {
      "API-Version": {
        "name": "API-Version",
        "in": "header",
        "description": "The version of the API to answer with: 1 without the header. Any version but 1 is refused with 400 `UNSUPPORTED_API_VERSION`.",
        "required": false,
        "schema": {
          "type": "string",
          "default": "1",
          "enum": [
            "1"
          ]
        }
      }
    },
    "headers": {
      "RateLimit": {
        "description": "Where the client stands in the policy: `r` requests left and `t`, the seconds until one more is allowed, as in `\"search\";r=9;t=6`. Sent with refusals too.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Policy": {
        "description": "The operation's policy, per client address: its name, the quota `q` and the window `w` in seconds, as in `\"search\";q=10;w=60`.",
        "schema": {
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before trying again: rounded up, never 0.",
        "schema": {
          "type": "integer"
        }
      }
    }
  }
}
