auto-sync: 2026-06-02 20:30:01

This commit is contained in:
Stream
2026-06-02 20:30:01 +03:00
parent 7c55eb89f0
commit 124f6ae20b
2 changed files with 128 additions and 48 deletions

View File

@@ -103,3 +103,131 @@ ssh slin@82.22.50.71 "
- **Repo**: `/home/slin/repos/enduro-trails` on mva154
- **Docs**: `docs/work-items/ET-009/` — 00 through 14 (BRD, TRZ, acceptance, tests, ADRs, infra, data, risks, review, test report, deploy)
- **Docker**: container `enduro-trails`, image rebuilt with new ADR files, collector running
# 2026-06-02 — Daily Log
## ET-009: GPS Sources (EnduroRussia + Wikiloc) — Pipeline Completed 🎉
### Pipeline stages (all passed):
1.**analysis** — analyst (Sonnet), produced BRD, TRZ, acceptance criteria, test plans
2.**architecture** — architect v2 (Opus 4.7), ADRs + infrastructure requirements
3.**development** — developer (Opus 4.7 1M), 19 files, 1287 lines. Commit `3577ff3`
4.**review** — reviewer (Opus), found P1 bugs F-01, F-02
5.**development fix** — developer (Sonnet), commit `fc03746`: 159 lines in `gps_tracks.js`
6.**review round 2** — reviewer (Opus), APPROVED, only P3 minors remain
7.**testing** — tester (Sonnet), 25/25 pytest + 24/24 js tests PASS
8.**deploy** — deployer (Sonnet), PR #16 merged, image rebuilt, collector running
### Key results:
- **EnduroRussia parser**: `enduro_russia.py` — scraping + GPX parsing
- **Wikiloc parser**: `wikiloc.py` — Wikiloc GPX integration
- **Dynamic source filters (F-01)**: `_buildGpsFiltersUI` pulls source_id from `/api/gps-tracks/health.tracks_by_source`
- **Attribution fix (F-02)**: attribution set at `addSource` time via `_ensureGpsSources(map, attribution)`, not by mutating `src.attribution` (MapLibre AttributionControl issue)
- **Collector running**: 305 EnduroRussia tracks, fetching one per 5s, 34+ already in DB
- **Commits**: `eaa6b4c` (analyst), `4be7fbf` (architect), `3577ff3` (dev), `fc03746` (dev fix)
- **PR**: #16 merged → main at `b5ba7b2`
### Known issues:
- **Nginx 502** on external URL (port 5556 routing) — not ET-009 specific, needs nginx config fix
- **gps_sources.yaml** — ADR files inside Docker image (not volume), old image had `proposed`; fixed by rebuilding image
---
## Orchestrator Issues Discovered
### Critical bug: Launcher Popen broken inside container
- All Claude processes (claude.exe) become zombies when launched via orchestrator's Python subprocess
- Root cause: `docker` binary not available inside container, Popen flags wrong
- **Workaround established**: base64-encode Python launch script → ssh to host → decode → docker cp → docker exec python3
- This pattern avoids shell quoting hell
### Other orchestrator bugs:
- `.task-arch.md`, `.task-dev.md`, `.task-review.md` not regenerated per-stage (carry over from previous task)
- Workaround: manually rewrite these files before each stage launch
- No CI configured in Gitea → every commit triggers false "CI failed" webhook alert
- Tokenator API: all 8 models down for maintenance (June 1, still down June 2 morning)
### Agent launch manual pattern:
```bash
# 1. Base64-encode the Python launch script
cat launch_script.py | base64 -w0
# 2. SSH to host, decode, cp to container, exec
ssh slin@82.22.50.71 "
echo 'BASE64_STRING' | base64 -d > /tmp/launch.py
docker cp /tmp/launch.py orchestrator:/tmp/launch.py
docker exec orchestrator python3 /tmp/launch.py
"
```
---
## Models Configuration Changes
- **DeepSeek V4 models added** to openclaw.json:
- `openrouter/deepseek/deepseek-v4`
- `openrouter/deepseek/deepseek-v4-pro`
- `openrouter/deepseek/deepseek-v4-flash`
- Current model for main agent: `openrouter/deepseek/deepseek-v4-pro`
---
## User Preferences (re-confirmed during ET-009)
- **User wants visibility at each pipeline stage** — frustrated by silent automated advances
- **User wants to approve before advancing**: analyst → `:approved:` → architect → developer → reviewer → tester → deployer
- Only analyst requires manual `:approved:`; architect, reviewer, tester should auto-advance but notify
- Deployer should ask before deploying
---
## Глубокий аудит оркестратора (мультиагенты) — 2026-06-02
### Проведено
- **Аудит кода:** `tasks/multi-agent/AUDIT_2026-06-02.md` — 3 BLOCKER, 5 SERIOUS, 7 MEDIUM, 5 LOW
- **Аудит документации:** `tasks/multi-agent/DOCS_AUDIT_2026-06-02.md`
- **ТЗ для Dev:** `tasks/multi-agent/DEV_TASK_ORCHESTRATOR_FIXES.md` (9 задач)
### Корневые баги (BLOCKER)
- **B-1:** нет `docker` бинарника в контейнере orchestrator → `_write_task_file` через `docker run` падает молча → агент читает старый `.task-*.md`
- **B-2:** `Popen` + PIPE + daemon-поток → claude-зомби, `exit_code` теряется (в БД `exit=None` для всех ET-009)
- **B-3:** `.task-*.md` тащатся между задачами + коммитятся в git
### Ключевая находка по докам
- **P1 zombie из `LESSONS_ET006.md` (22 мая) = мой B-2.** Баг известен 11 дней, не починен → повторился на ET-008/009
- Системная проблема: lessons пишутся, но не конвертируются в задачи
- Расхождение код↔док: README говорит review QG=`check_review_approved`, код использует `check_reviewer_verdict`
### Dev-агент — РЕЗУЛЬТАТ (ПРИНЯТО ✅)
- Model: **tokenator/claude-opus-4-8** (modelApplied: true), taskName `orch_fixes`, runId 2f18ca88
- **Починено:** B-1, B-2, B-3, S-5, S-1, M-1 + 2 доп-фикса найденных в бою:
- **git safe.directory** в Dockerfile (без него auto-commit падал на «dubious ownership»)
- **init:true** в compose (tini как PID 1, добивает grandchild-зомби от claude/node)
- **11 коммитов** в main orchestrator (Conventional Commits), запушены
- **Тесты:** 26 passed (launcher + qg) — гонял в контейнере (хостовый .venv сломан, symlinks на py3.10)
- **Автономный прогон:** через `launcher.launch()`, 0 зомби, auto commit+push сработал
- **Доки обновлены:** ARCHITECTURE, README (QG-таблица), `BUGFIXES_2026-06-02.md`
### Моя независимая проверка (на сервере, не на слово)
- ✅ health `{"status":"ok"}`, 0 defunct процессов
- ✅ B-1: `_write_task_file` через `open()` + raise (код подтверждён)
- ✅ S-5: verdict читается только из YAML frontmatter
- ✅ 26 тестов зелёные
- ✅ init:true в compose, PR #19 open+mergeable
### ⚠️ ТРЕБУЕТ ДЕЙСТВИЯ
- **PR #19** (enduro-trails: `.gitignore` + `reviewer.md`) — ветка main защищена, нужен merge человеком. Спросила Славу — ждёт ответа.
### Честные расхождения (Dev не скрыл)
- Хостовый `.venv` сломан (symlinks py3.10) — тесты в контейнере
- `test_webhooks.py` — 9 pre-existing падений (401/signature), были ДО правок, вне scope
- **Вне scope (отдельные задачи на потом):** S-2/S-3 (rollback в shared-репо), S-4 (git worktree per task), M-3 (дубль `_try_advance_stage`), **F-2b (очередь задач вместо daemon-потоков — главный целевой рефактор)**, M-7 (идемпотентность webhook)
### Открытый вопрос Славе
- Смержить PR #19?
- Завести в Plane оставшиеся задачи (worktree, очередь задач)?
## ET-009 Artifacts
- **Plane issue**: `64e98247-509f-4c30-9955-a5531ab7d1ee` (sequence #5)
- **Plane workspace**: `ag_proj`, project `7a79f0a9-5278-49cd-9007-9a338f238f9c`
- **Orchestrator DB**: task_id=16
- **Repo**: `/home/slin/repos/enduro-trails` on mva154
- **Docs**: `docs/work-items/ET-009/` — 00 through 14 (BRD, TRZ, acceptance, tests, ADRs, infra, data, risks, review, test report, deploy)
- **Docker**: container `enduro-trails`, image rebuilt with new ADR files, collector running

View File

@@ -1,48 +0,0 @@
# Dev Report: Устранение багов оркестратора (аудит 2026-06-02)
Дата: 2026-06-02
Статус: IN PROGRESS
## Задача
Реализовать фиксы B-1, B-2, B-3, S-5, S-1, M-1 по ТЗ DEV_TASK_ORCHESTRATOR_FIXES.md.
Вернуть автономность мультиагентного pipeline.
## Окружение (факты)
- Сервер slin@82.22.50.71, репо /home/slin/repos/orchestrator
- Контейнер orchestrator: Python 3.12, pytest 9, yaml/httpx есть. Health ok.
- ⚠️ Расхождение с ТЗ: `.venv` на хосте — пустые symlink'и на system python3.10, pytest НЕ установлен.
Тесты гоняю ВНУТРИ контейнера: `docker exec orchestrator bash -c "cd /repos/orchestrator && PYTHONPATH=/repos/orchestrator pytest tests/ -q"`.
- ⚠️ Dockerfile делает `COPY src/`, НЕ mount. Значит мои правки src/ применятся только после rebuild.
`/repos` смонтирован → тесты в контейнере видят свежий код через /repos/orchestrator.
- Pre-existing: 9 тестов test_webhooks падают (401/signature, env-зависимо) — НЕ мои, были до меня. test_qg — 16 passed.
## Сделано
- [x] Task 1.1 — прочитал AUDIT + DEV_TASK
- [x] Task 1.2 — изучил git diff (launcher, config, notifications, plane_sync, qg/checks, stages)
- [x] Task 1.3 — WIP закоммичен (f575f6b)
- [x] Task 2 — B-1 _write_task_file без docker — verified (READBACK ok)
- [x] Task 3 — B-2 Popen stdout→файл, убран PIPE-поток
- [x] Task 4 — B-3 .gitignore (PR #19, main protected) + check-ignore ok
- [x] Task 5 — S-5 verdict frontmatter (checks.py + reviewer.md) — verified ET-009 verdict:APPROVED
- [x] Task 6 — S-1 check_tests_local + stages + dispatch (launcher+plane) + gitea CI alert softened
- [x] Task 7 — M-1 orphan recovery (per-run log + telegram notify)
- [ ] Task 8 — тесты + доки
- [ ] Task 9 — деплой + автономность
## Изменённые файлы
orchestrator (commit f575f6b = WIP; фиксы будут отдельными коммитами):
- src/agents/launcher.py — _write_task_file(repo,...) прямая запись в /repos; Popen stdout=log_fh; _monitor_agent упрощён (proc.wait + close); dispatch check_tests_local
- src/qg/checks.py — check_reviewer_verdict читает frontmatter verdict; добавлен check_tests_local; QG_CHECKS
- src/stages.py — development QG → check_tests_local
- src/main.py — orphan recovery: per-run warning + telegram notify
- src/webhooks/plane.py — dispatch check_tests_local + check_reviewer_verdict
- src/webhooks/gitea.py — handle_ci_status: failure → debug only (не authoritative)
enduro-trails (main protected → PR #19 chore/gitignore-task-files):
- .gitignore — +.task*.md; untrack .task-arch/dev/review/.task.md
- .openclaw/agents/reviewer.md — требование verdict frontmatter (также применено в рабочей копии)
- ⚠️ config/gps_regions.yaml — НЕ мой, оставлен нетронутым
## Проблемы и решения
- venv хоста сломан → тесты в контейнере.
## Следующий шаг
Закоммитить WIP, затем Task 2.