Files
fn_registry/dev/proposals_e2e_checks_0121/pipeline_launcher.yaml
T
egutierrez 1d3d2f43b3 feat(0121a): wave 2 e2e_checks proposals (8 apps) + README updated
8 fn-recopilador design-e2e paralelos:
- services_api      (Go service, schema custom operations.db)
- registry_mcp      (Go stdio MCP, JSON-RPC handshake test)
- sqlite_api        (Go service read-only HTTP, query_endpoint)
- registry_dashboard (C++ ImGui, NO Go+React como yo supuse)
- primitives_gallery (C++ build gate de toda API C++ del registry, 44 .cpp)
- pipeline_launcher (Go TUI bubbletea)
- docker_tui        (Go TUI + go-duckdb)
- fn_match          (subcmd ./fn, hook helper, fuzzy match)

13/26 apps cubiertas. README documenta:
- 6 bugs/drift descubiertos lateral (dag_engine x3, deploy_server,
  pipeline_launcher, docker_tui).
- 3 correcciones de mi prompt (yo asumi stacks incorrectos).
- Hallazgos arquitectonicos (primitives_gallery = build gate C++).

Pendiente wave 3 (13 apps) + 0121b + 0121c.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 00:43:09 +02:00

119 lines
6.6 KiB
YAML

# Propuesta e2e_checks para apps/pipeline_launcher
# Generada por fn-recopilador en modo design-e2e (2026-05-19)
# app_id: pipeline_launcher
# lang: go
# stack: TUI bubbletea + CGO + mattn/go-sqlite3
# issue: 0121a wave 2
#
# INSTRUCCIONES: copiar el bloque e2e_checks al frontmatter de
# apps/pipeline_launcher/app.md tras revision humana.
# NO modificar app.md automaticamente.
#
# Stack detectado:
# lang=go, framework=bubbletea v0.25.0
# CGO_ENABLED=1 (mattn/go-sqlite3 v1.14.37 en go.mod)
# build tags: fts5 necesarios (importa fn-registry que usa fts5)
# NO frontend/ (TUI pura, sin assets web)
# NO tests/ ni *_test.go (check tests OMITIDO)
# entry_point: main.go → binario: pipeline_launcher
# config.Default() resuelve rutas via FN_REGISTRY_ROOT env var
# Sin flags --headless, --list, --version ni --help propios en main.go
# (la app es TUI pura; la unica salida "rapida" es abrir + cerrar con Ctrl+C)
# operations.db presente: tablas init (sin logs — migracion 003 NO aplicada)
# entities=0, relations=0, executions=0, assertions=0
# registry.db: 30 pipelines con tag 'launcher' disponibles al momento de audit
#
# NOTAS IMPORTANTES:
# - La app no expone ningun modo headless ni flag CLI propio. Para un check
# "arranca bien y ve pipelines", la estrategia es: (a) go vet (compilacion
# y lint sin ejecutar TUI) + (b) query directa a registry.db via sqlite3
# para verificar que existen pipelines con tag launcher (lo que la TUI
# mostraria). No se ejecuta el binario en modo TUI porque requiere TTY.
# - El check ops_init aplica las migraciones faltantes (especialmente 003_logs)
# sobre operations.db de e2e en /tmp, garantizando schema completo.
# - ops_audit invoca fn-recopilador sobre la operations.db real para validar
# integridad. Util como gate de regresion de schema/datos.
# - No hay tag 'service' → no se necesita smoke/health check HTTP.
# - Port e2e: N/A (no es service).
e2e_checks:
# -----------------------------------------------------------------------
# check: build
# Por que: gate primario. Valida que el modulo Go compila con CGO+fts5.
# CGO es obligatorio por mattn/go-sqlite3. fts5 es necesario
# porque el modulo fn-registry (replace local) usa FTS5 en sus
# queries sobre registry.db. Sin este tag el build falla con
# "undefined: fts5".
# El binario se escribe en /tmp para no contaminar el worktree
# y hacer el check idempotente.
# -----------------------------------------------------------------------
- id: build
cmd: "cd /home/lucas/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go build -tags fts5 -o /tmp/pipeline_launcher_e2e_bin ."
timeout_s: 120
# -----------------------------------------------------------------------
# check: vet
# Por que: go vet con CGO+fts5 detecta errores semanticos que no bloquean
# la compilacion pero indican bugs (printf de tipo incorrecto,
# locks copiados, etc.). Complementa build — bajo coste, alta
# cobertura estatica.
# Se corre sobre el modulo completo (./...) para cubrir app/,
# config/ y views/ que el build check no ejercita separadamente.
# -----------------------------------------------------------------------
- id: vet
cmd: "cd /home/lucas/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go vet -tags fts5 ./..."
timeout_s: 60
# -----------------------------------------------------------------------
# check: pipelines_list_loads
# Por que: valida la query central de la TUI — que registry.db contiene
# >=1 pipeline con tag 'launcher'. Si este check falla, la pantalla
# principal de la app mostraria "No pipelines found" que es el caso
# de fallo silencioso mas dificil de detectar sin correr la TUI.
# Query: buscar en functions donde kind='pipeline' y tags incluye
# 'launcher'. Equivalent a loadPipelines() en views/pipelines.go.
# No requiere el binario compilado — usa sqlite3 CLI directamente
# sobre registry.db (ya autorizado para queries en operations.db
# y uso diagnostico segun excepciones de registry_calls.md).
# -----------------------------------------------------------------------
- id: pipelines_list_loads
cmd: >
COUNT=$(sqlite3 /home/lucas/fn_registry/registry.db
"SELECT COUNT(*) FROM functions WHERE kind='pipeline' AND tags LIKE '%launcher%';");
[ "$COUNT" -ge 1 ] && echo "launcher_pipelines=$COUNT OK" || { echo "FAIL: no launcher pipelines found in registry.db"; exit 1; }
timeout_s: 10
expect_stdout_contains: "OK"
# -----------------------------------------------------------------------
# check: ops_schema_complete
# Por que: la operations.db de pipeline_launcher no tiene la tabla logs
# (migracion 003_logs NO aplicada al momento de la auditoria).
# Este check aplica fn ops init sobre una copia en /tmp para
# verificar que las 3 migraciones (001_init, 002_executions_assertions,
# 003_logs) se aplican limpiamente sin errores.
# Idempotente: crea DB nueva en /tmp cada vez.
# -----------------------------------------------------------------------
- id: ops_schema_complete
cmd: >
rm -f /tmp/pipeline_launcher_e2e_ops.db &&
cp /home/lucas/fn_registry/apps/pipeline_launcher/operations.db /tmp/pipeline_launcher_e2e_ops.db &&
FN_REGISTRY_ROOT=/home/lucas/fn_registry /home/lucas/fn_registry/fn ops init /tmp/pipeline_launcher_e2e_ops.db &&
sqlite3 /tmp/pipeline_launcher_e2e_ops.db "SELECT name FROM sqlite_master WHERE type='table' AND name='logs';" | grep -q logs && echo "logs table OK" || { echo "FAIL: logs table missing after ops init"; exit 1; }
timeout_s: 30
expect_stdout_contains: "logs table OK"
severity: warning
# NOTA: severity warning porque la migracion faltante no bloquea el uso
# normal de la TUI (no escribe logs todavia). Promover a critical cuando
# la app comience a usar la tabla logs activamente.
# -----------------------------------------------------------------------
# check: ops_audit
# Por que: invoca fn-recopilador sobre la operations.db real para detectar
# referencias rotas, tablas faltantes o datos inconsistentes.
# Es el gate del bucle reactivo fase 3 — sin este check el agente
# no tiene visibilidad sobre regresiones de schema/datos entre
# versiones del app.
# -----------------------------------------------------------------------
- id: ops_audit
ref: "fn-recopilador:apps/pipeline_launcher"