Files
wiki/memory/2026-06-02.md
2026-06-02 20:30:01 +03:00

234 lines
14 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.
# 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
- Deploy-хук `/home/slin/bin/enduro-deploy-hook.sh` СУЩЕСТВУЕТ и корректен
- В orchestrator были незакоммиченные правки (M launcher/config/notifications/plane_sync) — Dev разберёт в Task 1
## 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
# 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