feat(epic3): deliver the accepted Epic 3 scope through Story 3.17
CI / Rust Checks (pull_request) Failing after 13m41s
CI / UI Checks (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Deploy (pull_request) Skipped
Community Release / release (push) Failing after 13m33s

Recovery delivery of the accumulated, TL-accepted Epic 3 work that had never been
committed to Git (stories 3.6-3.17, see the crank board). Story 3.18 is not accepted
yet and is deliberately excluded: its logging surface, its capability registration,
its oracle projections and its tests are not part of this tree.

Accepted scope
- 3.6 typed static Resource Drafts; 3.7 publication and exact binding of static
  Resource Versions; 3.8 MCP discovery/read and revocation of static Resources;
- 3.9 Resource import/export in API and UI plus TLS dependency maintenance;
  3.10 REST-backed Resource templates; 3.11 shared REST read runtime and the MCP
  revision/capability foundation;
- 3.12 parameterised Prompt Drafts with preview; 3.13 Prompt publication and exact
  version binding to Agents; 3.14 MCP prompts; 3.15 Prompt import/export;
- 3.16 composite Prompts with published Resources (dependency content scan plus
  dynamic read through the accepted 3.11 runtime, admin preview and MCP prompts/get);
- 3.17 bounded MCP completion suggestions from typed published schemas and the
  resources/list admission fix for bound template publications.

Accepted evidence being reused (unchanged code paths)
- 3.16 candidate: core 7, admin-api 22, registry 4, mcp-server 4, UI 6; one final
  `just verify` run 1651 passed / 0 failed / 2 ignored.
- 3.17 candidate: full run 1672 passed / 0 failed / 2 ignored, QA targeted reruns and
  a real MCP Inspector 2.12.0 client smoke.

Delivery engineering in this commit
- CI: one event per change (feature branches are gated by their pull request, push
  runs only on main), story events run the changed packages, the full workspace suite
  stays the feature/release gate; no cache/sharding without a measured runner check.
- Release: the packaged archives, checksums and SBOM are now uploaded to the Gitea
  release entry of the tag instead of dying with the runner workspace.

Not included on purpose: Story 3.18 work, build caches, runtime databases, local
credentials and scratch evidence.

Refs: crank kanban t_e39d7263; baseline 1b6db09bd1.
This commit is contained in:
bsodfather committed 2026-10-25 09:08:22 +00:00
1 parent 1b6db09bd1
commit 54ce770682
357 files changed
+117394 -5115

No files matched your search

+48 -7
View File
@@ -192,7 +192,9 @@ Recorder добавляет к рядам проверенные статиче
раз при запуске и образуют ровно одну tuple на процесс. Имена, типы, help,
process ownership, допустимые значения product labels и buckets определены в
независимом нижнем crate `crank-metrics`. Его deterministic machine snapshot —
[`schemas/metrics-registry-v1.json`](schemas/metrics-registry-v1.json).
[`schemas/metrics-registry-v2.json`](schemas/metrics-registry-v2.json); прежний
[`schemas/metrics-registry-v1.json`](schemas/metrics-registry-v1.json) сохранён
byte-for-byte как compatibility input.
Product-код вызывает только типизированный фасад;
прямая production-зависимость от `metrics` вне `crank-metrics` и
`crank-observability` запрещена архитектурной проверкой Cargo metadata.
@@ -216,12 +218,51 @@ freshness в `1`. Прикладные ошибки JSON-RPC и
Buckets длительности фиксированы кодом:
`0.005`, `0.01`, `0.025`, `0.05`, `0.1`, `0.25`, `0.5`, `1`, `2.5`, `5`,
`10`, `30`, `60` секунд. Это пока техническая шкала, а не SLO. Registry v1
содержит 23 family и для всего lifetime одного процесса ограничен 5 000
logical labelsets и 15 000 Prometheus sample series; текущий worst case —
4 513 и 14 338 соответственно. Histogram budget включает finite buckets,
`+Inf`, `_sum` и `_count`; изменение domain или buckets требует обновления
versioned snapshot и evidence.
`10`, `30`, `60` секунд. Это пока техническая шкала, а не SLO. Registry v2
(`schemas/metrics-registry-v2.json`, генерируется Rust descriptor table,
`schema_version=2`) содержит те же 23 family и фиксирует допустимые
HTTP-идентичности как единственное typed перечисление route+owners: union 91,
admin-проекция 86, mcp-проекция 8, общие ровно `/health`, `/ready`,
`unmatched`. Тринадцать Resource-шаблонов
(`/api/admin/workspaces/{workspace_id}/resources` и его `{resource_id}`,
`.../import`, `.../archive`, `.../content`, `.../export`, `.../preview`,
`.../publish`, `.../revoke`, `.../versions/{version}`,
`.../versions/{version}/content`, `.../versions/{version}/export`) и шесть
Prompt-шаблонов (`.../prompts`, `.../prompts/import`, `.../prompts/{prompt_id}`,
`.../prompts/{prompt_id}/export`, `.../prompts/{prompt_id}/preview`,
`.../prompts/{prompt_id}/versions/{version}/export`) принадлежат
только admin-api и больше не смешиваются с `unmatched`.
Бюджет кардинальности считается **на процесс**, а не на union:
- admin-api — 15 family, 6 285 logical, 19 515 rendered, 12 348 exemplar slots;
- mcp-server — 23 family, 1 083 logical, 3 558 rendered, 2 310 exemplar slots.
Hard ceilings — 6 285 logical / 19 515 rendered / 12 348 exemplar
slots на процесс и 8 388 608 bytes (8 MiB) на готовый exposition. Ранее
logical ceiling поднимали с 5 563 до 5 585 явным решением владельца только для
регистрации уже существующего revoke-маршрута Resource, затем для трёх адресов
переноса документов Story 3.9 (import, export текущей и конкретной версии)
владелец явно разрешил поднять все три потолка до фактического бюджета
admin-api: 5 585 → 5 795, 17 638 → 17 975, 11 270 → 11 368. Для трёх адресов
переноса шаблонов сообщений Story 3.15 (`/prompts/import`,
`/prompts/{prompt_id}/export`, `/prompts/{prompt_id}/versions/{version}/export`)
владелец разрешил поднять все три потолка до фактического бюджета admin-api:
6 075 → 6 285, 18 855 → 19 515, 11 928 → 12 348; exposition-лимит 8 MiB не
менялся. Histogram
budget включает finite buckets, `+Inf`, `_sum` и `_count`; 8 MiB ограничивает
**ответ**, а не heap: полный рендер и OpenMetrics-index всё ещё аллоцируют
память до проверки размера. Изменение domain или buckets требует обновления
versioned snapshot и evidence. Registry v1
(`schemas/metrics-registry-v1.json`) сохраняется byte-for-byte как
compatibility input и не пере-генерируется.
Процесс один раз фиксирует закрытый сервис до установки recorder, gauges,
background producers и metrics listener; повтор того же сервиса идемпотентен,
конфликт — типизированная terminal-ошибка startup. До фиксации facade-вызовы
— безопасный no-op. Известный route чужого сервиса записывается как
`unmatched` с сохранением method/status/duration, но никогда не создаёт ключ
чужого route.
Обычный scrape сохраняет Prometheus text 0.0.4. Клиент с
`Accept: application/openmetrics-text` получает OpenMetrics 1.0 и `# EOF`.