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>
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
# e2e_checks proposal for apps/registry_mcp
|
||||
#
|
||||
# Generado por fn-recopilador en modo design-e2e.
|
||||
# NO modifica app.md directamente — propuesta para revision humana.
|
||||
# Copiar el bloque e2e_checks al frontmatter de apps/registry_mcp/app.md
|
||||
# tras aprobar.
|
||||
#
|
||||
# Diagnostico:
|
||||
# lang=go, framework=mcp (github.com/mark3labs/mcp-go)
|
||||
# tag service → runtime=stdio (no puerto HTTP, no health endpoint)
|
||||
# entry_point=main.go, build requiere CGO_ENABLED=1 -tags fts5 (sqlite + FTS5)
|
||||
# tests: naming_test.go (TestValidateName/TestValidateDomain)
|
||||
# fts_test.go (TestSanitizeFTS5/TestIsSnakeCase)
|
||||
# format_test.go (TestRenderFunctionMarkdown/TestLangFence/TestTruncate)
|
||||
# integration_test.go (TestIntegration_StdioListSearchShow/TestIntegration_SearchByTag)
|
||||
# -> los integration tests arrancan el servidor en-proceso con pipes, NO
|
||||
# requieren binario compilado, pero SI requieren registry.db accesible.
|
||||
# operations.db: NO presente — la app no usa operations.db propia.
|
||||
# frontend: NO.
|
||||
# migrations/: NO (lee registry.db en modo ro, no escribe schema).
|
||||
# gating flags: --enable-run y --enable-write — NO se testean aqui (requieren
|
||||
# credenciales/estado externo). Solo se validan los tools read-only.
|
||||
#
|
||||
# Checks propuestos:
|
||||
# build -> compilar con CGO+fts5. Gate critico: si no compila, nada mas importa.
|
||||
# tests_unit -> go test ./... (unit tests puros: naming, fts, format).
|
||||
# Los integration tests necesitan registry.db; se corre todo porque
|
||||
# integration_test.go hace findRegistryRoot(t) y hace t.Skip si
|
||||
# no lo encuentra. En el entorno de dev hay registry.db en la raiz,
|
||||
# por tanto los integration tests CORREN.
|
||||
# naming_reject -> smoke del validador de nombres: input invalido debe salir con
|
||||
# exit != 0 o stdout/stderr con "naming:" / "action verb".
|
||||
# Se implementa via go test -run TestValidateName directamente
|
||||
# (mas simple y determinista que un binario auxiliar).
|
||||
# mcp_handshake -> arranca el binario en modo stdio, envia initialize JSON-RPC
|
||||
# por stdin, espera respuesta JSON valida con "result" en stdout.
|
||||
# Usa FN_REGISTRY_ROOT explicito y timeout de 5s con bash+kill.
|
||||
# Es el smoke mas util: prueba que el binario abre la BD,
|
||||
# registra tools y responde al protocolo MCP correctamente.
|
||||
|
||||
app_id: registry_mcp
|
||||
dir_path: apps/registry_mcp
|
||||
generated_by: fn-recopilador
|
||||
generated_at: "2026-05-19"
|
||||
|
||||
e2e_checks:
|
||||
# -------------------------------------------------------------------
|
||||
# 1. BUILD — compilar con CGO + FTS5. Sin esto el resto no sirve.
|
||||
# CGO_ENABLED=1 es obligatorio para go-sqlite3 (FTS5 tag lo exige).
|
||||
# -------------------------------------------------------------------
|
||||
- id: build
|
||||
cmd: >
|
||||
cd /home/lucas/fn_registry/apps/registry_mcp &&
|
||||
CGO_ENABLED=1 go build -tags fts5 -o registry_mcp .
|
||||
timeout_s: 120
|
||||
severity: critical
|
||||
# por que: gate fundamental. Build roto = binario inexistente = nada funciona.
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# 2. TESTS — unit + integration. Los integration_tests arrancan el
|
||||
# servidor con pipes en-proceso; no necesitan binario pero si
|
||||
# registry.db en la raiz del repo (findRegistryRoot hace t.Skip si
|
||||
# no la encuentra). En dev siempre esta disponible.
|
||||
# -------------------------------------------------------------------
|
||||
- id: tests
|
||||
cmd: >
|
||||
cd /home/lucas/fn_registry/apps/registry_mcp &&
|
||||
CGO_ENABLED=1 go test -tags fts5 -count=1 -timeout 60s ./...
|
||||
timeout_s: 90
|
||||
severity: critical
|
||||
# por que: cubre naming validator, FTS5 sanitizer, markdown renderer
|
||||
# y el handshake stdio completo (tools/list + fn_search + fn_show)
|
||||
# via TestIntegration_StdioListSearchShow.
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# 3. NAMING_REJECT — el validator de nombres (naming.go) debe rechazar
|
||||
# input invalido. Valida que la regla ids_naming.md esta codificada
|
||||
# y activa. Se ejercita directamente via go test -run.
|
||||
# Expected: PASS (el test Table case "Slice" espera err != nil).
|
||||
# -------------------------------------------------------------------
|
||||
- id: naming_reject
|
||||
cmd: >
|
||||
cd /home/lucas/fn_registry/apps/registry_mcp &&
|
||||
CGO_ENABLED=1 go test -tags fts5 -count=1 -run TestValidateName -v 2>&1 |
|
||||
grep -q "PASS"
|
||||
timeout_s: 30
|
||||
severity: critical
|
||||
# por que: fn_create_function llama al validator antes de escribir archivos.
|
||||
# Si el validator acepta nombres invalidos (PascalCase, bare nouns),
|
||||
# el registry se corrompe con IDs no-canonicos. Este check lo detecta.
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# 4. MCP_HANDSHAKE_STDIO — smoke del protocolo JSON-RPC 2.0 real.
|
||||
# Arranca el binario compilado en modo stdio, envia 'initialize',
|
||||
# verifica que la respuesta tiene "result" (MCP ServerInfo valido).
|
||||
# Usa timeout con kill para que no quede colgado.
|
||||
# FN_REGISTRY_ROOT apunta a la raiz del repo donde esta registry.db.
|
||||
# -------------------------------------------------------------------
|
||||
- id: mcp_handshake_stdio
|
||||
cmd: |
|
||||
BINARY=/home/lucas/fn_registry/apps/registry_mcp/registry_mcp
|
||||
PAYLOAD='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"e2e_probe","version":"0"}}}'
|
||||
RESPONSE=$(echo "$PAYLOAD" | timeout 5 "$BINARY" \
|
||||
--registry-root /home/lucas/fn_registry \
|
||||
--log-level error \
|
||||
2>/dev/null | head -n1)
|
||||
echo "response: $RESPONSE"
|
||||
echo "$RESPONSE" | python3 -c "
|
||||
import sys, json
|
||||
r = json.load(sys.stdin)
|
||||
assert 'result' in r, f'missing result key: {r}'
|
||||
assert 'serverInfo' in r['result'] or 'protocolVersion' in r['result'], f'unexpected result: {r[\"result\"]}'
|
||||
print('OK: MCP initialize handshake passed')
|
||||
"
|
||||
timeout_s: 15
|
||||
severity: critical
|
||||
# por que: es el smoke mas real posible — el mismo protocolo que
|
||||
# Claude Code usa al arrancar la sesion. Detecta regressions
|
||||
# en: apertura de BD, registro de tools, serialization JSON-RPC.
|
||||
# HTTP no se testea aqui (requiere --enable-run/--enable-write config).
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# 5. OPS_AUDIT — auditoria de operations.db.
|
||||
# registry_mcp no tiene operations.db propia (servicio stdio puro,
|
||||
# no usa el ciclo reactivo). Este check queda como WARNING para
|
||||
# documentar la decision y detectar si en el futuro se crea una BD.
|
||||
# -------------------------------------------------------------------
|
||||
- id: ops_audit
|
||||
ref: "fn-recopilador:apps/registry_mcp"
|
||||
severity: warning
|
||||
# por que: registry_mcp no usa operations.db hoy (runtime stdio sin
|
||||
# entities/executions propias). Check WARNING para detectar
|
||||
# si se anade en el futuro sin actualizar estos checks.
|
||||
Reference in New Issue
Block a user