feat(0121a): wave 1 e2e_checks proposals (5 apps)

5 fn-recopilador design-e2e paralelos sobre mix de stacks:
- deploy_server (Go service)
- registry_api  (Go service + FTS5)
- shaders_lab   (C++ ImGui)
- auto_metabase (Python CLI)
- dag_engine    (Go scheduler + react/vite frontend)

Total: 24 checks propuestos. Bloques YAML listos para pegar al
frontmatter de cada app.md tras revision humana.

Advertencias laterales en README.md:
- dag_engine: registry.db huerfana + pnpm build roto + falta --migrate-only
- deploy_server: --db flag no expuesto en cmdServe

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-19 00:32:55 +02:00
parent eb30074792
commit 2effb688b0
2 changed files with 175 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# Propuestas e2e_checks — issue 0121a
Generadas por `fn-recopilador design-e2e` en wave 1, 2026-05-19.
## Estado
| App | YAML | Lang | Stack | Checks | Severidad mix | Estado |
|---|---|---|---|---|---|---|
| deploy_server | [deploy_server.yaml](deploy_server.yaml) | go | net/http + CGO sqlite | 4 | critical | propuesta |
| registry_api | [registry_api.yaml](registry_api.yaml) | go | net/http + CGO+FTS5 | 7 | 6 critical + 1 warning | propuesta |
| shaders_lab | [shaders_lab.yaml](shaders_lab.yaml) | cpp | imgui + mingw-w64 | 3 | 2 critical + 1 warning | propuesta |
| auto_metabase | [auto_metabase.yaml](auto_metabase.yaml) | py | httpx + CLI argparse | 4 | critical | propuesta |
| dag_engine | [dag_engine.yaml](dag_engine.yaml) | go | net/http + vite/react + CGO+FTS5 | 6 | 5 critical + 1 warning | propuesta |
## Advertencias detectadas (laterales al objetivo)
- **dag_engine** — `apps/dag_engine/registry.db` (262 KB) viola `db_locations.md` (registry.db SOLO en raiz). Reaparicio tras borrado de 2026-05-16. Issue separado pendiente.
- **dag_engine** — `pnpm build` roto por Mantine API drift (`StepTimeline.tsx:49` + `main.tsx:1`). Check `build_frontend` queda en `severity: warning` hasta arreglar.
- **dag_engine** — falta flag `--migrate-only` en binario. Check `migrations_apply` usa `list` como proxy.
- **deploy_server** — flag `--db` no expuesto en `cmdServe`. Check smoke usa BD por defecto del cwd hasta arreglar.
## Siguiente paso
Wave 2 (16 apps restantes): app_gestion, app_hub_launcher, altsnap_jitter_test, docker_tui, fn_match, footprint_geo_stack, metabase_registry, pipeline_launcher, primitives_gallery, registry_mcp, script_navegador, services_api, services_monitor, set_exe_icon, tables_qa, text_editor_smoke + 5 en projects/*/apps (element_matrix_chat, agents_and_robots, sqlite_api, registry_dashboard, odr_console).
Tras todas las propuestas → ejecutar 0121c: `/autonomous-task` por app aplicando el bloque al `app.md` correspondiente del sub-repo.
## Como aplicar manualmente (sin orquestador)
```bash
# Editar el app.md del target
cd apps/<app>
# Pegar el bloque e2e_checks: del yaml al frontmatter
$EDITOR app.md
# Commit en sub-repo
git add app.md && git commit -m "feat: add e2e_checks (issue 0121)"
git push
```
@@ -0,0 +1,137 @@
# Propuesta e2e_checks para apps/dag_engine
# Generada por fn-recopilador en modo design-e2e (2026-05-19)
#
# INSTRUCCIONES: copiar el bloque e2e_checks al frontmatter de apps/dag_engine/app.md
# tras revision humana. NO modificar app.md automaticamente.
#
# Stack detectado:
# lang=go, framework=net/http + vite + react + mantine
# CGO_ENABLED=1, build tags: fts5
# frontend/ con pnpm + vite (dist/ existente pero incompleto — pnpm build roto)
# store/migrations/ con 2 migraciones SQL (001_init, 002_step_function_id)
# tag 'service' → puerto 8090 (declarado en service.port)
# operations.db NO presente (usa dag_engine.db propia, no el bucle reactivo)
# subcmds disponibles: run, list, status, validate, server, help
# NO hay archivos *_test.go (ni en raiz ni en store/) → check tests OMITIDO
#
# NOTAS IMPORTANTES:
# - El binario productivo se llama "dag-engine" (con guion) segun README.
# El app.md no declara entry_point como binario, solo "main.go".
# Los checks usan "./dag_engine" (guion bajo) consistente con el cmd de build.
# Si el nombre cambia, ajustar todos los cmd que lo referencian.
# - pnpm build esta roto (Mantine API drift en StepTimeline.tsx + main.tsx).
# El check build_frontend se marca severity: warning para no bloquear el gate.
# - Las migraciones se aplican automaticamente en store.Open(), que es llamado
# por cmdList. El check migrations_apply usa ese mecanismo (no hay --migrate-only).
# - No se arranca el scheduler ni se ejecutan jobs reales.
# - Port e2e: 8195 (8090 + 105 para no colisionar con prod).
e2e_checks:
# -----------------------------------------------------------------------
# check: build_frontend
# Por que: el binario embebe frontend/dist via //go:embed all:frontend/dist.
# Sin dist compilado, la UI sirve solo el index.html de placeholder.
# Se marca warning porque el build esta roto actualmente (API drift
# de Mantine en StepTimeline.tsx:49 y main.tsx:1 — ver fix notes
# 2026-05-16 en app.md). Arreglar antes de promover a critical.
# -----------------------------------------------------------------------
- id: build_frontend
cmd: "cd /home/lucas/fn_registry/apps/dag_engine/frontend && pnpm install --frozen-lockfile && pnpm build"
timeout_s: 180
severity: warning
# NOTA: severity warning porque pnpm build falla por API drift conocido.
# Cuando se arregle StepTimeline.tsx (Collapse API) y main.tsx (CSS import),
# cambiar a severity: critical.
# -----------------------------------------------------------------------
# check: build_backend
# Por que: valida que el codigo Go compila con CGO + fts5. Es el gate mas
# basico — si no compila, ningun otro check tiene sentido.
# El binario se escribe en /tmp para no contaminar el directorio
# de trabajo (idempotente, no afecta al binario productivo).
# -----------------------------------------------------------------------
- id: build_backend
cmd: "cd /home/lucas/fn_registry/apps/dag_engine && CGO_ENABLED=1 go build -tags fts5 -o /tmp/dag_engine_e2e_bin ."
timeout_s: 120
# -----------------------------------------------------------------------
# check: migrations_apply
# Por que: verifica que las 2 migraciones SQL (001_init, 002_step_function_id)
# se aplican correctamente sobre una DB nueva en /tmp. El subcmd
# `list` llama store.Open() que dispara applyMigrations() antes de
# retornar — si las migraciones fallan, el proceso sale con error.
# Idempotente: cada corrida del check crea una DB nueva en /tmp.
# NO hay flag --migrate-only en el binario actual.
# -----------------------------------------------------------------------
- id: migrations_apply
cmd: "rm -f /tmp/dag_engine_e2e.db /tmp/dag_engine_e2e.db-shm /tmp/dag_engine_e2e.db-wal && /tmp/dag_engine_e2e_bin list --db /tmp/dag_engine_e2e.db /home/lucas/fn_registry/apps/dag_engine/dags_migrated/"
timeout_s: 15
expect_exit: 0
# NOTA: depende de check build_backend (usa /tmp/dag_engine_e2e_bin).
# Si fn-analizador corre checks en orden declarado, build_backend
# debe preceder a migrations_apply. Orden actual es correcto.
# -----------------------------------------------------------------------
# check: dag_parse_fn_backup
# Por que: valida que el subcmd `validate` parsea y hace topo_sort de un
# DAG real sin ejecutarlo. fn_backup.yaml es el DAG mas sencillo
# (pipeline de backup). Exit 0 = Validation: PASS.
# Exit 1 = errores de validacion (dependencias ciclicas, steps
# mal referenciados, etc.).
# -----------------------------------------------------------------------
- id: dag_parse_fn_backup
cmd: "/tmp/dag_engine_e2e_bin validate /home/lucas/fn_registry/apps/dag_engine/dags_migrated/fn_backup.yaml"
timeout_s: 10
expect_exit: 0
expect_stdout_contains: "Validation: PASS"
# NOTA: depende de check build_backend (usa /tmp/dag_engine_e2e_bin).
# -----------------------------------------------------------------------
# check: dag_parse_daily_audit
# Por que: valida el DAG mas complejo (daily-registry-audit.yaml tiene
# multiples steps con dependencies cross-step). Smoke test del
# topo_sort sobre un grafo no trivial.
# -----------------------------------------------------------------------
- id: dag_parse_daily_audit
cmd: "/tmp/dag_engine_e2e_bin validate /home/lucas/fn_registry/apps/dag_engine/dags_migrated/daily-registry-audit.yaml"
timeout_s: 10
expect_exit: 0
expect_stdout_contains: "Validation: PASS"
# NOTA: depende de check build_backend (usa /tmp/dag_engine_e2e_bin).
# -----------------------------------------------------------------------
# check: smoke_server
# Por que: tag 'service' declarado → gate de salud obligatorio.
# Arranca el servidor en puerto efimero 8195 (prod=8090 + 105)
# con DB en /tmp para no tocar dag_engine.db productivo.
# Sin --scheduler para no disparar jobs cron durante el check.
# health endpoint /api/dags declarado en service.health_endpoint.
# -----------------------------------------------------------------------
- id: smoke_server
cmd: "/tmp/dag_engine_e2e_bin server --port 8195 --db /tmp/dag_engine_e2e.db --dags-dir /home/lucas/fn_registry/apps/dag_engine/dags_migrated/ &"
health: "http://127.0.0.1:8195/api/dags"
timeout_s: 10
# NOTA: sin flag --scheduler para no disparar jobs reales.
# fn-analizador debe matar el grupo de procesos al terminar la suite.
# La DB /tmp/dag_engine_e2e.db ya existe (creada por migrations_apply).
# -----------------------------------------------------------------------
# check: ops_audit
# OMITIDO — dag_engine NO tiene operations.db.
# Usa dag_engine.db propia (tablas dag_runs + dag_step_results).
# No participa del bucle reactivo via fn_operations.
# Si en el futuro se añade operations.db: anadir check con ref: fn-recopilador.
# -----------------------------------------------------------------------
# - id: ops_audit
# ref: "fn-recopilador:apps/dag_engine"
# OMITIDO: sin operations.db
# -----------------------------------------------------------------------
# check: tests
# OMITIDO — no existen archivos *_test.go en apps/dag_engine/ ni en store/.
# Cuando se añadan tests: descomentar y ajustar.
# -----------------------------------------------------------------------
# - id: tests
# cmd: "cd /home/lucas/fn_registry/apps/dag_engine && go test -tags fts5 -count=1 ./..."
# timeout_s: 120
# OMITIDO: sin *_test.go