Mirror the 0.2.1 contract to the frontend zone, regenerate the schema types, and ping the zone about the 503 response and the landed runner

This commit is contained in:
Claude (backend session) 2026-08-09 17:00:27 +03:00
parent 93d9943a35
commit 3f55488bfe
3 changed files with 37 additions and 1 deletions

View file

@ -2,7 +2,7 @@ openapi: 3.1.0
info: info:
title: TextMachine API title: TextMachine API
version: 0.2.0 version: 0.2.1
summary: Ratified contract between the frontend and the TextMachine platform (D39.99). summary: Ratified contract between the frontend and the TextMachine platform (D39.99).
description: | description: |
**RATIFIED contract (D39.99, 04.08.2026).** The canonical copy lives in **RATIFIED contract (D39.99, 04.08.2026).** The canonical copy lives in
@ -344,6 +344,7 @@ paths:
'401': { $ref: '#/components/responses/Unauthorized' } '401': { $ref: '#/components/responses/Unauthorized' }
'404': { $ref: '#/components/responses/NotFound' } '404': { $ref: '#/components/responses/NotFound' }
'409': { $ref: '#/components/responses/Conflict' } '409': { $ref: '#/components/responses/Conflict' }
'503': { $ref: '#/components/responses/ServiceUnavailable' }
/runs/{runId}/events: /runs/{runId}/events:
parameters: parameters:
@ -605,6 +606,14 @@ components:
content: content:
application/problem+json: application/problem+json:
schema: { $ref: '#/components/schemas/Problem' } schema: { $ref: '#/components/schemas/Problem' }
ServiceUnavailable:
description: |
The deployment cannot perform this action right now (added in 0.2.1, D39.123): starting a
run requires the engine seam to be fully configured, and answering with any other code
would misname the state. Temporary by nature — retry later; no Retry-After is promised.
content:
application/problem+json:
schema: { $ref: '#/components/schemas/Problem' }
schemas: schemas:
Id: Id:

View file

@ -1008,3 +1008,16 @@ RAC — строка Ф-18; резать его осмысленно после
чужого не задело. Запрет «никакого `checkout` поверх грязного дерева» (`CLAUDE.md`) существует чужого не задело. Запрет «никакого `checkout` поверх грязного дерева» (`CLAUDE.md`) существует
ровно для этого случая и относится к своим файлам тоже. Пробу отката делать копией ровно для этого случая и относится к своим файлам тоже. Пробу отката делать копией
(`cp` до, `cp` после), а не через git. (`cp` до, `cp` после), а не через git.
## Пинг оркестратора №15 (09.08): контракт 0.2.1 — `503` на старте прогона; платформа-раннер заленден
- **Контракт бампнут 0.2.0 → 0.2.1** (D39.123): `POST /books/{bookId}/runs` получил ответ **`503`**
(`ServiceUnavailable`, problem+json) — старт прогона на деплое, где шов движка не сконфигурирован;
временное состояние, ретрай позже, `Retry-After` не обещан. Зеркало `frontend/docs/api-contract/`
синхронизировано байт-в-байт этим же лендингом. При следующей сессии — перегенерировать типы из
спеки; других изменений форм нет, правка аддитивная.
- **Платформа-раннер заленден** (`d29e30c`): пять ручек `/v0` контракта живые — библиотека ·
карточка · run-options · старт прогона · usage; прогресс прогона пофазный (draft/edit) в карточке.
Фронт может говорить с живой платформой вместо моков — стык проверен 47 wire-проверками приёмки.
- Известное ограничение до эмиттера (строка 103): стоп по потолку и штатный останов приезжают как
`failed` (PD-113/двойник) — на экране не строить различение этих состояний до строки 165 движка.

View file

@ -1014,6 +1014,19 @@ export interface components {
"application/problem+json": components["schemas"]["Problem"]; "application/problem+json": components["schemas"]["Problem"];
}; };
}; };
/**
* @description The deployment cannot perform this action right now (added in 0.2.1, D39.123): starting a
* run requires the engine seam to be fully configured, and answering with any other code
* would misname the state. Temporary by nature retry later; no Retry-After is promised.
*/
ServiceUnavailable: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["Problem"];
};
};
}; };
parameters: { parameters: {
/** @description Opaque book identifier. */ /** @description Opaque book identifier. */
@ -1384,6 +1397,7 @@ export interface operations {
401: components["responses"]["Unauthorized"]; 401: components["responses"]["Unauthorized"];
404: components["responses"]["NotFound"]; 404: components["responses"]["NotFound"];
409: components["responses"]["Conflict"]; 409: components["responses"]["Conflict"];
503: components["responses"]["ServiceUnavailable"];
}; };
}; };
streamRunEvents: { streamRunEvents: {