Compare commits

...

4 Commits

Author SHA1 Message Date
d379e48c08 Merge pull request 'ORCH-3 (S-3) + M-5: safe deploy rollback + infra hardcode cleanup' (#20) from feature/ORCH-3-deploy-rollback into main
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
2026-06-03 09:39:38 +03:00
Dev (OpenClaw)
39b15bec65 refactor(agents): parametrize infra hardcode (M-5)
Some checks failed
CI / lint (push) Failing after 5s
CI / test (push) Failing after 5s
CI / build (push) Has been skipped
CI / lint (pull_request) Failing after 4s
CI / test (pull_request) Failing after 5s
CI / build (pull_request) Has been skipped
architect.md: server host 82.22.50.71/mva154 -> ${DEPLOY_SSH_HOST:-mva154}. tester.md: repo path -> ${REPO_DIR:-...}, ui-test runner -> ${UI_TEST_RUNNER:-...}. Defaults preserve current behavior; prompts become portable.
2026-06-03 09:37:24 +03:00
Dev (OpenClaw)
c6b8826a66 fix(deploy): move rollback into deploy hook (S-3)
Remove dangerous git checkout $LAST_TAG from deployer prompt: it left the shared working copy in detached HEAD (breaking the next git pull) and did not roll back prod at all. Rollback now goes through the deploy hook (ssh ... bash ${HOOK} --rollback), which restores the app container to the previously running image. Narrow tools to Bash (git, curl) since the deployer no longer invokes docker directly.
2026-06-03 09:37:24 +03:00
65bb0d91bb Merge pull request 'chore: stop tracking runtime task files (.task*.md)' (#19) from chore/gitignore-task-files into main
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
2026-06-02 20:31:26 +03:00
3 changed files with 13 additions and 10 deletions

View File

@@ -13,7 +13,7 @@ tools:
## Контекст проекта
- Стек: MapLibre GL JS + FastAPI + SQLite/Spatialite + Docker
- Один сервер mva154 (82.22.50.71), Docker Compose
- Один сервер (`${DEPLOY_SSH_HOST:-mva154}`), Docker Compose
- Тайлы: self-hosted raster (terrain, hillshade, TRI)
- Роутинг: OSRM с кастомным эндуро-профилем
@@ -32,7 +32,7 @@ tools:
## Принципы (из BRD)
1. Всё в Docker
2. Один основной сервер (mva154)
2. Один основной сервер (`${DEPLOY_SSH_HOST:-mva154}`)
3. SQLite по умолчанию, PostgreSQL когда нужно
4. Минимум зависимостей (FastAPI > Django, vanilla JS > React)
5. Conventional commits + trunk-based

View File

@@ -5,7 +5,7 @@ model: claude-sonnet-4-6
tools:
- Read (везде)
- Write (только docs/work-items/*/14-deploy-log.md, CHANGELOG.md)
- Bash (git, curl, docker)
- Bash (git, curl)
---
# System prompt: Deployer
@@ -14,7 +14,7 @@ tools:
## Среды
- test: https://openclaw.mva154.duckdns.org/enduro/
- Deploy: docker compose на хосте (через docker exec или SSH)
- Deploy: docker compose на хосте, выполняется только через SSH + deploy-hook (см. блок 3 и 6)
- Gitea API: http://localhost:3000/api/v1
- Gitea token: из переменной ORCH_GITEA_TOKEN
- Repo owner: admin
@@ -99,9 +99,12 @@ echo "Smoke tests PASS"
### 6. Rollback (если smoke fail)
```bash
# Откатить к предыдущему тегу
git checkout $LAST_TAG
echo "ROLLED BACK to $LAST_TAG"
# Откат выполняет deploy-hook на хосте: он восстанавливает app
# на предыдущий образ (.deploy-prev-image). НИКОГДА не делай git checkout
# в shared-репо — это загаживает рабочую копию и НЕ откатывает прод.
# DEPLOY_USER/DEPLOY_HOST/HOOK — те же переменные, что в блоке 3.
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 ${DEPLOY_USER}@${DEPLOY_HOST} "bash ${HOOK} --rollback"
echo "ROLLBACK requested via deploy hook"
# Уведомить
exit 1
```

View File

@@ -24,7 +24,7 @@ tools:
curl -s https://openclaw.mva154.duckdns.org/enduro/api/health
### Шаг 2 — Функциональные тесты
cd /home/slin/repos/enduro-trails && make test
cd ${REPO_DIR:-/home/slin/repos/enduro-trails} && make test
### Шаг 3 — E2E тесты
Прогони e2e через Playwright согласно 04-test-plan.yaml.
@@ -35,8 +35,8 @@ cd /home/slin/repos/enduro-trails && make test
```
WORK_ITEM_ID="<plane-id>"
mkdir -p /tmp/ui-screenshots/$WORK_ITEM_ID
node /home/slin/tools/ui-test/run_tests.js \
/home/slin/repos/enduro-trails/docs/work-items/$WORK_ITEM_ID/04b-ui-test-cases.md \
node ${UI_TEST_RUNNER:-/home/slin/tools/ui-test/run_tests.js} \
${REPO_DIR:-/home/slin/repos/enduro-trails}/docs/work-items/$WORK_ITEM_ID/04b-ui-test-cases.md \
/tmp/ui-screenshots/$WORK_ITEM_ID
cat /tmp/ui-screenshots/$WORK_ITEM_ID/results.json
```