peppa/openspec/changes/pep-36-lightweight-stack/specs/service-monitoring/spec.md
Асель 50b1d1afec PEP-36: benchmark SQLite vs Postgres and propose Bun + SQLite stack
bench/sqlite (outside the workspace): Peppa-like load with 10/20 runners,
a hook process per event, MCP, bot, web and watchdog; bun:sqlite,
node:sqlite, better-sqlite3, a single-writer service and Postgres; notify
replacements (cursor polling, fs.watch on WAL, unix-socket push); a
ceiling test; a schema port to sqlite with a data copy from Postgres and
a check of drizzle transactions.

openspec/changes/pep-36-lightweight-stack: proposal, design with the
numbers, specs (platform-storage, service-monitoring), phased tasks.
No product code changes; the move waits for the PM's decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:28:59 +05:00

17 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Spec Delta: service-monitoring
## MODIFIED Requirements
### Requirement: Health-эндпоинт
Веб SHALL отвечать на `GET /api/health` JSON-сводкой: доступность БД, версия и коммит, состояние сервисов; код ответа 200, если БД доступна, иначе 503. Сводка не содержит логинов и чатов пользователей.
#### Scenario: Всё работает
- **GIVEN** БД доступна, версия Пеппы 0.15.0
- **WHEN** запрошен `/api/health`
- **THEN** ответ 200 с `ok: true`, `db.ok: true`, `version: "0.15.0"` и списком сервисов web, bot, watchdog
#### Scenario: БД недоступна
- **GIVEN** файл базы SQLite не открывается (удалён, нет прав или повреждён)
- **WHEN** запрошен `/api/health`
- **THEN** ответ 503 с `ok: false`, `db.ok: false` и текстом ошибки, не дольше чем за 3 секунды