Commit Graph

54 Commits

Author SHA1 Message Date
2365ec2fcc PEP-245: обрыв прохода к FORGE снаружи виден суперадмину с причиной; туннель Mac быстрее замечает обрыв
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:24:22 +00:00
f3d10a4c25 PEP-243: платформа называется FORGE — название во всех текстах для людей и подсказках агентам, адрес forge.telecom.quest
«Peppa FACTORY» → «FORGE» в экранах, сообщениях, словарях en/kk, шаблоне и тестах; «Пеппа» → «FORGE» в подсказках
агентам и правилах; логотип, значок, версия кэша service worker; в словаре старые названия — в «Нельзя».
Внутренние имена (CLI peppa, PEPPA_*, MCP-сервер peppa, ключи PEP-N) не меняются. Второй адрес — в mac-route.sh.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 11:18:49 +05:00
eb36844de3 PEP-240: выкатка на сервере зовёт docker через sudo и делает копию базы из образа; Bugsink принимает имя контейнера, перенос со сверкой
All checks were successful
peppa/lint lint: success за 1с
peppa/typecheck typecheck: success за 43с
peppa/build build: success за 32с
peppa/test test: success за 1282с
peppa-ci / ci (pull_request) Successful in 23m21s
Первая выкатка платформы на сервере и перенос Bugsink (23.11): у пользователя нет доступа к сокету docker,
на хосте нет sqlite3, Bugsink по имени контейнера отвечал 400, вебхуки проектов указывали на
host.docker.internal.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 09:29:15 +05:00
43d691196c PEP-237: превью — список с отдельного дескриптора, неизвестная версия остаётся на Mac
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:43:01 +05:00
89745fc33f PEP-231: продукт получает окружение контейнера Mac; раннер ждёт только выкладки
Находки переноса 22.11: секреты в Peppa расходились с тем, с чем продукты работали;
проектные peppa-deploy.sh передают compose свои переменные (SERVICE_ALIAS, PEPPA_SHA).
reenv — выровнять перенесённый продукт. Раннер: поток проверок платформы не кончается.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:43:01 +05:00
07292a2dfe PEP-231: сверка окружения продукта на Mac и сервере (имена и суммы значений)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:43:01 +05:00
c09f6da5c4 PEP-231: адрес Bugsink после переноса идёт на сервер маршрутом Mac
All checks were successful
peppa/lint lint: success за 0с
peppa/typecheck typecheck: success за 22с
peppa/build build: success за 15с
peppa/test test: success за 684с
peppa-ci / ci (pull_request) Successful in 12m47s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 09:52:10 +05:00
e83302c398 PEP-231: продукты переезжают вместе с данными и без отчёта о выкладке
Some checks failed
peppa/lint lint: success за 1с
peppa/typecheck typecheck: success за 21с
peppa/build build: success за 15с
peppa/test test: failure за 693с
peppa-ci / ci (pull_request) Failing after 12m51s
products-move.sh (Mac) и product-up.sh (сервер): та же версия, тома со сверкой сумм,
Postgres дампом, предпроверки и откат, превью, раннер проверок. Маршрут Mac: на сервер
идут только адреса продуктов — общее правило спорило со страницами Gitea.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 09:49:11 +05:00
6b105ce393 Merge branch 'task/pep-230' into task/pep-231 2026-11-22 09:32:11 +05:00
94292adb41 Merge branch 'main' into task/pep-230
Some checks failed
peppa/lint lint: success за 1с
peppa/typecheck typecheck: success за 21с
peppa/build build: success за 15с
peppa/test test: failure за 673с
peppa-ci / ci (pull_request) Failing after 12m27s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 09:30:18 +05:00
9f62b76b00 PEP-231: скрипты переезда (продукты, Bugsink, туннель сервера, Mac), docs/SERVER.md, AGENTS.md, память
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 16:17:20 +00:00
e46c83f3b3 Merge remote-tracking branch 'origin/main' into task/pep-228 2026-11-21 15:12:22 +00:00
714b002cf5 PEP-230: сессии с Mac после переезда перезапускаются в контейнере
All checks were successful
peppa/lint lint: success за 1с
peppa/typecheck typecheck: success за 21с
peppa/build build: success за 13с
peppa/test test: success за 642с
peppa-ci / ci (pull_request) Successful in 12m14s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 19:00:50 +05:00
316eca7ede PEP-230: CLI Claude и Codex в образе платформы (ИИ-роли, вход подписок); страж портов на общем сервере выключен
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 18:36:38 +05:00
af542c8167 PEP-230: имя колонки разговора в правке базы
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 18:31:07 +05:00
379ae6a845 PEP-230: проверка перед переключением считает только текущую ветку рабочей копии
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 18:28:08 +05:00
3d4a213caa PEP-230: скрипты переключения на сервер (маршрут, перенос репозиториев и базы, откат)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 18:27:24 +05:00
f783873de7 PEP-230: платформа в контейнерах на Linux — не root, общий tmux, адрес веба для агента, экран bypass
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 18:06:38 +05:00
0d86b801ee PEP-225: веб через свой сервер в launchd, переустановка агента веба при выкатке
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 21:04:14 +05:00
e8c87ec04d PEP-222: образ и compose платформы, выкатка контейнерами, раннеры в контейнерах по умолчанию
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 19:52:59 +05:00
9d1c4f0de2 PEP-209: самолечение застрявших задач, расписание повторов, кнопки задержек
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:43:13 +05:00
ffd4e4c171 PEP-202: Observability — сервис мониторингов peppa-observer, раздел для суперадмина, MCP
Сервис peppa-observer (своя база observe.db, журнал 7 дней): мониторинги HTTP(S),
TCP, DNS (системный против 1.1.1.1), «Интернет», heartbeat; состояние меняется
после N неудач/удач подряд, одно сообщение в канал платформы на смену, упавшие
вместе с интернетом молчат. Раздел /observability и MCP-инструменты — только
суперадмину и агентам платформы. Встроенные: «Интернет», «eGov relay» (HTTP, DNS).
Проверка сети из вачдога (PEP-201) переехала сюда.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 21:15:36 +05:00
c410016e37 PEP-188: Codex запускается без сбоев — кавычки в .env, доверие папке, отказ на параметрах
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 11:03:30 +05:00
d2903db557 PEP-181: the live-copy pre-commit hook blocks only the live copy itself — worktrees share the hooks directory and kept failing to commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:09:45 +05:00
Асель
fd909a9951 PEP-172: OpenSpec change (archived), health waits for heartbeats after the restart, project memory compacted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 20:23:53 +05:00
Асель
c36b351e93 PEP-172: deploys go through scripts/live-deploy.sh — clean main, green CI, migrations, build, health and page checks with rollback; no agent runs in Peppa's own live copy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 19:08:03 +05:00
Асель
b1c13e739e PEP-165: the live site runs next start; deploy builds before restarting web
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:50:47 +05:00
Асель
9052f3245f Merge main into task/pep-98: PEP-112…124 texts through the dictionary
Main's new wording (PEP-123 «Продакт» words) kept and wrapped in t()/m();
wording(mode, locale) gives English words for {task}/{runner} placeholders;
glossary check (pnpm lint) passes; English for all new keys (en/merge-*.ts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:04:39 +05:00
Асель
c47a26745d PEP-124: glossary check in CI — pnpm lint, checks.lint, the lint step of the workflow and ci.sh
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 21:18:44 +05:00
Асель
96b5422a56 PEP-105: «Peppa FACTORY» instead of «Пеппа» in Russian UI texts; i18n-check guards Russian keys; archive change, memory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:56:55 +05:00
Асель
1f16286dca PEP-98: English for web, bot, notifications and runner messages; product name «Peppa FACTORY» everywhere
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:47:50 +05:00
Асель
355c5b19b2 PEP-98: i18n core — dictionaries, localizeText, user locale, web provider, bot and push localization, i18n-check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:25:03 +05:00
Асель
5af93d7438 PEP-4: platform repo address from GITEA_PLATFORM_REPO, template defaults to peppa/template
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 00:11:31 +05:00
Асель
ca57f9543b PEP-17/40: agent sandbox per runner (docker + agent relay) and runner hosts over SSH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:57:28 +05:00
Асель
0941a9f4b7 PEP-63: Bugsink on SQLite (volume peppa-bugsink-data), migration script, postgres under the legacy profile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:11:13 +05:00
Асель
616ce28c70 infra: one compose project peppa (postgres, bugsink, act-runner) — one group in OrbStack
The runner and Bugsink ran from compose files in old worktrees (projects peppa-ci, peppa-bugsink).
Container names and the runner's registration volume are kept. scripts/infra-up.sh, pnpm infra:up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 02:10:53 +05:00
Асель
c4952b2011 Pre-launch live mode: PEPPA_WEB_MODE=dev runs next dev (HMR) from the working copy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:56:02 +05:00
Асель
03aee432fb PEP-18: separate Peppa prod — release dir, PM button, DB backup, auto-rollback
- scripts/peppa-release.sh: ~/peppa/{repo.git,releases/<sha>,current,shared/.env};
  install → next build → checked DB backup → migrate → switch current → kickstart →
  health (/api/health commit + fresh heartbeats) → rollback; --queue, --check, --no-restart
- runner/platform-release.ts: deployProd for the platform project (PEPPA_PLATFORM_KEY=PEP)
  queues a request for launchd quest.telecom.peppa.release; offer after green main
- CLI: peppa db backup [file], peppa release report; backupDb verifies the copy
- install-launchd.sh: wait for unload after bootout (no "Bootstrap failed: 5"),
  release agent (QueueDirectories), PEPPA_ROOT in agents
- bin wrappers: logical root so hooks/credential.helper point at ~/peppa/current
- mock-launchctl, mock-pnpm; e2e platform-release.test.ts; OpenSpec pep-18-peppa-prod

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:58:34 +05:00
Асель
3a282b8054 PEP-36 stage 2: SQLite (node:sqlite, WAL) instead of Postgres
- packages/db: schema on sqlite-core (timestamps as epoch ms → Date, JSON as text,
  booleans 0/1), one baseline migration; node:sqlite client under drizzle's
  better-sqlite3 session (busy_timeout first, WAL, BEGIN IMMEDIATE, retries on
  SQLITE_BUSY, lazy open, async transaction callbacks refused); PEPPA_DB
  (default ~/.peppa/peppa.db)
- live updates: notify() pokes the bot over a unix socket; the bot also watches
  PRAGMA data_version every second (writes by other processes)
- Postgres specifics ported: createTask transaction is synchronous, no
  `for update skip locked`, `count(*)`, json_extract instead of ->>, json_each
  instead of @>
- `peppa db migrate` and `peppa db migrate-to-sqlite <file>` (read-only
  snapshot of Postgres, FK order from the schema, row count + foreign key
  checks, file appears only when they pass); old Postgres schema kept in
  packages/cli/legacy-pg-migrations for the migration and its test
- daily VACUUM INTO backup from the watchdog (7 copies, admin alert on failure)
- tests: a temp SQLite file per test file; storage.test.ts (20 processes,
  per-project numbering across processes, socket/data_version, migration from
  Postgres incl. a dangling foreign key, backups); two test races fixed
- CI: no per-run Postgres database; PEPPA_TEST_PG only for the migration test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:23:24 +05:00
Асель
8dc82859c7 PEP-36 stage 1: run Peppa with Node 26 type stripping instead of tsx
- tsconfig: erasableSyntaxOnly + verbatimModuleSyntax; parameter properties
  rewritten (BugsinkError, GiteaError, GiteaClient, OAuthError, TelegramError,
  TelegramApi, MockGitea)
- bin wrappers (peppa, peppa-mcp, peppa-hook, peppa-bot, testkit mocks,
  peppa-dev): `node --import scripts/lib/require-node.mjs` (clear error on
  Node < 26, PEPPA_NODE overrides the binary); package scripts and tests on
  `node` / `node --test`; tsx removed
- install-launchd.sh pins PEPPA_NODE (checked absolute path) in the plists
- fix a race the faster hooks exposed: the prompt hook answered every pending
  question, including a PM question raised after Peppa itself pasted text
  into the terminal; sendToSession now logs `input_sent` and the hook only
  answers questions older than that input
- change pep-36-lightweight-stack: stage 1 done, hook start numbers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:51:22 +05:00
Асель
961cb558a4 PEP-22: CI job uses host Postgres with a per-run database, installs openspec
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:00:28 +05:00
Асель
8fee68f8eb PEP-22: Gitea Actions workflow for Peppa on the PEP-57 runner; testkit creates its DB over SQL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:00:28 +05:00
Асель
93f38bbcba PEP-22: harden timing-sensitive e2e steps, archive change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:00:28 +05:00
Асель
56a7756e71 PEP-22: scripts/ci.sh, PR status peppa/ci, mock-act-runner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:00:28 +05:00
Асель
498013472f PEP-58: Bugsink — production errors become Peppa incidents and tasks
- infra: Bugsink 2.6.3 in docker (infra/bugsink, scripts/bugsink-up.sh), database
  bugsink in Peppa's Postgres, Traefik route bugsink.telecom.quest
- packages/bugsink: REST API client + custom-webhook payload parsing
- incidents (migration 0011): incident_settings, error_sources, incidents; ingest from
  webhook POST /api/hooks/bugsink/<secret> and a 2-minute poll in the watchdog
- incident policy per project: notify / backlog (default) / start / ask (Telegram
  buttons) / triage (claude -p with the owner's token, falls back to ask)
- daily task cap, environments, ignore pattern; manual "fixed" until PEP-57;
  REGRESSED returns the task to the backlog
- web «Ошибки» section, bot buttons, MCP tools for agents and the PM, help, RULES.md
- testkit: mock-bugsink, mock-triage, incidents.test.ts (one test per scenario,
  plus a live run against the real Bugsink with PEPPA_LIVE_BUGSINK=1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:31:32 +05:00
Асель
3ab408eb70 PEP-57: CI for factory projects — act_runner, template workflow, connect CI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:19:11 +05:00
Асель
2b0f2fd984 PEP-1: web platform with Gitea login, projects, goals, tasks, sessions
- web: Gitea OAuth2 login, signed session cookie, everything behind login;
  inbox with answers, project board (goals → tasks), task page with
  OpenSpec artifacts, questions and session controls; new project form;
  auto-refresh, light/dark, mobile
- users + projects.owner_id; tokens AES-256-GCM encrypted; owner-only access
- provisionProject (runner): new or existing Gitea repo, peppa-bot
  collaborator, template + openspec init, push, rollback; used by web and
  peppa project create (replaces scripts/bootstrap-project.sh)
- peppa web login-link, peppa project owner; Gitea OAuth app script
- bins/template resolved via PEPPA_ROOT (works inside the Next build)
- testkit: mock-gitea + 10 tests (42 e2e total, all green)
- OpenSpec: pep-1-web-platform archived into specs web-auth,
  project-provisioning, web-workspace

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:55:02 +05:00
Асель
9cf0d53303 Add Telegram bot: pairing, durable outbox, answers from buttons and replies
- bot: own Bot API client, long polling with persisted offset, updates
  claimed before acting (no replay after restart), outbox with retries
  (429 retry_after, 5xx), /start pairing code (hashed, single use, 10 min),
  only the paired chat/user is served
- PM questions rendered per kind: approve button / reply to reject,
  option buttons, allow/always/deny, alerts with continue or resume/stop;
  messages are closed with who answered what, incl. terminal answers
- stopping/resuming a session expires its open questions
- CLI: peppa telegram pair|status|unpair; launchd agent for the bot
- testkit: mock-telegram + 11 bot journeys (32 e2e tests, all green)
- fix: keep the tmux server alive when empty (exit-empty off) — a new
  session could die with a server shutting down after the last kill
- fix: test env must load before runner modules (no leaks to real tmux)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:26:58 +05:00
Асель
1df550bb86 Add Codex provider, mock agents and end-to-end CJM suite
- runner: provider abstraction (claude | codex); per-run launch.sh keeps
  long argv out of tmux; Codex via notify callback + -c config for rules
  and the peppa MCP server; session env carries DATABASE_URL/PEPPA_HOME
- testkit: mock-claude / mock-codex driven by scenarios — real hooks,
  notify, MCP calls, raw-mode TUI input with bracketed paste, permission
  dialog, usage limits, hangs, crashes, /clear
- 21 CJM tests on an isolated DB, tmux server and state dir (all green)
- fix: watchdog crash/stall alerts showed blank lines instead of the tail
- bins load .env without overriding the caller's env; tmux socket option
- AGENTS.md (was CLAUDE.md) and shared RULES.md: mock-first rule with a
  mock prefix for anything blocked on external dependencies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:09:43 +05:00
Асель
e1384a4c6f Push Peppa to Gitea; shared RULES.md loaded live into every session
- peppa-bot account: repos peppa-bot/peppa and peppa-bot/template
- git-credential-peppa: per-repo credential helper with the bot token
- template split: RULES.md (shared, stays in Gitea) + AGENTS.md (project)
- runner fetches RULES.md from Gitea on each launch (cached fallback) and
  passes it via --append-system-prompt-file; MCP get_rules for manual runs
- bootstrap-project.sh clones the template from Gitea

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 19:50:45 +05:00