chore: auto-commit (129 archivos)
- .claude/agents/fn-analizador/SKILL.md - .claude/agents/fn-constructor/SKILL.md - .claude/agents/fn-executor/SKILL.md - .claude/agents/fn-mejorador/SKILL.md - .claude/agents/fn-orquestador/SKILL.md - .claude/agents/fn-recopilador/SKILL.md - .claude/commands/app.md - .claude/commands/compile.md - .claude/commands/cpp-app.md - .claude/commands/create_functions.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -42,10 +42,10 @@ Opcionalmente:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Por id
|
# Por id
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE id = '<app_id>';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE id = '<app_id>';"
|
||||||
|
|
||||||
# Por dir_path
|
# Por dir_path
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE dir_path = '<dir>';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE dir_path = '<dir>';"
|
||||||
```
|
```
|
||||||
|
|
||||||
Si no hay match → reportar y abortar.
|
Si no hay match → reportar y abortar.
|
||||||
@@ -78,8 +78,8 @@ APP_DB="$APP_DIR/operations.db"
|
|||||||
|
|
||||||
# Si no existe, inicializar (aplica migraciones, incluida 005_e2e_runs)
|
# Si no existe, inicializar (aplica migraciones, incluida 005_e2e_runs)
|
||||||
if [ ! -f "$APP_DB" ]; then
|
if [ ! -f "$APP_DB" ]; then
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init "$APP_DIR"
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init "$APP_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verificar tabla e2e_runs existe (migracion 005)
|
# Verificar tabla e2e_runs existe (migracion 005)
|
||||||
@@ -97,7 +97,7 @@ Hay dos caminos:
|
|||||||
**Camino A — invocar funcion del registry (preferido):**
|
**Camino A — invocar funcion del registry (preferido):**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
./fn run e2e_run_checks_go_infra ...
|
./fn run e2e_run_checks_go_infra ...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -139,15 +139,15 @@ func main() {
|
|||||||
|
|
||||||
Ejecutar con:
|
Ejecutar con:
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
CGO_ENABLED=1 go run -tags fts5 /tmp/run_e2e_<id>.go /tmp/checks.yaml "$APP_DIR"
|
CGO_ENABLED=1 go run -tags fts5 /tmp/run_e2e_<id>.go /tmp/checks.yaml "$APP_DIR"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 5. Eval assertions activas (si la app las tiene)
|
### 5. Eval assertions activas (si la app las tiene)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval --db "$APP_DB"
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval --db "$APP_DB"
|
||||||
```
|
```
|
||||||
|
|
||||||
Capturar fallos como warning checks adicionales.
|
Capturar fallos como warning checks adicionales.
|
||||||
|
|||||||
@@ -15,20 +15,20 @@ Eres el agente constructor del fn_registry. Tu rol es crear funciones, tests y t
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Buscar si ya existe algo similar (OBLIGATORIO antes de crear)
|
# Buscar si ya existe algo similar (OBLIGATORIO antes de crear)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
||||||
|
|
||||||
# Buscar tipos existentes
|
# Buscar tipos existentes
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
||||||
|
|
||||||
# Ver funciones de un dominio
|
# Ver funciones de un dominio
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE domain = 'DOMINIO' ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE domain = 'DOMINIO' ORDER BY name;"
|
||||||
|
|
||||||
# Ver tipos de un dominio
|
# Ver tipos de un dominio
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO';"
|
||||||
|
|
||||||
# Verificar que un ID referenciado existe
|
# Verificar que un ID referenciado existe
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = 'ID_AQUI';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = 'ID_AQUI';"
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM types WHERE id = 'ID_AQUI';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM types WHERE id = 'ID_AQUI';"
|
||||||
```
|
```
|
||||||
|
|
||||||
Si algo similar ya existe, informa al usuario y sugiere mejorarlo en vez de duplicarlo.
|
Si algo similar ya existe, informa al usuario y sugiere mejorarlo en vez de duplicarlo.
|
||||||
@@ -39,13 +39,13 @@ Antes de implementar logica desde cero, busca funciones del registry que puedas
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Buscar funciones reutilizables por lo que hacen (ampliar con OR y prefijos)
|
# Buscar funciones reutilizables por lo que hacen (ampliar con OR y prefijos)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:filter* OR description:map* OR description:transform*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:filter* OR description:map* OR description:transform*') ORDER BY name;"
|
||||||
|
|
||||||
# Ver que retorna y que tipos usa una funcion candidata
|
# Ver que retorna y que tipos usa una funcion candidata
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, returns, uses_types FROM functions WHERE id = 'ID_CANDIDATO';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, returns, uses_types FROM functions WHERE id = 'ID_CANDIDATO';"
|
||||||
|
|
||||||
# Buscar funciones puras del mismo dominio (las mas componibles)
|
# Buscar funciones puras del mismo dominio (las mas componibles)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature FROM functions WHERE domain = 'DOMINIO' AND purity = 'pure' ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature FROM functions WHERE domain = 'DOMINIO' AND purity = 'pure' ORDER BY name;"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Criterios de reutilizacion:**
|
**Criterios de reutilizacion:**
|
||||||
@@ -78,38 +78,38 @@ Esto acelera la construccion y fortalece el grafo de dependencias del registry.
|
|||||||
| `bash` | `bash/functions/{domain}/{name}.sh` | `bash/functions/pipelines/{name}.sh` | *(no aplica)* |
|
| `bash` | `bash/functions/{domain}/{name}.sh` | `bash/functions/pipelines/{name}.sh` | *(no aplica)* |
|
||||||
| `typescript` | `frontend/functions/{domain}/{name}.ts` | *(no aplica)* | `frontend/types/{domain}/{name}.ts` |
|
| `typescript` | `frontend/functions/{domain}/{name}.ts` | *(no aplica)* | `frontend/types/{domain}/{name}.ts` |
|
||||||
|
|
||||||
**Ruta absoluta donde crear el archivo** = `/home/lucas/fn_registry/` + `file_path` del .md.
|
**Ruta absoluta donde crear el archivo** = `$HOME/fn_registry/` + `file_path` del .md.
|
||||||
|
|
||||||
Ejemplo: si `lang: bash` y `domain: infra`, el archivo va en:
|
Ejemplo: si `lang: bash` y `domain: infra`, el archivo va en:
|
||||||
- `/home/lucas/fn_registry/bash/functions/infra/{name}.sh` + `.md`
|
- `$HOME/fn_registry/bash/functions/infra/{name}.sh` + `.md`
|
||||||
- **NUNCA** en `/home/lucas/fn_registry/functions/infra/{name}.sh`
|
- **NUNCA** en `$HOME/fn_registry/functions/infra/{name}.sh`
|
||||||
|
|
||||||
### Estructura detallada
|
### Estructura detallada
|
||||||
|
|
||||||
**Go** (carpeta raiz: `functions/` y `types/`)
|
**Go** (carpeta raiz: `functions/` y `types/`)
|
||||||
- Funciones: `/home/lucas/fn_registry/functions/{domain}/{name}.go` + `.md`
|
- Funciones: `$HOME/fn_registry/functions/{domain}/{name}.go` + `.md`
|
||||||
- Tests: `/home/lucas/fn_registry/functions/{domain}/{name}_test.go`
|
- Tests: `$HOME/fn_registry/functions/{domain}/{name}_test.go`
|
||||||
- Tipos: `/home/lucas/fn_registry/functions/{domain}/{name}.go` (codigo, mismo paquete Go) + `/home/lucas/fn_registry/types/{domain}/{name}.md` (metadata con file_path apuntando a functions/)
|
- Tipos: `$HOME/fn_registry/functions/{domain}/{name}.go` (codigo, mismo paquete Go) + `$HOME/fn_registry/types/{domain}/{name}.md` (metadata con file_path apuntando a functions/)
|
||||||
- Pipelines: `/home/lucas/fn_registry/functions/pipelines/{name}.go` + `.md`
|
- Pipelines: `$HOME/fn_registry/functions/pipelines/{name}.go` + `.md`
|
||||||
- Paquete Go = nombre del directorio (core, finance, datascience, cybersecurity, infra, shell, tui, io)
|
- Paquete Go = nombre del directorio (core, finance, datascience, cybersecurity, infra, shell, tui, io)
|
||||||
|
|
||||||
**Python** (carpeta raiz: `python/`)
|
**Python** (carpeta raiz: `python/`)
|
||||||
- Funciones: `/home/lucas/fn_registry/python/functions/{domain}/{name}.py` + `.md`
|
- Funciones: `$HOME/fn_registry/python/functions/{domain}/{name}.py` + `.md`
|
||||||
- Tests: `/home/lucas/fn_registry/python/functions/{domain}/{name}_test.py`
|
- Tests: `$HOME/fn_registry/python/functions/{domain}/{name}_test.py`
|
||||||
- Tipos: `/home/lucas/fn_registry/python/types/{domain}/{name}.py` + `.md`
|
- Tipos: `$HOME/fn_registry/python/types/{domain}/{name}.py` + `.md`
|
||||||
- Pipelines: `/home/lucas/fn_registry/python/functions/pipelines/{name}.py` + `.md`
|
- Pipelines: `$HOME/fn_registry/python/functions/pipelines/{name}.py` + `.md`
|
||||||
|
|
||||||
**Bash** (carpeta raiz: `bash/`)
|
**Bash** (carpeta raiz: `bash/`)
|
||||||
- Funciones: `/home/lucas/fn_registry/bash/functions/{domain}/{name}.sh` + `.md`
|
- Funciones: `$HOME/fn_registry/bash/functions/{domain}/{name}.sh` + `.md`
|
||||||
- Tests: `/home/lucas/fn_registry/bash/functions/{domain}/{name}_test.sh`
|
- Tests: `$HOME/fn_registry/bash/functions/{domain}/{name}_test.sh`
|
||||||
- Pipelines: `/home/lucas/fn_registry/bash/functions/pipelines/{name}.sh` + `.md`
|
- Pipelines: `$HOME/fn_registry/bash/functions/pipelines/{name}.sh` + `.md`
|
||||||
- Tipos: Bash no tiene tipos — usar solo `uses_types` para referenciar tipos de otros lenguajes
|
- Tipos: Bash no tiene tipos — usar solo `uses_types` para referenciar tipos de otros lenguajes
|
||||||
|
|
||||||
**TypeScript** (carpeta raiz: `frontend/`)
|
**TypeScript** (carpeta raiz: `frontend/`)
|
||||||
- Funciones puras: `/home/lucas/fn_registry/frontend/functions/core/{name}.ts` + `.md`
|
- Funciones puras: `$HOME/fn_registry/frontend/functions/core/{name}.ts` + `.md`
|
||||||
- Componentes React: `/home/lucas/fn_registry/frontend/functions/ui/{name}.tsx` + `.md`
|
- Componentes React: `$HOME/fn_registry/frontend/functions/ui/{name}.tsx` + `.md`
|
||||||
- Tests: junto al archivo, `{name}.test.ts` o `{name}.test.tsx`
|
- Tests: junto al archivo, `{name}.test.ts` o `{name}.test.tsx`
|
||||||
- Tipos: `/home/lucas/fn_registry/frontend/types/{domain}/{name}.ts` + `.md`
|
- Tipos: `$HOME/fn_registry/frontend/types/{domain}/{name}.ts` + `.md`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -591,7 +591,7 @@ Documentar completamente el .md igualmente.
|
|||||||
1. **BUSCAR** en registry.db con FTS5 si existe algo similar
|
1. **BUSCAR** en registry.db con FTS5 si existe algo similar
|
||||||
2. **VALIDAR** que los IDs referenciados (uses_functions, uses_types, returns, error_type) existen en la BD
|
2. **VALIDAR** que los IDs referenciados (uses_functions, uses_types, returns, error_type) existen en la BD
|
||||||
3. **CREAR** los archivos en la carpeta raiz correcta segun el lenguaje (ver tabla REGLA CRITICA): Go en `functions/`, Python en `python/functions/`, Bash en `bash/functions/`, TypeScript en `frontend/functions/`
|
3. **CREAR** los archivos en la carpeta raiz correcta segun el lenguaje (ver tabla REGLA CRITICA): Go en `functions/`, Python en `python/functions/`, Bash en `bash/functions/`, TypeScript en `frontend/functions/`
|
||||||
4. **INDEXAR** ejecutando: `cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index`
|
4. **INDEXAR** ejecutando: `cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index`
|
||||||
5. **VERIFICAR** con: `./fn show {id}` que se indexo correctamente
|
5. **VERIFICAR** con: `./fn show {id}` que se indexo correctamente
|
||||||
6. Si hay errores de validacion, corregirlos y re-indexar
|
6. Si hay errores de validacion, corregirlos y re-indexar
|
||||||
|
|
||||||
@@ -600,10 +600,10 @@ Documentar completamente el .md igualmente.
|
|||||||
1. **LEER** la funcion existente (codigo + .md) desde la BD: `sqlite3 registry.db "SELECT code, signature FROM functions WHERE id = '...'"`
|
1. **LEER** la funcion existente (codigo + .md) desde la BD: `sqlite3 registry.db "SELECT code, signature FROM functions WHERE id = '...'"`
|
||||||
2. **CREAR** el archivo de test
|
2. **CREAR** el archivo de test
|
||||||
3. **EJECUTAR** los tests:
|
3. **EJECUTAR** los tests:
|
||||||
- Go: `cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 -run TestNombre ./functions/{domain}/`
|
- Go: `cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 -run TestNombre ./functions/{domain}/`
|
||||||
- Python: `cd /home/lucas/fn_registry/python && python -m pytest functions/{domain}/{name}_test.py`
|
- Python: `cd $HOME/fn_registry/python && python -m pytest functions/{domain}/{name}_test.py`
|
||||||
- TypeScript: desde `frontend/`, ejecutar con el test runner configurado
|
- TypeScript: desde `frontend/`, ejecutar con el test runner configurado
|
||||||
- Bash: `cd /home/lucas/fn_registry && bash bash/functions/{domain}/{name}_test.sh`
|
- Bash: `cd $HOME/fn_registry && bash bash/functions/{domain}/{name}_test.sh`
|
||||||
4. **ACTUALIZAR** el .md con `tested: true`, `tests: [...]` y `test_file_path`
|
4. **ACTUALIZAR** el .md con `tested: true`, `tests: [...]` y `test_file_path`
|
||||||
5. **RE-INDEXAR** y verificar
|
5. **RE-INDEXAR** y verificar
|
||||||
|
|
||||||
@@ -620,19 +620,19 @@ Documentar completamente el .md igualmente.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Compilar CLI (necesario si se modifico codigo del CLI)
|
# Compilar CLI (necesario si se modifico codigo del CLI)
|
||||||
cd /home/lucas/fn_registry && CGO_ENABLED=1 go build -tags fts5 -o fn ./cmd/fn/
|
cd $HOME/fn_registry && CGO_ENABLED=1 go build -tags fts5 -o fn ./cmd/fn/
|
||||||
|
|
||||||
# Indexar registry
|
# Indexar registry
|
||||||
cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index
|
cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index
|
||||||
|
|
||||||
# Tests Go de un dominio
|
# Tests Go de un dominio
|
||||||
cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./functions/{domain}/
|
cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./functions/{domain}/
|
||||||
|
|
||||||
# Tests Go de todo el registry
|
# Tests Go de todo el registry
|
||||||
cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./...
|
cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./...
|
||||||
|
|
||||||
# Mostrar funcion indexada
|
# Mostrar funcion indexada
|
||||||
cd /home/lucas/fn_registry && ./fn show {id}
|
cd $HOME/fn_registry && ./fn show {id}
|
||||||
```
|
```
|
||||||
|
|
||||||
### fn run — Ejecutar funciones y pipelines directamente
|
### fn run — Ejecutar funciones y pipelines directamente
|
||||||
@@ -640,7 +640,7 @@ cd /home/lucas/fn_registry && ./fn show {id}
|
|||||||
Despues de crear/indexar, puedes ejecutar directamente con `fn run`:
|
Despues de crear/indexar, puedes ejecutar directamente con `fn run`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Go pipeline (go run . en su directorio)
|
# Go pipeline (go run . en su directorio)
|
||||||
./fn run init_metabase --project test
|
./fn run init_metabase --project test
|
||||||
@@ -729,7 +729,7 @@ Peticion: "Crea una funcion que calcule la media de un slice de float64"
|
|||||||
|
|
||||||
### Paso 1: Buscar en BD
|
### Paso 1: Buscar en BD
|
||||||
```bash
|
```bash
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:mean* OR name:average* OR description:media* OR description:average*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:mean* OR name:average* OR description:media* OR description:average*') ORDER BY name;"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Paso 2: Crear archivos
|
### Paso 2: Crear archivos
|
||||||
@@ -823,6 +823,6 @@ func TestMean(t *testing.T) {
|
|||||||
|
|
||||||
### Paso 3: Indexar y verificar
|
### Paso 3: Indexar y verificar
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index
|
cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index
|
||||||
./fn show mean_go_core
|
./fn show mean_go_core
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -35,22 +35,22 @@ Las apps estan indexadas en registry.db con toda la metadata necesaria para ejec
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Ver todas las apps disponibles
|
# Ver todas las apps disponibles
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, domain, description, entry_point, dir_path FROM apps ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, domain, description, entry_point, dir_path FROM apps ORDER BY name;"
|
||||||
|
|
||||||
# Ver app completa con dependencias y framework
|
# Ver app completa con dependencias y framework
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, entry_point, dir_path, uses_functions, uses_types, framework, tags FROM apps WHERE id = 'APP_ID';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, entry_point, dir_path, uses_functions, uses_types, framework, tags FROM apps WHERE id = 'APP_ID';"
|
||||||
|
|
||||||
# Buscar apps por FTS (nombre, descripcion, tags, documentacion)
|
# Buscar apps por FTS (nombre, descripcion, tags, documentacion)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, description FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, description FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
||||||
|
|
||||||
# Apps de un dominio
|
# Apps de un dominio
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, description, entry_point FROM apps WHERE domain = 'DOMINIO';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, description, entry_point FROM apps WHERE domain = 'DOMINIO';"
|
||||||
|
|
||||||
# Apps que usan una funcion especifica
|
# Apps que usan una funcion especifica
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name FROM apps WHERE uses_functions LIKE '%funcion_id%';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name FROM apps WHERE uses_functions LIKE '%funcion_id%';"
|
||||||
|
|
||||||
# Ver documentacion completa de una app
|
# Ver documentacion completa de una app
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT documentation, notes FROM apps WHERE id = 'APP_ID';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT documentation, notes FROM apps WHERE id = 'APP_ID';"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Campos clave de apps para ejecucion:**
|
**Campos clave de apps para ejecucion:**
|
||||||
@@ -65,19 +65,19 @@ sqlite3 /home/lucas/fn_registry/registry.db "SELECT documentation, notes FROM ap
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Ver pipeline/funcion completa
|
# Ver pipeline/funcion completa
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, signature, description, uses_functions, uses_types FROM functions WHERE id = 'ID_AQUI';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, signature, description, uses_functions, uses_types FROM functions WHERE id = 'ID_AQUI';"
|
||||||
|
|
||||||
# Ver codigo de la funcion
|
# Ver codigo de la funcion
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT code FROM functions WHERE id = 'ID_AQUI';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT code FROM functions WHERE id = 'ID_AQUI';"
|
||||||
|
|
||||||
# Pipelines disponibles (con tag launcher para TUI)
|
# Pipelines disponibles (con tag launcher para TUI)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE kind = 'pipeline' ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE kind = 'pipeline' ORDER BY name;"
|
||||||
|
|
||||||
# Funciones impuras ejecutables directamente
|
# Funciones impuras ejecutables directamente
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE purity = 'impure' AND kind = 'function' ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE purity = 'impure' AND kind = 'function' ORDER BY name;"
|
||||||
|
|
||||||
# Buscar por FTS
|
# Buscar por FTS
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usar contexto de apps para ejecucion inteligente
|
### Usar contexto de apps para ejecucion inteligente
|
||||||
@@ -98,10 +98,10 @@ Cuando te pidan ejecutar una app, sigue este flujo:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Desde la raiz del registry
|
# Desde la raiz del registry
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Opcion A: Usar el CLI
|
# Opcion A: Usar el CLI
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
|
||||||
|
|
||||||
# Opcion B: Copiar template directamente
|
# Opcion B: Copiar template directamente
|
||||||
cp fn_operations/project_template/operations.db apps/{app_name}/operations.db
|
cp fn_operations/project_template/operations.db apps/{app_name}/operations.db
|
||||||
@@ -221,10 +221,10 @@ Las entities representan los datos concretos del proyecto. Las relations documen
|
|||||||
### Crear entities (datos que el pipeline consume o produce)
|
### Crear entities (datos que el pipeline consume o produce)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Entity de entrada
|
# Entity de entrada
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity add \
|
||||||
--db apps/{app_name}/operations.db \
|
--db apps/{app_name}/operations.db \
|
||||||
--name "btc_ticks" \
|
--name "btc_ticks" \
|
||||||
--type-ref "tick_go_finance" \
|
--type-ref "tick_go_finance" \
|
||||||
@@ -235,7 +235,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \
|
|||||||
--metadata '{"pair":"BTCUSDT","exchange":"binance"}'
|
--metadata '{"pair":"BTCUSDT","exchange":"binance"}'
|
||||||
|
|
||||||
# Entity de salida
|
# Entity de salida
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity add \
|
||||||
--db apps/{app_name}/operations.db \
|
--db apps/{app_name}/operations.db \
|
||||||
--name "btc_ohlcv_5m" \
|
--name "btc_ohlcv_5m" \
|
||||||
--type-ref "ohlcv_go_finance" \
|
--type-ref "ohlcv_go_finance" \
|
||||||
@@ -249,7 +249,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \
|
|||||||
### Crear relations (como se conectan entities)
|
### Crear relations (como se conectan entities)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation add \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops relation add \
|
||||||
--db apps/{app_name}/operations.db \
|
--db apps/{app_name}/operations.db \
|
||||||
--name "ticks_to_ohlcv" \
|
--name "ticks_to_ohlcv" \
|
||||||
--from-entity "{entity_id}" \
|
--from-entity "{entity_id}" \
|
||||||
@@ -262,13 +262,13 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation add \
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Listar entities
|
# Listar entities
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity list --db apps/{app_name}/operations.db
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity list --db apps/{app_name}/operations.db
|
||||||
|
|
||||||
# Listar relations
|
# Listar relations
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation list --db apps/{app_name}/operations.db
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops relation list --db apps/{app_name}/operations.db
|
||||||
|
|
||||||
# Ver grafo ASCII
|
# Ver grafo ASCII
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/operations.db
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops graph --db apps/{app_name}/operations.db
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -280,7 +280,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/ope
|
|||||||
`fn run` despacha automaticamente segun el lenguaje y tipo:
|
`fn run` despacha automaticamente segun el lenguaje y tipo:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Go pipeline (go run . en su directorio)
|
# Go pipeline (go run . en su directorio)
|
||||||
./fn run init_metabase --project test
|
./fn run init_metabase --project test
|
||||||
@@ -318,13 +318,13 @@ Para apps con su propio main.go/main.py/main.sh:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Go app
|
# Go app
|
||||||
cd /home/lucas/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . [flags]
|
cd $HOME/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . [flags]
|
||||||
|
|
||||||
# Python app
|
# Python app
|
||||||
cd /home/lucas/fn_registry/apps/{app_name} && python3 main.py [args]
|
cd $HOME/fn_registry/apps/{app_name} && python3 main.py [args]
|
||||||
|
|
||||||
# Bash app
|
# Bash app
|
||||||
cd /home/lucas/fn_registry/apps/{app_name} && bash main.sh [args]
|
cd $HOME/fn_registry/apps/{app_name} && bash main.sh [args]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Capturar metricas de ejecucion
|
### Capturar metricas de ejecucion
|
||||||
@@ -340,7 +340,7 @@ Al ejecutar, siempre captura:
|
|||||||
```bash
|
```bash
|
||||||
# Ejemplo: ejecutar con captura de tiempo
|
# Ejemplo: ejecutar con captura de tiempo
|
||||||
START=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
START=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||||
OUTPUT=$(cd /home/lucas/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . 2>&1)
|
OUTPUT=$(cd $HOME/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . 2>&1)
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ echo "Status: $STATUS | Start: $START | End: $END"
|
|||||||
### Via CLI
|
### Via CLI
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \
|
||||||
--db apps/{app_name}/operations.db \
|
--db apps/{app_name}/operations.db \
|
||||||
--pipeline-id "tick_to_ohlcv_go_finance" \
|
--pipeline-id "tick_to_ohlcv_go_finance" \
|
||||||
--relation-id "{relation_id}" \
|
--relation-id "{relation_id}" \
|
||||||
@@ -396,16 +396,16 @@ sqlite3 apps/{app_name}/operations.db "INSERT INTO executions (id, pipeline_id,
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Listar todas
|
# Listar todas
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db
|
||||||
|
|
||||||
# Por pipeline
|
# Por pipeline
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --pipeline-id "ID"
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --pipeline-id "ID"
|
||||||
|
|
||||||
# Por status
|
# Por status
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --status failure
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --status failure
|
||||||
|
|
||||||
# Detalle de una ejecucion
|
# Detalle de una ejecucion
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution show --db apps/{app_name}/operations.db --id "EXEC_ID"
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution show --db apps/{app_name}/operations.db --id "EXEC_ID"
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -441,12 +441,12 @@ Si hay assertions definidas sobre las entities afectadas, evaluarlas para verifi
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Evaluar assertions de una entity
|
# Evaluar assertions de una entity
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval \
|
||||||
--db apps/{app_name}/operations.db \
|
--db apps/{app_name}/operations.db \
|
||||||
--entity-id "ENTITY_ID"
|
--entity-id "ENTITY_ID"
|
||||||
|
|
||||||
# Evaluar Y reaccionar (actualiza status de entities, crea proposals si hay fallos criticos)
|
# Evaluar Y reaccionar (actualiza status de entities, crea proposals si hay fallos criticos)
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval \
|
||||||
--db apps/{app_name}/operations.db \
|
--db apps/{app_name}/operations.db \
|
||||||
--entity-id "ENTITY_ID" \
|
--entity-id "ENTITY_ID" \
|
||||||
--react
|
--react
|
||||||
@@ -467,10 +467,10 @@ Cuando el usuario pide ejecutar algo que aun no tiene app:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Crear directorio
|
# 1. Crear directorio
|
||||||
mkdir -p /home/lucas/fn_registry/apps/{app_name}
|
mkdir -p $HOME/fn_registry/apps/{app_name}
|
||||||
|
|
||||||
# 2. Crear app.md (OBLIGATORIO)
|
# 2. Crear app.md (OBLIGATORIO)
|
||||||
cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF'
|
cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF'
|
||||||
---
|
---
|
||||||
name: {app_name}
|
name: {app_name}
|
||||||
lang: go
|
lang: go
|
||||||
@@ -490,7 +490,7 @@ dir_path: "apps/{app_name}"
|
|||||||
MDEOF
|
MDEOF
|
||||||
|
|
||||||
# 3. Crear .gitignore
|
# 3. Crear .gitignore
|
||||||
cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
|
cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
|
||||||
operations.db
|
operations.db
|
||||||
operations.db-wal
|
operations.db-wal
|
||||||
operations.db-shm
|
operations.db-shm
|
||||||
@@ -499,7 +499,7 @@ build/
|
|||||||
GIEOF
|
GIEOF
|
||||||
|
|
||||||
# 4. Inicializar modulo Go
|
# 4. Inicializar modulo Go
|
||||||
cd /home/lucas/fn_registry/apps/{app_name}
|
cd $HOME/fn_registry/apps/{app_name}
|
||||||
go mod init fn_registry/apps/{app_name}
|
go mod init fn_registry/apps/{app_name}
|
||||||
|
|
||||||
# 5. Crear main.go minimo
|
# 5. Crear main.go minimo
|
||||||
@@ -523,8 +523,8 @@ func main() {
|
|||||||
GOEOF
|
GOEOF
|
||||||
|
|
||||||
# 6. Inicializar operations.db
|
# 6. Inicializar operations.db
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
|
||||||
|
|
||||||
# 7. Indexar en registry.db
|
# 7. Indexar en registry.db
|
||||||
./fn index
|
./fn index
|
||||||
@@ -534,10 +534,10 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Crear directorio
|
# 1. Crear directorio
|
||||||
mkdir -p /home/lucas/fn_registry/apps/{app_name}
|
mkdir -p $HOME/fn_registry/apps/{app_name}
|
||||||
|
|
||||||
# 2. Crear app.md (OBLIGATORIO)
|
# 2. Crear app.md (OBLIGATORIO)
|
||||||
cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF'
|
cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF'
|
||||||
---
|
---
|
||||||
name: {app_name}
|
name: {app_name}
|
||||||
lang: py
|
lang: py
|
||||||
@@ -557,7 +557,7 @@ dir_path: "apps/{app_name}"
|
|||||||
MDEOF
|
MDEOF
|
||||||
|
|
||||||
# 3. Crear .gitignore
|
# 3. Crear .gitignore
|
||||||
cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
|
cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
|
||||||
operations.db
|
operations.db
|
||||||
operations.db-wal
|
operations.db-wal
|
||||||
operations.db-shm
|
operations.db-shm
|
||||||
@@ -565,7 +565,7 @@ __pycache__/
|
|||||||
GIEOF
|
GIEOF
|
||||||
|
|
||||||
# 4. Crear main.py
|
# 4. Crear main.py
|
||||||
cat > /home/lucas/fn_registry/apps/{app_name}/main.py << 'PYEOF'
|
cat > $HOME/fn_registry/apps/{app_name}/main.py << 'PYEOF'
|
||||||
"""Pipeline executor."""
|
"""Pipeline executor."""
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
@@ -584,8 +584,8 @@ if __name__ == "__main__":
|
|||||||
PYEOF
|
PYEOF
|
||||||
|
|
||||||
# 5. Inicializar operations.db
|
# 5. Inicializar operations.db
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
|
||||||
|
|
||||||
# 6. Indexar en registry.db
|
# 6. Indexar en registry.db
|
||||||
./fn index
|
./fn index
|
||||||
@@ -595,10 +595,10 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Crear directorio
|
# 1. Crear directorio
|
||||||
mkdir -p /home/lucas/fn_registry/apps/{app_name}
|
mkdir -p $HOME/fn_registry/apps/{app_name}
|
||||||
|
|
||||||
# 2. Crear app.md (OBLIGATORIO)
|
# 2. Crear app.md (OBLIGATORIO)
|
||||||
cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF'
|
cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF'
|
||||||
---
|
---
|
||||||
name: {app_name}
|
name: {app_name}
|
||||||
lang: bash
|
lang: bash
|
||||||
@@ -618,14 +618,14 @@ dir_path: "apps/{app_name}"
|
|||||||
MDEOF
|
MDEOF
|
||||||
|
|
||||||
# 3. Crear .gitignore
|
# 3. Crear .gitignore
|
||||||
cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
|
cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
|
||||||
operations.db
|
operations.db
|
||||||
operations.db-wal
|
operations.db-wal
|
||||||
operations.db-shm
|
operations.db-shm
|
||||||
GIEOF
|
GIEOF
|
||||||
|
|
||||||
# 4. Crear main.sh
|
# 4. Crear main.sh
|
||||||
cat > /home/lucas/fn_registry/apps/{app_name}/main.sh << 'SHEOF'
|
cat > $HOME/fn_registry/apps/{app_name}/main.sh << 'SHEOF'
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Pipeline executor: {app_name}
|
# Pipeline executor: {app_name}
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -650,11 +650,11 @@ main() {
|
|||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
SHEOF
|
SHEOF
|
||||||
chmod +x /home/lucas/fn_registry/apps/{app_name}/main.sh
|
chmod +x $HOME/fn_registry/apps/{app_name}/main.sh
|
||||||
|
|
||||||
# 5. Inicializar operations.db
|
# 5. Inicializar operations.db
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
|
||||||
|
|
||||||
# 6. Indexar en registry.db
|
# 6. Indexar en registry.db
|
||||||
./fn index
|
./fn index
|
||||||
@@ -669,7 +669,7 @@ Este patron captura todo lo necesario para registrar la ejecucion:
|
|||||||
### Go
|
### Go
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
APP_DIR="/home/lucas/fn_registry/apps/{app_name}"
|
APP_DIR="$HOME/fn_registry/apps/{app_name}"
|
||||||
OPS_DB="$APP_DIR/operations.db"
|
OPS_DB="$APP_DIR/operations.db"
|
||||||
PIPELINE_ID="{pipeline_id}"
|
PIPELINE_ID="{pipeline_id}"
|
||||||
RELATION_ID="{relation_id}" # vacio si no aplica
|
RELATION_ID="{relation_id}" # vacio si no aplica
|
||||||
@@ -689,8 +689,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Registrar ejecucion
|
# Registrar ejecucion
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \
|
||||||
--db "$OPS_DB" \
|
--db "$OPS_DB" \
|
||||||
--pipeline-id "$PIPELINE_ID" \
|
--pipeline-id "$PIPELINE_ID" \
|
||||||
--status "$STATUS" \
|
--status "$STATUS" \
|
||||||
@@ -704,7 +704,7 @@ rm -f "$STDOUT_FILE" "$STDERR_FILE"
|
|||||||
### Python
|
### Python
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
APP_DIR="/home/lucas/fn_registry/apps/{app_name}"
|
APP_DIR="$HOME/fn_registry/apps/{app_name}"
|
||||||
OPS_DB="$APP_DIR/operations.db"
|
OPS_DB="$APP_DIR/operations.db"
|
||||||
|
|
||||||
START=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
START=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||||
@@ -716,8 +716,8 @@ END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|||||||
STATUS="success"
|
STATUS="success"
|
||||||
[ $EXIT_CODE -ne 0 ] && STATUS="failure"
|
[ $EXIT_CODE -ne 0 ] && STATUS="failure"
|
||||||
|
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \
|
||||||
--db "$OPS_DB" \
|
--db "$OPS_DB" \
|
||||||
--pipeline-id "{pipeline_id}" \
|
--pipeline-id "{pipeline_id}" \
|
||||||
--status "$STATUS" \
|
--status "$STATUS" \
|
||||||
@@ -728,7 +728,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
|
|||||||
### Bash
|
### Bash
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
APP_DIR="/home/lucas/fn_registry/apps/{app_name}"
|
APP_DIR="$HOME/fn_registry/apps/{app_name}"
|
||||||
OPS_DB="$APP_DIR/operations.db"
|
OPS_DB="$APP_DIR/operations.db"
|
||||||
PIPELINE_ID="{pipeline_id}"
|
PIPELINE_ID="{pipeline_id}"
|
||||||
|
|
||||||
@@ -741,8 +741,8 @@ END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|||||||
STATUS="success"
|
STATUS="success"
|
||||||
[ $EXIT_CODE -ne 0 ] && STATUS="failure"
|
[ $EXIT_CODE -ne 0 ] && STATUS="failure"
|
||||||
|
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \
|
||||||
--db "$OPS_DB" \
|
--db "$OPS_DB" \
|
||||||
--pipeline-id "$PIPELINE_ID" \
|
--pipeline-id "$PIPELINE_ID" \
|
||||||
--status "$STATUS" \
|
--status "$STATUS" \
|
||||||
@@ -758,10 +758,10 @@ Antes de ejecutar, verifica que los snapshots de tipos en operations.db estan al
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Verificar snapshots
|
# Verificar snapshots
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db
|
||||||
|
|
||||||
# Actualizar si estan desactualizados
|
# Actualizar si estan desactualizados
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID"
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID"
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -800,7 +800,7 @@ Crea una proposal cuando detectes:
|
|||||||
### Como crear proposals
|
### Como crear proposals
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Proposal para nueva funcion
|
# Proposal para nueva funcion
|
||||||
./fn proposal add \
|
./fn proposal add \
|
||||||
@@ -840,7 +840,7 @@ Cuando la proposal viene de un fallo o anomalia en una ejecucion, incluye la evi
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Obtener el ID de la ejecucion que evidencia el problema
|
# Obtener el ID de la ejecucion que evidencia el problema
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list \
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list \
|
||||||
--db apps/{app_name}/operations.db --status failure
|
--db apps/{app_name}/operations.db --status failure
|
||||||
|
|
||||||
# Incluir evidencia en la descripcion
|
# Incluir evidencia en la descripcion
|
||||||
@@ -858,19 +858,19 @@ Usa el contexto de la tabla apps para comparar y detectar patrones:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Ver que funciones usan las apps — detectar patrones comunes
|
# Ver que funciones usan las apps — detectar patrones comunes
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, uses_functions FROM apps WHERE uses_functions != '[]';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, uses_functions FROM apps WHERE uses_functions != '[]';"
|
||||||
|
|
||||||
# Ver funciones mas usadas por apps (candidatas a mejora)
|
# Ver funciones mas usadas por apps (candidatas a mejora)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "
|
sqlite3 $HOME/fn_registry/registry.db "
|
||||||
SELECT f.value as func_id, COUNT(*) as uso
|
SELECT f.value as func_id, COUNT(*) as uso
|
||||||
FROM apps, json_each(apps.uses_functions) f
|
FROM apps, json_each(apps.uses_functions) f
|
||||||
GROUP BY f.value ORDER BY uso DESC;"
|
GROUP BY f.value ORDER BY uso DESC;"
|
||||||
|
|
||||||
# Ver apps que NO tienen funciones del registry (candidatas a extraccion)
|
# Ver apps que NO tienen funciones del registry (candidatas a extraccion)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, description FROM apps WHERE uses_functions = '[]';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, description FROM apps WHERE uses_functions = '[]';"
|
||||||
|
|
||||||
# Ver si ya existe una proposal para algo similar
|
# Ver si ya existe una proposal para algo similar
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, status, title FROM proposals WHERE status = 'pending' ORDER BY created_at DESC;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, status, title FROM proposals WHERE status = 'pending' ORDER BY created_at DESC;"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Flujo de deteccion al ejecutar
|
### Flujo de deteccion al ejecutar
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ APP_ID="<input>"
|
|||||||
RUN_ID="<input>"
|
RUN_ID="<input>"
|
||||||
|
|
||||||
# dir_path desde registry
|
# dir_path desde registry
|
||||||
DIR_PATH=$(sqlite3 /home/lucas/fn_registry/registry.db \
|
DIR_PATH=$(sqlite3 $HOME/fn_registry/registry.db \
|
||||||
"SELECT dir_path FROM apps WHERE id = '$APP_ID' OR dir_path = '$APP_ID' LIMIT 1;")
|
"SELECT dir_path FROM apps WHERE id = '$APP_ID' OR dir_path = '$APP_ID' LIMIT 1;")
|
||||||
APP_ID=$(sqlite3 /home/lucas/fn_registry/registry.db \
|
APP_ID=$(sqlite3 $HOME/fn_registry/registry.db \
|
||||||
"SELECT id FROM apps WHERE id = '$APP_ID' OR dir_path = '$APP_ID' LIMIT 1;")
|
"SELECT id FROM apps WHERE id = '$APP_ID' OR dir_path = '$APP_ID' LIMIT 1;")
|
||||||
|
|
||||||
APP_DB="/home/lucas/fn_registry/$DIR_PATH/operations.db"
|
APP_DB="$HOME/fn_registry/$DIR_PATH/operations.db"
|
||||||
[ ! -f "$APP_DB" ] && APP_DB="/tmp/$(basename $DIR_PATH)_e2e_runs.db"
|
[ ! -f "$APP_DB" ] && APP_DB="/tmp/$(basename $DIR_PATH)_e2e_runs.db"
|
||||||
|
|
||||||
# Sanity check
|
# Sanity check
|
||||||
@@ -93,7 +93,7 @@ Por cada fallo:
|
|||||||
Antes de crear proposal, verificar que no haya una identica abierta:
|
Antes de crear proposal, verificar que no haya una identica abierta:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "
|
sqlite3 $HOME/fn_registry/registry.db "
|
||||||
SELECT id FROM proposals
|
SELECT id FROM proposals
|
||||||
WHERE status = 'pending'
|
WHERE status = 'pending'
|
||||||
AND target_id = '$APP_ID'
|
AND target_id = '$APP_ID'
|
||||||
@@ -139,7 +139,7 @@ Sugerencia generica en `description` (NO codigo concreto, solo direccion):
|
|||||||
Si la misma assertion/check ha disparado proposal mas de 3 veces en los ultimos 30 dias, marcar `priority` (campo extendido si existe, si no, anotar en `description: '[REINCIDENTE x4]'`).
|
Si la misma assertion/check ha disparado proposal mas de 3 veces en los ultimos 30 dias, marcar `priority` (campo extendido si existe, si no, anotar en `description: '[REINCIDENTE x4]'`).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "
|
sqlite3 $HOME/fn_registry/registry.db "
|
||||||
SELECT COUNT(*) FROM proposals
|
SELECT COUNT(*) FROM proposals
|
||||||
WHERE target_id = '$APP_ID'
|
WHERE target_id = '$APP_ID'
|
||||||
AND title LIKE '%::$CHECK_ID%'
|
AND title LIKE '%::$CHECK_ID%'
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ Referencia completa: `dev/issues/0069-autonomous-agent-loop-self-iterating-tasks
|
|||||||
6. **Auditoria total**. Cada decision se loggea en `task_runs.progress_json` con razonamiento + fase + run_id.
|
6. **Auditoria total**. Cada decision se loggea en `task_runs.progress_json` con razonamiento + fase + run_id.
|
||||||
7. **No self-modify**. NO modificas tu propio SKILL.md ni el de otros subagentes en la misma run.
|
7. **No self-modify**. NO modificas tu propio SKILL.md ni el de otros subagentes en la misma run.
|
||||||
8. **Cero produccion**. NO deploys, NO llamadas a APIs externas con auth, NO tocar BDs productivas.
|
8. **Cero produccion**. NO deploys, NO llamadas a APIs externas con auth, NO tocar BDs productivas.
|
||||||
9. **NUNCA paths absolutos fuera del worktree**. SIEMPRE rutas relativas o absolutas que apunten dentro de `/tmp/fn_orq_<issue>_<ts>/`. Si necesitas leer algo del repo principal (ej. plantillas docs), copialo al worktree primero. Refuerzo del piloto 1 (2026-05-15): orquestador modifico hooks bash del repo principal usando paths absolutos `/home/lucas/fn_registry/bash/functions/...` para destrancar pre-commit. Solucion correcta: el fix vive en el worktree, NO en main.
|
9. **NUNCA paths absolutos fuera del worktree**. SIEMPRE rutas relativas o absolutas que apunten dentro de `/tmp/fn_orq_<issue>_<ts>/`. Si necesitas leer algo del repo principal (ej. plantillas docs), copialo al worktree primero. Refuerzo del piloto 1 (2026-05-15): orquestador modifico hooks bash del repo principal usando paths absolutos `$HOME/fn_registry/bash/functions/...` para destrancar pre-commit. Solucion correcta: el fix vive en el worktree, NO en main.
|
||||||
10. **Pre-commit hook compartido**. Worktrees comparten `.git/hooks/` con main repo. Si el hook llama scripts via path absoluto a main (ej. `/home/lucas/fn_registry/bash/functions/cybersecurity/scan_secrets_in_dirty.sh`), el hook ejecutara la version de MAIN, no la del worktree. Opciones legitimas:
|
10. **Pre-commit hook compartido**. Worktrees comparten `.git/hooks/` con main repo. Si el hook llama scripts via path absoluto a main (ej. `$HOME/fn_registry/bash/functions/cybersecurity/scan_secrets_in_dirty.sh`), el hook ejecutara la version de MAIN, no la del worktree. Opciones legitimas:
|
||||||
a. Aplicar el fix del hook EN EL WORKTREE y commitearlo en `auto/*` — al mergear el PR, main heredara el fix.
|
a. Aplicar el fix del hook EN EL WORKTREE y commitearlo en `auto/*` — al mergear el PR, main heredara el fix.
|
||||||
b. Si el hook bloquea progreso y el fix del hook excede tu scope, `git commit --no-verify` para ESE commit SOLO, documentando excepcion en `task_runs.events_json[].decision="skip_hook"` con razon.
|
b. Si el hook bloquea progreso y el fix del hook excede tu scope, `git commit --no-verify` para ESE commit SOLO, documentando excepcion en `task_runs.events_json[].decision="skip_hook"` con razon.
|
||||||
NO modificar archivos en main directamente.
|
NO modificar archivos en main directamente.
|
||||||
11. **Post-iteracion sanity check**. Tras cada commit en `auto/*`, verificar:
|
11. **Post-iteracion sanity check**. Tras cada commit en `auto/*`, verificar:
|
||||||
```bash
|
```bash
|
||||||
git -C /home/lucas/fn_registry status --short
|
git -C $HOME/fn_registry status --short
|
||||||
```
|
```
|
||||||
Si la salida cambia respecto al baseline (capturado al inicio del piloto), HAS contaminado el repo principal. ABORT con `status=sandbox_breach` y reporta los archivos afectados en el output al humano.
|
Si la salida cambia respecto al baseline (capturado al inicio del piloto), HAS contaminado el repo principal. ABORT con `status=sandbox_breach` y reporta los archivos afectados en el output al humano.
|
||||||
|
|
||||||
@@ -49,24 +49,24 @@ Antes de arrancar el bucle, comprobar:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Migration 006_task_runs.sql existe
|
# 1. Migration 006_task_runs.sql existe
|
||||||
ls /home/lucas/fn_registry/fn_operations/migrations/006_task_runs.sql 2>/dev/null \
|
ls $HOME/fn_registry/fn_operations/migrations/006_task_runs.sql 2>/dev/null \
|
||||||
|| { echo "ABORT: migration 006_task_runs.sql ausente. Aplicar issue 0069 paso 1 antes."; exit 2; }
|
|| { echo "ABORT: migration 006_task_runs.sql ausente. Aplicar issue 0069 paso 1 antes."; exit 2; }
|
||||||
|
|
||||||
# 2. Subagentes fn-* presentes
|
# 2. Subagentes fn-* presentes
|
||||||
for a in fn-constructor fn-executor fn-recopilador fn-analizador fn-mejorador; do
|
for a in fn-constructor fn-executor fn-recopilador fn-analizador fn-mejorador; do
|
||||||
test -f /home/lucas/fn_registry/.claude/agents/$a/SKILL.md \
|
test -f $HOME/fn_registry/.claude/agents/$a/SKILL.md \
|
||||||
|| { echo "ABORT: subagente $a ausente"; exit 2; }
|
|| { echo "ABORT: subagente $a ausente"; exit 2; }
|
||||||
done
|
done
|
||||||
|
|
||||||
# 3. master local up-to-date con origin (worktree se creara desde master)
|
# 3. master local up-to-date con origin (worktree se creara desde master)
|
||||||
git -C /home/lucas/fn_registry fetch origin master --quiet
|
git -C $HOME/fn_registry fetch origin master --quiet
|
||||||
LOCAL=$(git -C /home/lucas/fn_registry rev-parse master)
|
LOCAL=$(git -C $HOME/fn_registry rev-parse master)
|
||||||
REMOTE=$(git -C /home/lucas/fn_registry rev-parse origin/master)
|
REMOTE=$(git -C $HOME/fn_registry rev-parse origin/master)
|
||||||
test "$LOCAL" = "$REMOTE" \
|
test "$LOCAL" = "$REMOTE" \
|
||||||
|| { echo "ABORT: master local desincronizado con origin. git pull antes."; exit 2; }
|
|| { echo "ABORT: master local desincronizado con origin. git pull antes."; exit 2; }
|
||||||
|
|
||||||
# 4. Branch auto/<issue> NO existe ya (ni local ni en worktrees)
|
# 4. Branch auto/<issue> NO existe ya (ni local ni en worktrees)
|
||||||
git -C /home/lucas/fn_registry rev-parse --verify "auto/${ISSUE_ID}" >/dev/null 2>&1 \
|
git -C $HOME/fn_registry rev-parse --verify "auto/${ISSUE_ID}" >/dev/null 2>&1 \
|
||||||
&& { echo "ABORT: branch auto/${ISSUE_ID} ya existe. Limpiar antes (git branch -D + worktree remove)."; exit 2; }
|
&& { echo "ABORT: branch auto/${ISSUE_ID} ya existe. Limpiar antes (git branch -D + worktree remove)."; exit 2; }
|
||||||
|
|
||||||
# 5. gh CLI autenticado (necesario para PR draft al converger)
|
# 5. gh CLI autenticado (necesario para PR draft al converger)
|
||||||
@@ -116,7 +116,7 @@ BRANCH="auto/${ISSUE_ID}"
|
|||||||
TASK_RUN_ID="task_$(openssl rand -hex 8)"
|
TASK_RUN_ID="task_$(openssl rand -hex 8)"
|
||||||
STARTED_AT=$(date +%s)
|
STARTED_AT=$(date +%s)
|
||||||
WT_ROOT="/tmp/fn_orq_${ISSUE_ID}_${STARTED_AT}"
|
WT_ROOT="/tmp/fn_orq_${ISSUE_ID}_${STARTED_AT}"
|
||||||
REPO="/home/lucas/fn_registry"
|
REPO="$HOME/fn_registry"
|
||||||
|
|
||||||
# Crear worktree aislado desde master (no toca el principal)
|
# Crear worktree aislado desde master (no toca el principal)
|
||||||
git -C "$REPO" worktree add -b "$BRANCH" "$WT_ROOT" master \
|
git -C "$REPO" worktree add -b "$BRANCH" "$WT_ROOT" master \
|
||||||
@@ -187,13 +187,13 @@ while iter < max_iterations and elapsed < max_minutes:
|
|||||||
|
|
||||||
Usar `Agent` tool con `subagent_type` correcto. Prompt **autocontenido** (paths absolutos, IDs, criterio exito).
|
Usar `Agent` tool con `subagent_type` correcto. Prompt **autocontenido** (paths absolutos, IDs, criterio exito).
|
||||||
|
|
||||||
**CRITICO**: pasar `WT_ROOT` (worktree path) en cada prompt y exigir al subagente trabajar dentro de el. Subagentes NO deben tocar el repo principal `/home/lucas/fn_registry/`.
|
**CRITICO**: pasar `WT_ROOT` (worktree path) en cada prompt y exigir al subagente trabajar dentro de el. Subagentes NO deben tocar el repo principal `$HOME/fn_registry/`.
|
||||||
|
|
||||||
Patron prompt:
|
Patron prompt:
|
||||||
```
|
```
|
||||||
Working dir: <WT_ROOT> # NO /home/lucas/fn_registry
|
Working dir: <WT_ROOT> # NO $HOME/fn_registry
|
||||||
Branch: auto/<issue_id>
|
Branch: auto/<issue_id>
|
||||||
Repo principal (solo lectura para registry.db): /home/lucas/fn_registry
|
Repo principal (solo lectura para registry.db): $HOME/fn_registry
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -346,7 +346,7 @@ Cada `progress_json` entry:
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `task_runs` no existe | migration 006 no aplicada | abortar pre-condicion 1 |
|
| `task_runs` no existe | migration 006 no aplicada | abortar pre-condicion 1 |
|
||||||
| `worktree add` falla con "already exists" | branch o dir previo no limpiado | `git worktree prune` + `git branch -D auto/<id>`, reintentar |
|
| `worktree add` falla con "already exists" | branch o dir previo no limpiado | `git worktree prune` + `git branch -D auto/<id>`, reintentar |
|
||||||
| Subagente toca `/home/lucas/fn_registry/` en vez de worktree | prompt sin `WT_ROOT` explicito | rebriefing con working dir explicito |
|
| Subagente toca `$HOME/fn_registry/` en vez de worktree | prompt sin `WT_ROOT` explicito | rebriefing con working dir explicito |
|
||||||
| `master` desincronizado con origin | falta `git pull` | abortar pre-condicion 3 |
|
| `master` desincronizado con origin | falta `git pull` | abortar pre-condicion 3 |
|
||||||
| Loop infinito (mismo fail siempre) | watchdog ausente o desactivado | watchdog OBLIGATORIO, no skipear |
|
| Loop infinito (mismo fail siempre) | watchdog ausente o desactivado | watchdog OBLIGATORIO, no skipear |
|
||||||
| Subagente devuelve output ambiguo | prompt insuficiente | rebriefing con paths/IDs explicitos |
|
| Subagente devuelve output ambiguo | prompt insuficiente | rebriefing con paths/IDs explicitos |
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ apps/{app_name}/
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Listar todas las apps
|
# Listar todas las apps
|
||||||
ls -d /home/lucas/fn_registry/apps/*/
|
ls -d $HOME/fn_registry/apps/*/
|
||||||
|
|
||||||
# Verificar que cada app tiene app.md
|
# Verificar que cada app tiene app.md
|
||||||
for app in /home/lucas/fn_registry/apps/*/; do
|
for app in $HOME/fn_registry/apps/*/; do
|
||||||
name=$(basename "$app")
|
name=$(basename "$app")
|
||||||
echo "=== $name ==="
|
echo "=== $name ==="
|
||||||
[ -f "$app/app.md" ] && echo " app.md: OK" || echo " app.md: FALTA"
|
[ -f "$app/app.md" ] && echo " app.md: OK" || echo " app.md: FALTA"
|
||||||
@@ -82,8 +82,8 @@ sqlite3 "$APP_DB" "SELECT * FROM schema_migrations ORDER BY version;" 2>/dev/nul
|
|||||||
**Si faltan tablas**, aplicar migraciones:
|
**Si faltan tablas**, aplicar migraciones:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Integridad de Entities
|
### 3. Integridad de Entities
|
||||||
@@ -96,7 +96,7 @@ sqlite3 "$APP_DB" "SELECT id, name, type_ref, status, domain, source FROM entiti
|
|||||||
|
|
||||||
# Validar que type_ref existe en registry.db
|
# Validar que type_ref existe en registry.db
|
||||||
sqlite3 "$APP_DB" "SELECT DISTINCT type_ref FROM entities;" | while read ref; do
|
sqlite3 "$APP_DB" "SELECT DISTINCT type_ref FROM entities;" | while read ref; do
|
||||||
EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM types WHERE id = '$ref';")
|
EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM types WHERE id = '$ref';")
|
||||||
if [ -z "$EXISTS" ]; then
|
if [ -z "$EXISTS" ]; then
|
||||||
echo "ERROR: type_ref '$ref' no existe en registry.db"
|
echo "ERROR: type_ref '$ref' no existe en registry.db"
|
||||||
fi
|
fi
|
||||||
@@ -129,7 +129,7 @@ sqlite3 "$APP_DB" "SELECT r.id, r.name, r.to_entity FROM relations r WHERE r.to_
|
|||||||
|
|
||||||
# Validar que 'via' referencia una funcion/pipeline del registry
|
# Validar que 'via' referencia una funcion/pipeline del registry
|
||||||
sqlite3 "$APP_DB" "SELECT DISTINCT via FROM relations WHERE via != '';" | while read via; do
|
sqlite3 "$APP_DB" "SELECT DISTINCT via FROM relations WHERE via != '';" | while read via; do
|
||||||
EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$via';")
|
EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$via';")
|
||||||
if [ -z "$EXISTS" ]; then
|
if [ -z "$EXISTS" ]; then
|
||||||
echo "ERROR: relation.via '$via' no existe en registry.db"
|
echo "ERROR: relation.via '$via' no existe en registry.db"
|
||||||
fi
|
fi
|
||||||
@@ -156,7 +156,7 @@ sqlite3 "$APP_DB" "SELECT id, pipeline_id, status, started_at, duration_ms, reco
|
|||||||
|
|
||||||
# Validar que pipeline_id existe en registry.db
|
# Validar que pipeline_id existe en registry.db
|
||||||
sqlite3 "$APP_DB" "SELECT DISTINCT pipeline_id FROM executions;" | while read pid; do
|
sqlite3 "$APP_DB" "SELECT DISTINCT pipeline_id FROM executions;" | while read pid; do
|
||||||
EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$pid';")
|
EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$pid';")
|
||||||
if [ -z "$EXISTS" ]; then
|
if [ -z "$EXISTS" ]; then
|
||||||
echo "ERROR: pipeline_id '$pid' no existe en registry.db"
|
echo "ERROR: pipeline_id '$pid' no existe en registry.db"
|
||||||
fi
|
fi
|
||||||
@@ -230,7 +230,7 @@ sqlite3 "$APP_DB" "SELECT id, version, lang, algebraic, snapped_at FROM types_sn
|
|||||||
|
|
||||||
# Comparar con registry.db — detectar snapshots desactualizados
|
# Comparar con registry.db — detectar snapshots desactualizados
|
||||||
sqlite3 "$APP_DB" "SELECT id, version FROM types_snapshot;" | while IFS='|' read id ver; do
|
sqlite3 "$APP_DB" "SELECT id, version FROM types_snapshot;" | while IFS='|' read id ver; do
|
||||||
REG_VER=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT version FROM types WHERE id = '$id';")
|
REG_VER=$(sqlite3 $HOME/fn_registry/registry.db "SELECT version FROM types WHERE id = '$id';")
|
||||||
if [ -z "$REG_VER" ]; then
|
if [ -z "$REG_VER" ]; then
|
||||||
echo "WARN: snapshot '$id' ya no existe en registry.db"
|
echo "WARN: snapshot '$id' ya no existe en registry.db"
|
||||||
elif [ "$ver" != "$REG_VER" ]; then
|
elif [ "$ver" != "$REG_VER" ]; then
|
||||||
@@ -252,14 +252,14 @@ done
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Verificar que la app esta en registry.db
|
# Verificar que la app esta en registry.db
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, domain, entry_point, dir_path FROM apps WHERE name = '{app_name}';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, domain, entry_point, dir_path FROM apps WHERE name = '{app_name}';"
|
||||||
|
|
||||||
# Verificar que uses_functions del app.md coincide con lo indexado
|
# Verificar que uses_functions del app.md coincide con lo indexado
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT uses_functions FROM apps WHERE name = '{app_name}';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT uses_functions FROM apps WHERE name = '{app_name}';"
|
||||||
|
|
||||||
# Verificar que todas las funciones referenciadas existen
|
# Verificar que todas las funciones referenciadas existen
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT f.value FROM apps, json_each(apps.uses_functions) f WHERE apps.name = '{app_name}';" | while read fid; do
|
sqlite3 $HOME/fn_registry/registry.db "SELECT f.value FROM apps, json_each(apps.uses_functions) f WHERE apps.name = '{app_name}';" | while read fid; do
|
||||||
EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$fid';")
|
EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$fid';")
|
||||||
if [ -z "$EXISTS" ]; then
|
if [ -z "$EXISTS" ]; then
|
||||||
echo "ERROR: app usa funcion '$fid' que no existe en registry"
|
echo "ERROR: app usa funcion '$fid' que no existe en registry"
|
||||||
fi
|
fi
|
||||||
@@ -273,7 +273,7 @@ done
|
|||||||
Patron para auditar TODAS las apps de una vez:
|
Patron para auditar TODAS las apps de una vez:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
echo "========================================="
|
echo "========================================="
|
||||||
echo "AUDITORIA DE APPS — fn-recopilador"
|
echo "AUDITORIA DE APPS — fn-recopilador"
|
||||||
@@ -327,7 +327,7 @@ for app_dir in apps/*/; do
|
|||||||
[ "$ERROR_LOGS" -gt 0 ] 2>/dev/null && echo " [WARN] $ERROR_LOGS logs de error"
|
[ "$ERROR_LOGS" -gt 0 ] 2>/dev/null && echo " [WARN] $ERROR_LOGS logs de error"
|
||||||
|
|
||||||
# 9. App indexada en registry.db
|
# 9. App indexada en registry.db
|
||||||
INDEXED=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM apps WHERE name = '$APP_NAME';" 2>/dev/null)
|
INDEXED=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM apps WHERE name = '$APP_NAME';" 2>/dev/null)
|
||||||
[ -n "$INDEXED" ] && echo " [OK] Indexada en registry.db" || echo " [WARN] NO indexada en registry.db"
|
[ -n "$INDEXED" ] && echo " [OK] Indexada en registry.db" || echo " [WARN] NO indexada en registry.db"
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -393,25 +393,25 @@ echo "========================================="
|
|||||||
El recopilador puede sugerir o ejecutar estas reparaciones:
|
El recopilador puede sugerir o ejecutar estas reparaciones:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Aplicar migraciones faltantes
|
# Aplicar migraciones faltantes
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
|
||||||
|
|
||||||
# Actualizar snapshot desactualizado
|
# Actualizar snapshot desactualizado
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID"
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID"
|
||||||
|
|
||||||
# Verificar snapshots
|
# Verificar snapshots
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db
|
||||||
|
|
||||||
# Evaluar assertions pendientes
|
# Evaluar assertions pendientes
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval --db apps/{app_name}/operations.db --entity-id "ENTITY_ID"
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval --db apps/{app_name}/operations.db --entity-id "ENTITY_ID"
|
||||||
|
|
||||||
# Re-indexar para que la app aparezca en registry.db
|
# Re-indexar para que la app aparezca en registry.db
|
||||||
./fn index
|
./fn index
|
||||||
|
|
||||||
# Ver grafo de la app (util para diagnostico visual)
|
# Ver grafo de la app (util para diagnostico visual)
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/operations.db
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops graph --db apps/{app_name}/operations.db
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+13
-13
@@ -38,13 +38,13 @@ Antes de crear nada, recopilar contexto:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Buscar funciones relevantes por descripcion
|
# Buscar funciones relevantes por descripcion
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:TERMINO* OR name:TERMINO*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:TERMINO* OR name:TERMINO*') ORDER BY name;"
|
||||||
|
|
||||||
# Buscar apps similares
|
# Buscar apps similares
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, description, uses_functions FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, description, uses_functions FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
||||||
|
|
||||||
# Verificar que el nombre no esta tomado
|
# Verificar que el nombre no esta tomado
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM apps WHERE name = 'NOMBRE';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM apps WHERE name = 'NOMBRE';"
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Presentar plan al usuario** antes de ejecutar:
|
4. **Presentar plan al usuario** antes de ejecutar:
|
||||||
@@ -79,7 +79,7 @@ Usar el Agent tool con `subagent_type: "fn-constructor"` pasando:
|
|||||||
Despues de que fn-constructor termine, verificar que todo se indexo:
|
Despues de que fn-constructor termine, verificar que todo se indexo:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry && ./fn index
|
cd $HOME/fn_registry && ./fn index
|
||||||
# Verificar cada funcion creada
|
# Verificar cada funcion creada
|
||||||
./fn show {id_de_cada_funcion}
|
./fn show {id_de_cada_funcion}
|
||||||
```
|
```
|
||||||
@@ -91,7 +91,7 @@ cd /home/lucas/fn_registry && ./fn index
|
|||||||
### Estructura base (todos los lenguajes)
|
### Estructura base (todos los lenguajes)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p /home/lucas/fn_registry/apps/{app_name}
|
mkdir -p $HOME/fn_registry/apps/{app_name}
|
||||||
```
|
```
|
||||||
|
|
||||||
### app.md (OBLIGATORIO — siempre primero)
|
### app.md (OBLIGATORIO — siempre primero)
|
||||||
@@ -143,7 +143,7 @@ build/
|
|||||||
|
|
||||||
**Go (CLI/TUI):**
|
**Go (CLI/TUI):**
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry/apps/{app_name}
|
cd $HOME/fn_registry/apps/{app_name}
|
||||||
go mod init fn_registry/apps/{app_name}
|
go mod init fn_registry/apps/{app_name}
|
||||||
# Crear main.go, app/, config/, views/ segun necesidad
|
# Crear main.go, app/, config/, views/ segun necesidad
|
||||||
```
|
```
|
||||||
@@ -151,7 +151,7 @@ go mod init fn_registry/apps/{app_name}
|
|||||||
**Go (Wails — desktop con UI):**
|
**Go (Wails — desktop con UI):**
|
||||||
```bash
|
```bash
|
||||||
# Usar scaffold del registry
|
# Usar scaffold del registry
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
./fn run scaffold_wails_app -- --name {app_name} --dir apps/{app_name}
|
./fn run scaffold_wails_app -- --name {app_name} --dir apps/{app_name}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -165,20 +165,20 @@ cd /home/lucas/fn_registry
|
|||||||
```bash
|
```bash
|
||||||
# Crear main.sh con source a funciones del registry
|
# Crear main.sh con source a funciones del registry
|
||||||
# Pattern: source "$REGISTRY_ROOT/bash/functions/{domain}/{func}.sh"
|
# Pattern: source "$REGISTRY_ROOT/bash/functions/{domain}/{func}.sh"
|
||||||
chmod +x /home/lucas/fn_registry/apps/{app_name}/main.sh
|
chmod +x $HOME/fn_registry/apps/{app_name}/main.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Inicializar operations.db
|
### Inicializar operations.db
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
|
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Indexar en registry.db
|
### Indexar en registry.db
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry && ./fn index
|
cd $HOME/fn_registry && ./fn index
|
||||||
# Verificar
|
# Verificar
|
||||||
sqlite3 registry.db "SELECT id, name, lang, domain FROM apps WHERE name = '{app_name}';"
|
sqlite3 registry.db "SELECT id, name, lang, domain FROM apps WHERE name = '{app_name}';"
|
||||||
```
|
```
|
||||||
@@ -241,7 +241,7 @@ Usar el Agent tool con `subagent_type: "gitea"` pasando:
|
|||||||
```bash
|
```bash
|
||||||
# 1. Crear repo en Gitea (via API)
|
# 1. Crear repo en Gitea (via API)
|
||||||
# 2. Inicializar git en la app
|
# 2. Inicializar git en la app
|
||||||
cd /home/lucas/fn_registry/apps/{app_name}
|
cd $HOME/fn_registry/apps/{app_name}
|
||||||
git init
|
git init
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "Initial commit: {app_name} — {descripcion}"
|
git commit -m "Initial commit: {app_name} — {descripcion}"
|
||||||
@@ -256,7 +256,7 @@ git push -u origin master
|
|||||||
**Despues de publicar**, actualizar el `repo_url` en app.md y re-indexar:
|
**Despues de publicar**, actualizar el `repo_url` en app.md y re-indexar:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry && ./fn index
|
cd $HOME/fn_registry && ./fn index
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Toda la logica vive en el registry (resolver app desde CWD/arg, build, deploy co
|
|||||||
## Dispatch
|
## Dispatch
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Detecta framework via wails.json o CMakeLists.txt en el dir del app
|
# Detecta framework via wails.json o CMakeLists.txt en el dir del app
|
||||||
APP="$ARGUMENTS"
|
APP="$ARGUMENTS"
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ Si `$ARGUMENTS` no empieza por `modify`, es create. Si trae `<name>`, lo usas co
|
|||||||
### Paso 0 — verificar que no existe
|
### Paso 0 — verificar que no existe
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
test -d "/home/lucas/fn_registry/apps/<name>" \
|
test -d "$HOME/fn_registry/apps/<name>" \
|
||||||
|| ls /home/lucas/fn_registry/projects/*/apps/<name> 2>/dev/null
|
|| ls $HOME/fn_registry/projects/*/apps/<name> 2>/dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
Si existe en cualquier ubicacion: **abortar** y sugerir `/cpp-app modify <name>`. NO sobreescribir.
|
Si existe en cualquier ubicacion: **abortar** y sugerir `/cpp-app modify <name>`. NO sobreescribir.
|
||||||
@@ -42,7 +42,7 @@ Regla dura `cpp_apps.md`: description + icon.phosphor + icon.accent SIEMPRE junt
|
|||||||
|
|
||||||
5. **icon.phosphor** glyph name. Antes de preguntar, ofrece busqueda:
|
5. **icon.phosphor** glyph name. Antes de preguntar, ofrece busqueda:
|
||||||
```bash
|
```bash
|
||||||
ls /home/lucas/fn_registry/sources/phosphor-core/assets/fill/ | grep -i "<keyword>"
|
ls $HOME/fn_registry/sources/phosphor-core/assets/fill/ | grep -i "<keyword>"
|
||||||
```
|
```
|
||||||
Sugiere 3-5 candidatos basados en `description`. Default segun domain: `gfx`->`palette`, `tui`->`terminal`, `tools`->`wrench`, `infra`->`gear`, `finance`->`chart-line-up`, `datascience`->`graph`, `cybersecurity`->`shield`.
|
Sugiere 3-5 candidatos basados en `description`. Default segun domain: `gfx`->`palette`, `tui`->`terminal`, `tools`->`wrench`, `infra`->`gear`, `finance`->`chart-line-up`, `datascience`->`graph`, `cybersecurity`->`shield`.
|
||||||
6. **icon.accent** hex `#rrggbb` (palette select):
|
6. **icon.accent** hex `#rrggbb` (palette select):
|
||||||
@@ -122,7 +122,7 @@ Mostrar bloque YAML completo del `app.md` que se va a generar + flags del scaffo
|
|||||||
Una vez confirmado:
|
Una vez confirmado:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# 1. Scaffolder
|
# 1. Scaffolder
|
||||||
./fn run init_cpp_app <name> \
|
./fn run init_cpp_app <name> \
|
||||||
@@ -178,7 +178,7 @@ cd /home/lucas/fn_registry
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Buscar apps/<name>/ o projects/*/apps/<name>/
|
# Buscar apps/<name>/ o projects/*/apps/<name>/
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db \
|
sqlite3 $HOME/fn_registry/registry.db \
|
||||||
"SELECT id, dir_path FROM apps WHERE name='<name>' AND lang='cpp';"
|
"SELECT id, dir_path FROM apps WHERE name='<name>' AND lang='cpp';"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -211,7 +211,7 @@ Para cada cambio: usa `Edit` sobre los archivos correspondientes. NUNCA `Write`
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Siempre
|
# Siempre
|
||||||
cd /home/lucas/fn_registry && ./fn index
|
cd $HOME/fn_registry && ./fn index
|
||||||
|
|
||||||
# Si toco icon.* -> regenerar appicon
|
# Si toco icon.* -> regenerar appicon
|
||||||
./fn run generate_app_icon "<phosphor>" "<accent>" "<dir>/appicon.ico"
|
./fn run generate_app_icon "<phosphor>" "<accent>" "<dir>/appicon.ico"
|
||||||
|
|||||||
@@ -38,19 +38,19 @@ Consultar `registry.db` para encontrar funciones existentes relevantes y evitar
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Buscar funciones similares por nombre y descripcion (OBLIGATORIO — usar multiples terminos)
|
# Buscar funciones similares por nombre y descripcion (OBLIGATORIO — usar multiples terminos)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO1* OR description:TERMINO1* OR name:TERMINO2* OR description:TERMINO2*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO1* OR description:TERMINO1* OR name:TERMINO2* OR description:TERMINO2*') ORDER BY name;"
|
||||||
|
|
||||||
# Buscar tipos relacionados
|
# Buscar tipos relacionados
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, lang, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, lang, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
|
||||||
|
|
||||||
# Funciones del dominio objetivo
|
# Funciones del dominio objetivo
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, signature, description FROM functions WHERE domain = 'DOMINIO' AND lang = 'LANG' ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, signature, description FROM functions WHERE domain = 'DOMINIO' AND lang = 'LANG' ORDER BY name;"
|
||||||
|
|
||||||
# Tipos del dominio objetivo
|
# Tipos del dominio objetivo
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO' ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO' ORDER BY name;"
|
||||||
|
|
||||||
# Funciones que podrian componerse (misma firma de retorno)
|
# Funciones que podrian componerse (misma firma de retorno)
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE returns LIKE '%TIPO%' OR signature LIKE '%TIPO%' ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE returns LIKE '%TIPO%' OR signature LIKE '%TIPO%' ORDER BY name;"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Clasificar resultados en:**
|
**Clasificar resultados en:**
|
||||||
@@ -103,7 +103,7 @@ Para cada batch del plan, lanzar agentes `fn-constructor` **en paralelo** (un ag
|
|||||||
Usar el Agent tool con `subagent_type: "fn-constructor"` pasando un prompt completo con:
|
Usar el Agent tool con `subagent_type: "fn-constructor"` pasando un prompt completo con:
|
||||||
|
|
||||||
```
|
```
|
||||||
Crea la siguiente funcion para el registry fn_registry en /home/lucas/fn_registry:
|
Crea la siguiente funcion para el registry fn_registry en $HOME/fn_registry:
|
||||||
|
|
||||||
Funcion: {nombre}
|
Funcion: {nombre}
|
||||||
Kind: {kind}
|
Kind: {kind}
|
||||||
@@ -149,7 +149,7 @@ Despues de que TODOS los fn-constructor terminen:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Indexar todo de una vez
|
# Indexar todo de una vez
|
||||||
cd /home/lucas/fn_registry && ./fn index
|
cd $HOME/fn_registry && ./fn index
|
||||||
```
|
```
|
||||||
|
|
||||||
Si el indexer reporta errores, corregirlos antes de continuar. Errores comunes:
|
Si el indexer reporta errores, corregirlos antes de continuar. Errores comunes:
|
||||||
@@ -166,7 +166,7 @@ Si el indexer reporta errores, corregirlos antes de continuar. Errores comunes:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Verificar cada funcion creada
|
# Verificar cada funcion creada
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
./fn show {id_de_cada_funcion}
|
./fn show {id_de_cada_funcion}
|
||||||
|
|
||||||
# Verificar que no hay funciones sin params_schema
|
# Verificar que no hay funciones sin params_schema
|
||||||
@@ -178,7 +178,7 @@ cd /home/lucas/fn_registry
|
|||||||
Para cada funcion con tests, ejecutar:
|
Para cada funcion con tests, ejecutar:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Go
|
# Go
|
||||||
CGO_ENABLED=1 go test -tags fts5 -v -run TestNombreDelTest ./functions/{domain}/
|
CGO_ENABLED=1 go test -tags fts5 -v -run TestNombreDelTest ./functions/{domain}/
|
||||||
@@ -197,13 +197,13 @@ bash bash/functions/{domain}/{nombre}_test.sh
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Verificar que todas las funciones nuevas estan en la BD
|
# Verificar que todas las funciones nuevas estan en la BD
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, tested FROM functions WHERE id IN ('id1','id2','id3') ORDER BY name;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, tested FROM functions WHERE id IN ('id1','id2','id3') ORDER BY name;"
|
||||||
|
|
||||||
# Verificar que los tests estan indexados
|
# Verificar que los tests estan indexados
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, function_id, name FROM unit_tests WHERE function_id IN ('id1','id2','id3') ORDER BY function_id;"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, function_id, name FROM unit_tests WHERE function_id IN ('id1','id2','id3') ORDER BY function_id;"
|
||||||
|
|
||||||
# Verificar dependencias
|
# Verificar dependencias
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, uses_functions, uses_types FROM functions WHERE id IN ('id1','id2','id3') AND uses_functions != '[]';"
|
sqlite3 $HOME/fn_registry/registry.db "SELECT id, uses_functions, uses_types FROM functions WHERE id IN ('id1','id2','id3') AND uses_functions != '[]';"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 6.4 Si algo fallo
|
### 6.4 Si algo fallo
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Antes de escribir nada, repasar la conversacion y juntar:
|
|||||||
|
|
||||||
2. **Cambios concretos** desde git:
|
2. **Cambios concretos** desde git:
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
git status --short
|
git status --short
|
||||||
git diff --stat
|
git diff --stat
|
||||||
git log --since="6 hours ago" --oneline
|
git log --since="6 hours ago" --oneline
|
||||||
@@ -70,7 +70,7 @@ Si el material es solo conversacion exploratoria sin artefactos tocados, ir dire
|
|||||||
Para cada artefacto identificado, localizar su `.md` consultando `registry.db`:
|
Para cada artefacto identificado, localizar su `.md` consultando `registry.db`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
|
|
||||||
# Funcion / tipo
|
# Funcion / tipo
|
||||||
sqlite3 registry.db "SELECT id, file_path FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:NAME* OR description:NAME*');"
|
sqlite3 registry.db "SELECT id, file_path FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:NAME* OR description:NAME*');"
|
||||||
@@ -180,7 +180,7 @@ Para cada `.md` identificado:
|
|||||||
Si los cambios de la sesion incluyen creacion de funciones/tipos/apps/projects/analysis/vaults o modificacion de frontmatter:
|
Si los cambios de la sesion incluyen creacion de funciones/tipos/apps/projects/analysis/vaults o modificacion de frontmatter:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry && ./fn index
|
cd $HOME/fn_registry && ./fn index
|
||||||
```
|
```
|
||||||
|
|
||||||
Y verificar:
|
Y verificar:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Suite ya instalada en `cpp/vendor/imgui_test_engine/`. Integracion en framework:
|
|||||||
### 1. Resolver app y directorio
|
### 1. Resolver app y directorio
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ROOT=/home/lucas/fn_registry
|
ROOT=$HOME/fn_registry
|
||||||
ARGS="$ARGUMENTS"
|
ARGS="$ARGUMENTS"
|
||||||
APP_ARG="${ARGS%% *}" # primera palabra
|
APP_ARG="${ARGS%% *}" # primera palabra
|
||||||
FLOW_DESC="${ARGS#* }" # resto (puede coincidir con APP_ARG si solo hay una palabra)
|
FLOW_DESC="${ARGS#* }" # resto (puede coincidir con APP_ARG si solo hay una palabra)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Wrapper sobre `append_diary_entry_bash_infra`. La función del registry maneja t
|
|||||||
|
|
||||||
2. **Llamar la función del registry**:
|
2. **Llamar la función del registry**:
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
source bash/functions/infra/append_diary_entry.sh
|
source bash/functions/infra/append_diary_entry.sh
|
||||||
append_diary_entry "<TITULO>" "$(cat <<'EOF'
|
append_diary_entry "<TITULO>" "$(cat <<'EOF'
|
||||||
<CUERPO>
|
<CUERPO>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Issue 0085 fase autocompleta. Reemplaza el flujo manual de "veo un patron, decid
|
|||||||
### 1. AUDIT — ¿estoy siendo registrado?
|
### 1. AUDIT — ¿estoy siendo registrado?
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ROOT="/home/lucas/fn_registry"
|
ROOT="$HOME/fn_registry"
|
||||||
MON="$ROOT/projects/fn_monitoring/apps/call_monitor/operations.db"
|
MON="$ROOT/projects/fn_monitoring/apps/call_monitor/operations.db"
|
||||||
|
|
||||||
# Pre-condiciones
|
# Pre-condiciones
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Wrapper sobre el pipeline `full_git_pull_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta:
|
Wrapper sobre el pipeline `full_git_pull_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
./fn run full_git_pull_bash_pipelines
|
./fn run full_git_pull_bash_pipelines
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Wrapper sobre el pipeline `full_git_push_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta:
|
Wrapper sobre el pipeline `full_git_push_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd "${FN_REGISTRY_ROOT:-$HOME/fn_registry}"
|
||||||
./fn run full_git_push_bash_pipelines "$ARGUMENTS"
|
./fn run full_git_push_bash_pipelines "$ARGUMENTS"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Wrapper sobre el pipeline `init_cpp_app_bash_pipelines`. Genera la estructura canonica que cumple `cpp/PATTERNS.md` y `.claude/rules/cpp_apps.md` (main.cpp con `cfg.about/log/panels`, sin `app_menubar` manual, dockspace via framework), registra la app en `cpp/CMakeLists.txt`, crea repo Gitea `dataforge/<name>` y ejecuta `fn index`.
|
Wrapper sobre el pipeline `init_cpp_app_bash_pipelines`. Genera la estructura canonica que cumple `cpp/PATTERNS.md` y `.claude/rules/cpp_apps.md` (main.cpp con `cfg.about/log/panels`, sin `app_menubar` manual, dockspace via framework), registra la app en `cpp/CMakeLists.txt`, crea repo Gitea `dataforge/<name>` y ejecuta `fn index`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
./fn run init_cpp_app $ARGUMENTS
|
./fn run init_cpp_app $ARGUMENTS
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Si vacio: detectar app desde `pwd` (si estas dentro de `apps/<X>/` o `projects/*
|
|||||||
### 1. Resolver app objetivo
|
### 1. Resolver app objetivo
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ROOT=/home/lucas/fn_registry
|
ROOT=$HOME/fn_registry
|
||||||
ARG="$ARGUMENTS"
|
ARG="$ARGUMENTS"
|
||||||
|
|
||||||
if [ -z "$ARG" ]; then
|
if [ -z "$ARG" ]; then
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Agente trabaja en worktree del repo padre
|
# 1. Agente trabaja en worktree del repo padre
|
||||||
cd /home/lucas/fn_registry/worktrees/<slug>
|
cd $HOME/fn_registry/worktrees/<slug>
|
||||||
|
|
||||||
# 2. Scaffold la app via pipeline canonico
|
# 2. Scaffold la app via pipeline canonico
|
||||||
./fn run init_cpp_app <name> # apps C++
|
./fn run init_cpp_app <name> # apps C++
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ if [[ -n "$matches" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Escanear repo especifico
|
# Escanear repo especifico
|
||||||
scan_secrets_in_dirty /home/lucas/fn_registry
|
scan_secrets_in_dirty $HOME/fn_registry
|
||||||
```
|
```
|
||||||
|
|
||||||
## Patrones detectados
|
## Patrones detectados
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ params:
|
|||||||
- name: app_name
|
- name: app_name
|
||||||
desc: "Nombre de la app (ej: chart_demo). Se usa para localizar cpp/build/windows/apps/<app>/<app>.exe y el directorio destino Desktop/apps/<app>/."
|
desc: "Nombre de la app (ej: chart_demo). Se usa para localizar cpp/build/windows/apps/<app>/<app>.exe y el directorio destino Desktop/apps/<app>/."
|
||||||
- name: app_dir
|
- name: app_dir
|
||||||
desc: "Ruta absoluta al directorio fuente de la app (ej: /home/lucas/fn_registry/cpp/apps/chart_demo). Se usa para localizar enrichers/, runtime/ y app.md."
|
desc: "Ruta absoluta al directorio fuente de la app (ej: $HOME/fn_registry/cpp/apps/chart_demo). Se usa para localizar enrichers/, runtime/ y app.md."
|
||||||
output: "Copia archivos al escritorio de Windows. Imprime 'OK: <app> -> <dest>' en stdout. Si local_files/ existe, imprime su tamanio. Errores fatales a stderr con exit 1."
|
output: "Copia archivos al escritorio de Windows. Imprime 'OK: <app> -> <dest>' en stdout. Si local_files/ existe, imprime su tamanio. Errores fatales a stderr con exit 1."
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
deploy_cpp_exe_to_windows "chart_demo" "/home/lucas/fn_registry/cpp/apps/chart_demo"
|
deploy_cpp_exe_to_windows "chart_demo" "$HOME/fn_registry/cpp/apps/chart_demo"
|
||||||
# OK: chart_demo -> /mnt/c/Users/lucas/Desktop/apps/chart_demo
|
# OK: chart_demo -> /mnt/c/Users/lucas/Desktop/apps/chart_demo
|
||||||
|
|
||||||
# Con rutas custom via env vars
|
# Con rutas custom via env vars
|
||||||
@@ -55,7 +55,7 @@ Desktop/apps/<APP>/
|
|||||||
|
|
||||||
- `BUILD_WIN` — directorio de build Windows; default `$FN_REGISTRY_ROOT/cpp/build/windows`
|
- `BUILD_WIN` — directorio de build Windows; default `$FN_REGISTRY_ROOT/cpp/build/windows`
|
||||||
- `WIN_DESKTOP_APPS` — directorio destino; default `/mnt/c/Users/lucas/Desktop/apps`
|
- `WIN_DESKTOP_APPS` — directorio destino; default `/mnt/c/Users/lucas/Desktop/apps`
|
||||||
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
|
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
|
||||||
|
|
||||||
## Notas
|
## Notas
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ deploy_cpp_exe_to_windows() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
|
local root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
|
||||||
local build_win="${BUILD_WIN:-$root/cpp/build/windows}"
|
local build_win="${BUILD_WIN:-$root/cpp/build/windows}"
|
||||||
local win_desktop_apps="${WIN_DESKTOP_APPS:-/mnt/c/Users/lucas/Desktop/apps}"
|
local win_desktop_apps="${WIN_DESKTOP_APPS:-/mnt/c/Users/lucas/Desktop/apps}"
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ source bash/functions/infra/deploy_wails_exe_to_windows.sh
|
|||||||
|
|
||||||
# Desplegar matrix_client_pc tras wails build -platform windows/amd64
|
# Desplegar matrix_client_pc tras wails build -platform windows/amd64
|
||||||
deploy_wails_exe_to_windows matrix_client_pc \
|
deploy_wails_exe_to_windows matrix_client_pc \
|
||||||
/home/lucas/fn_registry/projects/element_agents/apps/matrix_client_pc
|
$HOME/fn_registry/projects/element_agents/apps/matrix_client_pc
|
||||||
```
|
```
|
||||||
|
|
||||||
Con override de destino:
|
Con override de destino:
|
||||||
@@ -44,7 +44,7 @@ Con override de destino:
|
|||||||
```bash
|
```bash
|
||||||
WIN_DESKTOP_APPS=/mnt/c/Users/lucas/Desktop/apps \
|
WIN_DESKTOP_APPS=/mnt/c/Users/lucas/Desktop/apps \
|
||||||
deploy_wails_exe_to_windows matrix_admin_panel \
|
deploy_wails_exe_to_windows matrix_admin_panel \
|
||||||
/home/lucas/fn_registry/projects/element_agents/apps/matrix_admin_panel
|
$HOME/fn_registry/projects/element_agents/apps/matrix_admin_panel
|
||||||
```
|
```
|
||||||
|
|
||||||
## Cuando usarla
|
## Cuando usarla
|
||||||
|
|||||||
@@ -30,15 +30,15 @@ file_path: "bash/functions/infra/discover_git_repos.sh"
|
|||||||
source bash/functions/infra/discover_git_repos.sh
|
source bash/functions/infra/discover_git_repos.sh
|
||||||
|
|
||||||
# Listar todos los repos bajo fn_registry
|
# Listar todos los repos bajo fn_registry
|
||||||
discover_git_repos /home/lucas/fn_registry
|
discover_git_repos $HOME/fn_registry
|
||||||
|
|
||||||
# Contar repos
|
# Contar repos
|
||||||
discover_git_repos /home/lucas/fn_registry | wc -l
|
discover_git_repos $HOME/fn_registry | wc -l
|
||||||
|
|
||||||
# Iterar
|
# Iterar
|
||||||
while IFS= read -r repo; do
|
while IFS= read -r repo; do
|
||||||
echo "Repo: $repo"
|
echo "Repo: $repo"
|
||||||
done < <(discover_git_repos /home/lucas/fn_registry)
|
done < <(discover_git_repos $HOME/fn_registry)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notas
|
## Notas
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ file_path: "bash/functions/infra/docker_cp_file.sh"
|
|||||||
```bash
|
```bash
|
||||||
source functions/infra/docker_cp_file.sh
|
source functions/infra/docker_cp_file.sh
|
||||||
|
|
||||||
result=$(docker_cp_file /home/lucas/fn_registry/registry.db metabase /registry.db)
|
result=$(docker_cp_file $HOME/fn_registry/registry.db metabase /registry.db)
|
||||||
echo "$result"
|
echo "$result"
|
||||||
# {"local_size":524288,"remote_size":524288}
|
# {"local_size":524288,"remote_size":524288}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ file_path: "bash/functions/infra/git_auto_commit_dirty.sh"
|
|||||||
source bash/functions/infra/git_auto_commit_dirty.sh
|
source bash/functions/infra/git_auto_commit_dirty.sh
|
||||||
|
|
||||||
# Commitear con mensaje automatico
|
# Commitear con mensaje automatico
|
||||||
subject=$(git_auto_commit_dirty /home/lucas/fn_registry)
|
subject=$(git_auto_commit_dirty $HOME/fn_registry)
|
||||||
echo "Commit: $subject"
|
echo "Commit: $subject"
|
||||||
|
|
||||||
# Commitear con mensaje fijo
|
# Commitear con mensaje fijo
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ error_type: "error_go_core"
|
|||||||
imports: []
|
imports: []
|
||||||
example: |
|
example: |
|
||||||
# Manual check
|
# Manual check
|
||||||
bash bash/functions/infra/git_hook_audit_app_drift.sh /home/lucas/fn_registry/apps/kanban
|
bash bash/functions/infra/git_hook_audit_app_drift.sh $HOME/fn_registry/apps/kanban
|
||||||
|
|
||||||
# Used by pre_commit_hook_install_bash_infra (v2 hook chain)
|
# Used by pre_commit_hook_install_bash_infra (v2 hook chain)
|
||||||
file_path: bash/functions/infra/git_hook_audit_app_drift.sh
|
file_path: bash/functions/infra/git_hook_audit_app_drift.sh
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ file_path: "bash/functions/infra/git_pull_with_stash.sh"
|
|||||||
source bash/functions/infra/git_pull_with_stash.sh
|
source bash/functions/infra/git_pull_with_stash.sh
|
||||||
|
|
||||||
# Pullear repo con auto-stash
|
# Pullear repo con auto-stash
|
||||||
status=$(git_pull_with_stash /home/lucas/fn_registry)
|
status=$(git_pull_with_stash $HOME/fn_registry)
|
||||||
echo "$status"
|
echo "$status"
|
||||||
# [pulled] fn_registry
|
# [pulled] fn_registry
|
||||||
# o:
|
# o:
|
||||||
@@ -46,7 +46,7 @@ while IFS= read -r repo; do
|
|||||||
if [[ "$result" == "[diverged]"* || "$result" == "[stash-conflict]"* ]]; then
|
if [[ "$result" == "[diverged]"* || "$result" == "[stash-conflict]"* ]]; then
|
||||||
diverged+=("$result")
|
diverged+=("$result")
|
||||||
fi
|
fi
|
||||||
done < <(discover_git_repos /home/lucas/fn_registry)
|
done < <(discover_git_repos $HOME/fn_registry)
|
||||||
|
|
||||||
if [[ ${#diverged[@]} -gt 0 ]]; then
|
if [[ ${#diverged[@]} -gt 0 ]]; then
|
||||||
echo "ATENCION: repos que requieren intervencion manual:"
|
echo "ATENCION: repos que requieren intervencion manual:"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ file_path: "bash/functions/infra/git_push_if_ahead.sh"
|
|||||||
source bash/functions/infra/git_push_if_ahead.sh
|
source bash/functions/infra/git_push_if_ahead.sh
|
||||||
|
|
||||||
# Pushear si hay commits locales
|
# Pushear si hay commits locales
|
||||||
status=$(git_push_if_ahead /home/lucas/fn_registry)
|
status=$(git_push_if_ahead $HOME/fn_registry)
|
||||||
echo "$status"
|
echo "$status"
|
||||||
# [push] fn_registry (master, 3 commits ahead)
|
# [push] fn_registry (master, 3 commits ahead)
|
||||||
# o:
|
# o:
|
||||||
@@ -39,7 +39,7 @@ echo "$status"
|
|||||||
# Iterar sobre multiples repos
|
# Iterar sobre multiples repos
|
||||||
while IFS= read -r repo; do
|
while IFS= read -r repo; do
|
||||||
git_push_if_ahead "$repo"
|
git_push_if_ahead "$repo"
|
||||||
done < <(discover_git_repos /home/lucas/fn_registry)
|
done < <(discover_git_repos $HOME/fn_registry)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Estados de salida
|
## Estados de salida
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Mitad complementaria de `deploy_cpp_exe_to_windows_bash_infra`. El flujo complet
|
|||||||
build_cpp_windows "registry_dashboard"
|
build_cpp_windows "registry_dashboard"
|
||||||
|
|
||||||
# 2. Copiar al escritorio (mata proceso si corre, copia DLLs+assets)
|
# 2. Copiar al escritorio (mata proceso si corre, copia DLLs+assets)
|
||||||
deploy_cpp_exe_to_windows "registry_dashboard" "/home/lucas/fn_registry/apps/registry_dashboard"
|
deploy_cpp_exe_to_windows "registry_dashboard" "$HOME/fn_registry/apps/registry_dashboard"
|
||||||
|
|
||||||
# 3. Lanzar
|
# 3. Lanzar
|
||||||
launch_cpp_app_windows "registry_dashboard"
|
launch_cpp_app_windows "registry_dashboard"
|
||||||
|
|||||||
@@ -32,16 +32,16 @@ file_path: "bash/functions/infra/pre_commit_hook_install.sh"
|
|||||||
source bash/functions/infra/pre_commit_hook_install.sh
|
source bash/functions/infra/pre_commit_hook_install.sh
|
||||||
|
|
||||||
# Instalar en el repo actual
|
# Instalar en el repo actual
|
||||||
pre_commit_hook_install /home/lucas/fn_registry
|
pre_commit_hook_install $HOME/fn_registry
|
||||||
# INSTALLED /home/lucas/fn_registry/.git/hooks/pre-commit
|
# INSTALLED $HOME/fn_registry/.git/hooks/pre-commit
|
||||||
|
|
||||||
# Idempotente: segunda llamada no sobreescribe
|
# Idempotente: segunda llamada no sobreescribe
|
||||||
pre_commit_hook_install /home/lucas/fn_registry
|
pre_commit_hook_install $HOME/fn_registry
|
||||||
# SKIP /home/lucas/fn_registry/.git/hooks/pre-commit (already installed)
|
# SKIP $HOME/fn_registry/.git/hooks/pre-commit (already installed)
|
||||||
|
|
||||||
# Forzar reinstalacion (hace backup del hook anterior)
|
# Forzar reinstalacion (hace backup del hook anterior)
|
||||||
pre_commit_hook_install /home/lucas/fn_registry --force
|
pre_commit_hook_install $HOME/fn_registry --force
|
||||||
# INSTALLED /home/lucas/fn_registry/.git/hooks/pre-commit
|
# INSTALLED $HOME/fn_registry/.git/hooks/pre-commit
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notas
|
## Notas
|
||||||
@@ -58,5 +58,5 @@ Si no puede localizar `fn_registry`, el hook imprime un aviso y sale con exit 0
|
|||||||
|
|
||||||
Configurar `FN_REGISTRY_ROOT` en el perfil del shell para garantizar que el hook siempre encuentre el registry:
|
Configurar `FN_REGISTRY_ROOT` en el perfil del shell para garantizar que el hook siempre encuentre el registry:
|
||||||
```bash
|
```bash
|
||||||
export FN_REGISTRY_ROOT=/home/lucas/fn_registry
|
export FN_REGISTRY_ROOT=$HOME/fn_registry
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -28,13 +28,13 @@ output: "Una linea TAB-separada '<app_name>\\t<absolute_dir_path>' en stdout. En
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Desde dentro de cpp/apps/chart_demo/
|
# Desde dentro de cpp/apps/chart_demo/
|
||||||
cd /home/lucas/fn_registry/cpp/apps/chart_demo
|
cd $HOME/fn_registry/cpp/apps/chart_demo
|
||||||
resolve_cpp_app_dir
|
resolve_cpp_app_dir
|
||||||
# -> chart_demo\t/home/lucas/fn_registry/cpp/apps/chart_demo
|
# -> chart_demo\t$HOME/fn_registry/cpp/apps/chart_demo
|
||||||
|
|
||||||
# Con argumento explicito
|
# Con argumento explicito
|
||||||
resolve_cpp_app_dir registry_dashboard
|
resolve_cpp_app_dir registry_dashboard
|
||||||
# -> registry_dashboard\t/home/lucas/fn_registry/cpp/apps/registry_dashboard
|
# -> registry_dashboard\t$HOME/fn_registry/cpp/apps/registry_dashboard
|
||||||
|
|
||||||
# Capturar los dos campos
|
# Capturar los dos campos
|
||||||
resolved=$(resolve_cpp_app_dir graph_explorer)
|
resolved=$(resolve_cpp_app_dir graph_explorer)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
resolve_cpp_app_dir() {
|
resolve_cpp_app_dir() {
|
||||||
local app_arg="${1:-}"
|
local app_arg="${1:-}"
|
||||||
local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
|
local root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
|
||||||
|
|
||||||
_list_cpp_apps() {
|
_list_cpp_apps() {
|
||||||
ls "$root/apps/" 2>/dev/null | sed 's/^/ apps\//'
|
ls "$root/apps/" 2>/dev/null | sed 's/^/ apps\//'
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ echo "$result"
|
|||||||
# {"files_transferred": 12, "total_size": "1.23 MB", "ssh_alias": "prod-server", "remote_dir": "/opt/apps/dag_engine"}
|
# {"files_transferred": 12, "total_size": "1.23 MB", "ssh_alias": "prod-server", "remote_dir": "/opt/apps/dag_engine"}
|
||||||
|
|
||||||
# Deploy con ruta absoluta local
|
# Deploy con ruta absoluta local
|
||||||
rsync_deploy "/home/lucas/fn_registry/apps/myapp/" "myserver" "/opt/myapp"
|
rsync_deploy "$HOME/fn_registry/apps/myapp/" "myserver" "/opt/myapp"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notas
|
## Notas
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ file_path: "bash/functions/infra/write_mcp_jupyter_config.sh"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
source write_mcp_jupyter_config.sh
|
source write_mcp_jupyter_config.sh
|
||||||
path=$(write_mcp_jupyter_config /home/lucas/fn_registry/analysis/finanzas 8890)
|
path=$(write_mcp_jupyter_config $HOME/fn_registry/analysis/finanzas 8890)
|
||||||
echo "Config MCP en: $path"
|
echo "Config MCP en: $path"
|
||||||
# Genera .mcp.json con:
|
# Genera .mcp.json con:
|
||||||
# "command": ".../.venv/bin/jupyter-mcp-server"
|
# "command": ".../.venv/bin/jupyter-mcp-server"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ file_path: "bash/functions/pipelines/agent_scaffold.sh"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Crear agente basico con openai
|
# Crear agente basico con openai
|
||||||
export FN_REGISTRY_ROOT=/home/lucas/fn_registry
|
export FN_REGISTRY_ROOT=$HOME/fn_registry
|
||||||
bash bash/functions/pipelines/agent_scaffold.sh monitor-bot \
|
bash bash/functions/pipelines/agent_scaffold.sh monitor-bot \
|
||||||
--display-name "Monitor Agent" \
|
--display-name "Monitor Agent" \
|
||||||
--description "Monitorea servicios y reporta estado" \
|
--description "Monitorea servicios y reporta estado" \
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ file_path: "bash/functions/pipelines/backup_all.sh"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Backup manual a ~/backups/fn_registry
|
# Backup manual a ~/backups/fn_registry
|
||||||
export FN_REGISTRY_ROOT=/home/lucas/fn_registry
|
export FN_REGISTRY_ROOT=$HOME/fn_registry
|
||||||
backup_all ~/backups/fn_registry
|
backup_all ~/backups/fn_registry
|
||||||
|
|
||||||
# Salida esperada:
|
# Salida esperada:
|
||||||
# 2026-05-07T10:30:00+02:00 registry=4194304B ops=3 vaults=2 partial_errors=0 elapsed=12s
|
# 2026-05-07T10:30:00+02:00 registry=4194304B ops=3 vaults=2 partial_errors=0 elapsed=12s
|
||||||
|
|
||||||
# Entrada en crontab (diario a las 02:00)
|
# Entrada en crontab (diario a las 02:00)
|
||||||
# 0 2 * * * FN_REGISTRY_ROOT=/home/lucas/fn_registry bash /home/lucas/fn_registry/bash/functions/pipelines/backup_all.sh ~/backups/fn_registry
|
# 0 2 * * * FN_REGISTRY_ROOT=$HOME/fn_registry bash $HOME/fn_registry/bash/functions/pipelines/backup_all.sh ~/backups/fn_registry
|
||||||
```
|
```
|
||||||
|
|
||||||
## Estructura de backup_root/
|
## Estructura de backup_root/
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ file_path: "bash/functions/pipelines/clone_project_subrepos.sh"
|
|||||||
# analysis domain_coverage_gaps [cloned]
|
# analysis domain_coverage_gaps [cloned]
|
||||||
#
|
#
|
||||||
# Siguiente paso sugerido:
|
# Siguiente paso sugerido:
|
||||||
# cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync
|
# cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync
|
||||||
|
|
||||||
# Con owner alternativo
|
# Con owner alternativo
|
||||||
./fn run clone_project_subrepos aurgi --owner miorg
|
./fn run clone_project_subrepos aurgi --owner miorg
|
||||||
@@ -65,7 +65,7 @@ Cuando llegas a un PC nuevo con solo fn_registry clonado y quieres trabajar en u
|
|||||||
|
|
||||||
## Variables de entorno
|
## Variables de entorno
|
||||||
|
|
||||||
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
|
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
|
||||||
- `GITEA_URL` — URL base de Gitea; default `https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com`
|
- `GITEA_URL` — URL base de Gitea; default `https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com`
|
||||||
- Auth git/ssh: el pipeline confía en la config local del usuario (SSH key, credential helper)
|
- Auth git/ssh: el pipeline confía en la config local del usuario (SSH key, credential helper)
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ clone_project_subrepos() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Resolver paths ---
|
# --- Resolver paths ---
|
||||||
local registry_root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
|
local registry_root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
|
||||||
local db="$registry_root/registry.db"
|
local db="$registry_root/registry.db"
|
||||||
local gitea_url="${GITEA_URL:-https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com}"
|
local gitea_url="${GITEA_URL:-https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com}"
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ output: "Compila el .exe y lo despliega al escritorio de Windows. Imprime progre
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Desde dentro del directorio de la app (sin arg)
|
# Desde dentro del directorio de la app (sin arg)
|
||||||
cd /home/lucas/fn_registry/cpp/apps/chart_demo
|
cd $HOME/fn_registry/cpp/apps/chart_demo
|
||||||
fn run compile_cpp_app
|
fn run compile_cpp_app
|
||||||
|
|
||||||
# Con nombre explicito desde cualquier directorio
|
# Con nombre explicito desde cualquier directorio
|
||||||
@@ -51,7 +51,7 @@ bash bash/functions/pipelines/compile_cpp_app.sh graph_explorer
|
|||||||
|
|
||||||
## Variables de entorno
|
## Variables de entorno
|
||||||
|
|
||||||
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
|
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
|
||||||
- `BUILD_WIN` — directorio de build Windows; default `$FN_REGISTRY_ROOT/cpp/build/windows`
|
- `BUILD_WIN` — directorio de build Windows; default `$FN_REGISTRY_ROOT/cpp/build/windows`
|
||||||
- `WIN_DESKTOP_APPS` — directorio destino; default `/mnt/c/Users/lucas/Desktop/apps`
|
- `WIN_DESKTOP_APPS` — directorio destino; default `/mnt/c/Users/lucas/Desktop/apps`
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ compile_cpp_app() {
|
|||||||
deploy_cpp_exe_to_windows "$APP" "$APP_DIR"
|
deploy_cpp_exe_to_windows "$APP" "$APP_DIR"
|
||||||
|
|
||||||
# --- Resumen final ---
|
# --- Resumen final ---
|
||||||
local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
|
local root="${FN_REGISTRY_ROOT:-$(cd "$SCRIPT_DIR/../../.." && pwd)}"
|
||||||
local build_win="${BUILD_WIN:-$root/cpp/build/windows}"
|
local build_win="${BUILD_WIN:-$root/cpp/build/windows}"
|
||||||
local win_desktop_apps="${WIN_DESKTOP_APPS:-/mnt/c/Users/lucas/Desktop/apps}"
|
local win_desktop_apps="${WIN_DESKTOP_APPS:-/mnt/c/Users/lucas/Desktop/apps}"
|
||||||
local final_exe="$win_desktop_apps/$APP/$APP.exe"
|
local final_exe="$win_desktop_apps/$APP/$APP.exe"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ cd projects/element_agents/apps/matrix_client_pc
|
|||||||
./fn run compile_wails_app
|
./fn run compile_wails_app
|
||||||
|
|
||||||
# Desde la raiz del registry, con nombre explicito
|
# Desde la raiz del registry, con nombre explicito
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
./fn run compile_wails_app matrix_admin_panel
|
./fn run compile_wails_app matrix_admin_panel
|
||||||
|
|
||||||
# Directo sin fn run
|
# Directo sin fn run
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ file_path: "bash/functions/pipelines/dockerize_app.sh"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Deploy completo con basicAuth
|
# Deploy completo con basicAuth
|
||||||
cd /home/lucas/fn_registry
|
cd $HOME/fn_registry
|
||||||
bash bash/functions/pipelines/dockerize_app.sh kanban \
|
bash bash/functions/pipelines/dockerize_app.sh kanban \
|
||||||
--domain kanban.organic-machine.com \
|
--domain kanban.organic-machine.com \
|
||||||
--port 8421 \
|
--port 8421 \
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ bash bash/functions/pipelines/full_git_pull.sh
|
|||||||
|
|
||||||
## Variables de entorno
|
## Variables de entorno
|
||||||
|
|
||||||
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
|
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
|
||||||
- `FN_REGISTRY_API`, `REGISTRY_API_TOKEN` — se cargan de `pass registry/*`
|
- `FN_REGISTRY_API`, `REGISTRY_API_TOKEN` — se cargan de `pass registry/*`
|
||||||
|
|
||||||
## Notas
|
## Notas
|
||||||
|
|||||||
@@ -12,8 +12,9 @@ source "$INFRA_DIR/git_pull_with_stash.sh"
|
|||||||
source "$INFRA_DIR/pass_get.sh"
|
source "$INFRA_DIR/pass_get.sh"
|
||||||
|
|
||||||
full_git_pull() {
|
full_git_pull() {
|
||||||
# Resolver raiz del registry
|
# Resolver raiz del registry. Deriva de SCRIPT_DIR (bash/functions/pipelines/)
|
||||||
local registry_root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
|
# para funcionar en cualquier PC sin path hardcodeado.
|
||||||
|
local registry_root="${FN_REGISTRY_ROOT:-$(cd "$SCRIPT_DIR/../../.." && pwd)}"
|
||||||
cd "$registry_root"
|
cd "$registry_root"
|
||||||
|
|
||||||
echo "=== full_git_pull: inicio ===" >&2
|
echo "=== full_git_pull: inicio ===" >&2
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ bash bash/functions/pipelines/full_git_push.sh "feat: nueva funcion"
|
|||||||
|
|
||||||
## Variables de entorno
|
## Variables de entorno
|
||||||
|
|
||||||
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
|
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
|
||||||
- `GITEA_URL`, `GITEA_TOKEN` — se cargan de `pass agentes/gitea-url` y `pass gitea/dataforge-git-token`
|
- `GITEA_URL`, `GITEA_TOKEN` — se cargan de `pass agentes/gitea-url` y `pass gitea/dataforge-git-token`
|
||||||
- `FN_REGISTRY_API`, `REGISTRY_API_TOKEN` — se cargan de `pass registry/*`
|
- `FN_REGISTRY_API`, `REGISTRY_API_TOKEN` — se cargan de `pass registry/*`
|
||||||
|
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ file_path: "bash/functions/pipelines/generate_capability_doc.sh"
|
|||||||
```bash
|
```bash
|
||||||
# Regenerar tabla de notebook (ya existe, preserva Ejemplo canonico / Fronteras)
|
# Regenerar tabla de notebook (ya existe, preserva Ejemplo canonico / Fronteras)
|
||||||
./bash/functions/pipelines/generate_capability_doc.sh notebook
|
./bash/functions/pipelines/generate_capability_doc.sh notebook
|
||||||
# → /home/lucas/fn_registry/docs/capabilities/notebook.md updated (5 functions)
|
# → $HOME/fn_registry/docs/capabilities/notebook.md updated (5 functions)
|
||||||
|
|
||||||
# Crear pagina nueva para un grupo sin pagina todavia
|
# Crear pagina nueva para un grupo sin pagina todavia
|
||||||
./bash/functions/pipelines/generate_capability_doc.sh metabase
|
./bash/functions/pipelines/generate_capability_doc.sh metabase
|
||||||
# → /home/lucas/fn_registry/docs/capabilities/metabase.md created (12 functions)
|
# → $HOME/fn_registry/docs/capabilities/metabase.md created (12 functions)
|
||||||
|
|
||||||
# Especificar registry y destino custom
|
# Especificar registry y destino custom
|
||||||
./bash/functions/pipelines/generate_capability_doc.sh android \
|
./bash/functions/pipelines/generate_capability_doc.sh android \
|
||||||
@@ -49,7 +49,7 @@ file_path: "bash/functions/pipelines/generate_capability_doc.sh"
|
|||||||
# Grupo sin funciones todavia (avisa pero no falla)
|
# Grupo sin funciones todavia (avisa pero no falla)
|
||||||
./bash/functions/pipelines/generate_capability_doc.sh nuevo_grupo
|
./bash/functions/pipelines/generate_capability_doc.sh nuevo_grupo
|
||||||
# WARN: El grupo 'nuevo_grupo' no tiene funciones con ese tag en registry.db.
|
# WARN: El grupo 'nuevo_grupo' no tiene funciones con ese tag en registry.db.
|
||||||
# → /home/lucas/fn_registry/docs/capabilities/nuevo_grupo.md created (0 functions)
|
# → $HOME/fn_registry/docs/capabilities/nuevo_grupo.md created (0 functions)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Comportamiento detallado
|
## Comportamiento detallado
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REGISTRY_ROOT="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
|
REGISTRY_ROOT="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
|
||||||
|
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source "$REGISTRY_ROOT/bash/functions/infra/keepass_dump.sh"
|
source "$REGISTRY_ROOT/bash/functions/infra/keepass_dump.sh"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ params:
|
|||||||
- name: app_name
|
- name: app_name
|
||||||
desc: "Nombre de la app C++ (ej: chart_demo, registry_dashboard). Se usa para localizar el .exe en cpp/build/windows/apps/<app>/ y el destino Desktop/apps/<app>/."
|
desc: "Nombre de la app C++ (ej: chart_demo, registry_dashboard). Se usa para localizar el .exe en cpp/build/windows/apps/<app>/ y el destino Desktop/apps/<app>/."
|
||||||
- name: app_dir
|
- name: app_dir
|
||||||
desc: "Ruta absoluta al directorio fuente de la app (ej: /home/lucas/fn_registry/cpp/apps/chart_demo). Requerido para localizar enrichers/, runtime/ y app.md."
|
desc: "Ruta absoluta al directorio fuente de la app (ej: $HOME/fn_registry/cpp/apps/chart_demo). Requerido para localizar enrichers/, runtime/ y app.md."
|
||||||
- name: "--build"
|
- name: "--build"
|
||||||
desc: "Flag opcional. Si presente, compila la app para Windows antes del deploy. Por defecto off (asume .exe ya compilado)."
|
desc: "Flag opcional. Si presente, compila la app para Windows antes del deploy. Por defecto off (asume .exe ya compilado)."
|
||||||
output: "Imprime 'OK: <app_name> redeployed (build=yes/no, PID=N)' en stdout. Exit 1 en cualquier paso fallido con mensaje de error indicando el paso."
|
output: "Imprime 'OK: <app_name> redeployed (build=yes/no, PID=N)' en stdout. Exit 1 en cualquier paso fallido con mensaje de error indicando el paso."
|
||||||
@@ -37,10 +37,10 @@ output: "Imprime 'OK: <app_name> redeployed (build=yes/no, PID=N)' en stdout. Ex
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Solo redeploy (asume build ya hecho)
|
# Solo redeploy (asume build ya hecho)
|
||||||
redeploy_cpp_app_windows "registry_dashboard" "/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
|
redeploy_cpp_app_windows "registry_dashboard" "$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
|
||||||
|
|
||||||
# Con build previo
|
# Con build previo
|
||||||
redeploy_cpp_app_windows "chart_demo" "/home/lucas/fn_registry/cpp/apps/chart_demo" --build
|
redeploy_cpp_app_windows "chart_demo" "$HOME/fn_registry/cpp/apps/chart_demo" --build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Comportamiento
|
## Comportamiento
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ error_type: "error_go_core"
|
|||||||
imports: []
|
imports: []
|
||||||
params:
|
params:
|
||||||
- name: registry_db_path
|
- name: registry_db_path
|
||||||
desc: "ruta a registry.db local (default: /home/lucas/fn_registry/registry.db)"
|
desc: "ruta a registry.db local (default: $HOME/fn_registry/registry.db)"
|
||||||
- name: container_name
|
- name: container_name
|
||||||
desc: "nombre del contenedor Metabase (default: metabase)"
|
desc: "nombre del contenedor Metabase (default: metabase)"
|
||||||
- name: dest_path
|
- name: dest_path
|
||||||
@@ -40,7 +40,7 @@ file_path: "bash/functions/pipelines/setup_metabase_volume.sh"
|
|||||||
|
|
||||||
# Con argumentos explícitos
|
# Con argumentos explícitos
|
||||||
./functions/pipelines/setup_metabase_volume.sh \
|
./functions/pipelines/setup_metabase_volume.sh \
|
||||||
/home/lucas/fn_registry/registry.db \
|
$HOME/fn_registry/registry.db \
|
||||||
metabase \
|
metabase \
|
||||||
/registry.db
|
/registry.db
|
||||||
```
|
```
|
||||||
@@ -59,7 +59,7 @@ El pipeline usa `set -euo pipefail` — cualquier fallo en una función individu
|
|||||||
Las funciones individuales se sourcean desde sus rutas en el registry, relativas a `REGISTRY_ROOT` detectado automáticamente desde la ubicación del script.
|
Las funciones individuales se sourcean desde sus rutas en el registry, relativas a `REGISTRY_ROOT` detectado automáticamente desde la ubicación del script.
|
||||||
|
|
||||||
Defaults:
|
Defaults:
|
||||||
- `REGISTRY_DB_PATH`: `/home/lucas/fn_registry/registry.db`
|
- `REGISTRY_DB_PATH`: `$HOME/fn_registry/registry.db`
|
||||||
- `CONTAINER_NAME`: `metabase`
|
- `CONTAINER_NAME`: `metabase`
|
||||||
- `DEST_PATH`: `/registry.db`
|
- `DEST_PATH`: `/registry.db`
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ Nota de persistencia: `docker cp` copia al contenedor en ejecución. Si el conte
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
volumes:
|
volumes:
|
||||||
- /home/lucas/fn_registry:/fn_registry:ro
|
- $HOME/fn_registry:/fn_registry:ro
|
||||||
```
|
```
|
||||||
|
|
||||||
Y usar `--registry-db-path /fn_registry/registry.db`.
|
Y usar `--registry-db-path /fn_registry/registry.db`.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# ARGUMENTOS (opcionales, con defaults):
|
# ARGUMENTOS (opcionales, con defaults):
|
||||||
# REGISTRY_DB_PATH Ruta local al registry.db
|
# REGISTRY_DB_PATH Ruta local al registry.db
|
||||||
# Default: /home/lucas/fn_registry/registry.db
|
# Default: <raiz_del_registry>/registry.db
|
||||||
# CONTAINER_NAME Nombre del contenedor Docker de Metabase
|
# CONTAINER_NAME Nombre del contenedor Docker de Metabase
|
||||||
# Default: metabase
|
# Default: metabase
|
||||||
# DEST_PATH Ruta destino dentro del contenedor
|
# DEST_PATH Ruta destino dentro del contenedor
|
||||||
@@ -26,7 +26,7 @@ source "$REGISTRY_ROOT/bash/functions/shell/assert_command_exists.sh"
|
|||||||
source "$REGISTRY_ROOT/bash/functions/infra/assert_docker_container_running.sh"
|
source "$REGISTRY_ROOT/bash/functions/infra/assert_docker_container_running.sh"
|
||||||
source "$REGISTRY_ROOT/bash/functions/infra/docker_cp_file.sh"
|
source "$REGISTRY_ROOT/bash/functions/infra/docker_cp_file.sh"
|
||||||
|
|
||||||
REGISTRY_DB_PATH="${1:-/home/lucas/fn_registry/registry.db}"
|
REGISTRY_DB_PATH="${1:-$REGISTRY_ROOT/registry.db}"
|
||||||
CONTAINER_NAME="${2:-metabase}"
|
CONTAINER_NAME="${2:-metabase}"
|
||||||
DEST_PATH="${3:-/registry.db}"
|
DEST_PATH="${3:-/registry.db}"
|
||||||
|
|
||||||
|
|||||||
@@ -44,11 +44,11 @@ file_path: "bash/functions/pipelines/vault_audit.sh"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Auditar un vault especifico
|
# Auditar un vault especifico
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry \
|
FN_REGISTRY_ROOT=$HOME/fn_registry \
|
||||||
bash bash/functions/pipelines/vault_audit.sh turismo_spain
|
bash bash/functions/pipelines/vault_audit.sh turismo_spain
|
||||||
|
|
||||||
# Auditar todos los vaults
|
# Auditar todos los vaults
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry \
|
FN_REGISTRY_ROOT=$HOME/fn_registry \
|
||||||
bash bash/functions/pipelines/vault_audit.sh --all
|
bash bash/functions/pipelines/vault_audit.sh --all
|
||||||
|
|
||||||
# Solo layout + index + aggregate (sin profilers, mas rapido)
|
# Solo layout + index + aggregate (sin profilers, mas rapido)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ file_path: "bash/functions/shell/assert_file_exists.sh"
|
|||||||
```bash
|
```bash
|
||||||
source functions/shell/assert_file_exists.sh
|
source functions/shell/assert_file_exists.sh
|
||||||
|
|
||||||
size=$(assert_file_exists /home/lucas/fn_registry/registry.db)
|
size=$(assert_file_exists $HOME/fn_registry/registry.db)
|
||||||
echo "Tamaño: $size bytes"
|
echo "Tamaño: $size bytes"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ file_path: "bash/functions/shell/validate_registry_paths.sh"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
source validate_registry_paths.sh
|
source validate_registry_paths.sh
|
||||||
validate_registry_paths /home/lucas/fn_registry/registry.db functions /home/lucas/fn_registry
|
validate_registry_paths $HOME/fn_registry/registry.db functions $HOME/fn_registry
|
||||||
|
|
||||||
# Output (TSV):
|
# Output (TSV):
|
||||||
# cdp_click_go_browser functions/infra/cdp_click.go browser functions
|
# cdp_click_go_browser functions/infra/cdp_click.go browser functions
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ example: |
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
std::ifstream f("/home/lucas/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md");
|
std::ifstream f("$HOME/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md");
|
||||||
std::stringstream ss; ss << f.rdbuf();
|
std::stringstream ss; ss << f.rdbuf();
|
||||||
auto fm = fn_md::parse_md_frontmatter(ss.str());
|
auto fm = fn_md::parse_md_frontmatter(ss.str());
|
||||||
auto title = std::get<std::string>(fm.fields["title"]);
|
auto title = std::get<std::string>(fm.fields["title"]);
|
||||||
@@ -65,7 +65,7 @@ Cuando una app C++ necesita leer metadata de archivos Markdown del registry (iss
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
std::ifstream f("/home/lucas/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md");
|
std::ifstream f("$HOME/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md");
|
||||||
std::stringstream ss; ss << f.rdbuf();
|
std::stringstream ss; ss << f.rdbuf();
|
||||||
auto fm = fn_md::parse_md_frontmatter(ss.str());
|
auto fm = fn_md::parse_md_frontmatter(ss.str());
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ def extract_triples_spacy_es_v2(text: str, nlp: Any, resolve_pronouns: bool = Tr
|
|||||||
`.ipython/profile_default/startup/00_fn_registry.py` añade cada subdir de `python/functions/` al sys.path top-level. Como hay un `bigquery/datasets.py` en el registry, **shadows** el paquete `datasets` de HuggingFace que `transformers` necesita. Resultado: en cada notebook hay que aplicar un workaround:
|
`.ipython/profile_default/startup/00_fn_registry.py` añade cada subdir de `python/functions/` al sys.path top-level. Como hay un `bigquery/datasets.py` en el registry, **shadows** el paquete `datasets` de HuggingFace que `transformers` necesita. Resultado: en cada notebook hay que aplicar un workaround:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
_pf = '/home/lucas/fn_registry/python/functions'
|
_pf = '$HOME/fn_registry/python/functions'
|
||||||
sys.path = [p for p in sys.path if not p.startswith(_pf + '/')]
|
sys.path = [p for p in sys.path if not p.startswith(_pf + '/')]
|
||||||
if _pf not in sys.path: sys.path.insert(0, _pf)
|
if _pf not in sys.path: sys.path.insert(0, _pf)
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -693,7 +693,7 @@ Eres `agent-home-wsl`, un agente operativo conectado al PC `home-wsl` del operad
|
|||||||
por que. El operador vera la respuesta en `#home-wsl` cuando el sudo agent termine.
|
por que. El operador vera la respuesta en `#home-wsl` cuando el sudo agent termine.
|
||||||
4. **Proyectos**: para crear un proyecto nuevo, prefiere `project.create` antes que componer
|
4. **Proyectos**: para crear un proyecto nuevo, prefiere `project.create` antes que componer
|
||||||
`exec mkdir + fs.write + ...`. Es mas rapido y deja entrada en `memory.projects`.
|
`exec mkdir + fs.write + ...`. Es mas rapido y deja entrada en `memory.projects`.
|
||||||
5. **Registry**: el operador mantiene un registry de funciones en /home/lucas/fn_registry. Si la tarea
|
5. **Registry**: el operador mantiene un registry de funciones en $HOME/fn_registry. Si la tarea
|
||||||
parece composicion de funciones (ETL, scraping, parsing), pregunta al operador si ya hay algo en el
|
parece composicion de funciones (ETL, scraping, parsing), pregunta al operador si ya hay algo en el
|
||||||
registry antes de codear desde cero. (No tienes herramienta para consultar el registry directamente;
|
registry antes de codear desde cero. (No tienes herramienta para consultar el registry directamente;
|
||||||
pidele al operador que ejecute `mcp__registry__fn_search` por ti).
|
pidele al operador que ejecute `mcp__registry__fn_search` por ti).
|
||||||
@@ -818,7 +818,7 @@ Flujo:
|
|||||||
3. Si operador → "delega":
|
3. Si operador → "delega":
|
||||||
- `delegate_sudo task="registrar /home/lucas/projects/scraper-precios como app en fn_registry"`.
|
- `delegate_sudo task="registrar /home/lucas/projects/scraper-precios como app en fn_registry"`.
|
||||||
4. sudo agent ejecuta:
|
4. sudo agent ejecuta:
|
||||||
- `cd /home/lucas/fn_registry && ./fn run init_some_pipeline scraper-precios ...` (o similar — depende del scaffolder).
|
- `cd $HOME/fn_registry && ./fn run init_some_pipeline scraper-precios ...` (o similar — depende del scaffolder).
|
||||||
- Cada paso = approval individual o pre-approved si operator activo `!preapprove fn-* 10m`.
|
- Cada paso = approval individual o pre-approved si operator activo `!preapprove fn-* 10m`.
|
||||||
|
|
||||||
Esto evita que el user agent toque `fn_registry` directamente — el registry es del operador, no del agent. El agent solo orquesta cuando le piden.
|
Esto evita que el user agent toque `fn_registry` directamente — el registry es del operador, no del agent. El agent solo orquesta cuando le piden.
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ tags: []
|
|||||||
|
|
||||||
`jupyter_discover.py` reporta el campo `analysis` incorrecto. Con Jupyter corriendo desde `analysis/estudio_mercados/`, el discover devolvió `"analysis": "estudio_embeddings"`.
|
`jupyter_discover.py` reporta el campo `analysis` incorrecto. Con Jupyter corriendo desde `analysis/estudio_mercados/`, el discover devolvió `"analysis": "estudio_embeddings"`.
|
||||||
|
|
||||||
El proceso real tenía `--ServerApp.root_dir=/home/lucas/fn_registry/analysis/estudio_mercados` en su cmdline, pero el discover no lo parsea.
|
El proceso real tenía `--ServerApp.root_dir=$HOME/fn_registry/analysis/estudio_mercados` en su cmdline, pero el discover no lo parsea.
|
||||||
|
|
||||||
## Solución propuesta
|
## Solución propuesta
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ deferred -> Deferred
|
|||||||
|
|
||||||
- Frontmatter mal formado (yaml invalid): card aparece con badge `parse-error` + tooltip detalle. NO crashea backend.
|
- Frontmatter mal formado (yaml invalid): card aparece con badge `parse-error` + tooltip detalle. NO crashea backend.
|
||||||
- Cambios concurrentes: humano edita `.md` con vim mientras agente lo PATCHea via API. Usar lock file `.md.lock` corto + retry.
|
- Cambios concurrentes: humano edita `.md` con vim mientras agente lo PATCHea via API. Usar lock file `.md.lock` corto + retry.
|
||||||
- `fsnotify` no funciona bien en WSL para `/mnt/c/` paths. Backend corre en WSL, lee paths nativos (`/home/lucas/fn_registry/dev/...`). Verificar.
|
- `fsnotify` no funciona bien en WSL para `/mnt/c/` paths. Backend corre en WSL, lee paths nativos (`$HOME/fn_registry/dev/...`). Verificar.
|
||||||
- Issue / flow grandes (>500 lineas body): NO mandar full body en `/cards` (lento). Devolver solo frontmatter + primeras 5 lineas. Body completo via `/cards/<id>` on demand.
|
- Issue / flow grandes (>500 lineas body): NO mandar full body en `/cards` (lento). Devolver solo frontmatter + primeras 5 lineas. Body completo via `/cards/<id>` on demand.
|
||||||
- Cards sin `status` (frontmatter incompleto): default `pendiente`.
|
- Cards sin `status` (frontmatter incompleto): default `pendiente`.
|
||||||
- Reordenamiento manual: drag-and-drop en UI cambia status (cruzar columna) PERO no orden vertical persistente — no hay campo `order` en frontmatter. Decision: orden por `updated` desc dentro de cada columna.
|
- Reordenamiento manual: drag-and-drop en UI cambia status (cruzar columna) PERO no orden vertical persistente — no hay campo `order` en frontmatter. Decision: orden por `updated` desc dentro de cada columna.
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ e2e_checks:
|
|||||||
2. Lanzar `/autonomous-task 0120 --dry-run` para audit.
|
2. Lanzar `/autonomous-task 0120 --dry-run` para audit.
|
||||||
3. Lanzar `/autonomous-task 0120 --max-iterations 5 --max-minutes 30`.
|
3. Lanzar `/autonomous-task 0120 --max-iterations 5 --max-minutes 30`.
|
||||||
4. Recoger output: `task_run_id`, branch `auto/0120-*`, log de iteraciones, proposals aplicadas/skipped, URL del PR draft.
|
4. Recoger output: `task_run_id`, branch `auto/0120-*`, log de iteraciones, proposals aplicadas/skipped, URL del PR draft.
|
||||||
5. Verificar `git -C /home/lucas/fn_registry status --short` igual a baseline (regla 11 sandbox breach).
|
5. Verificar `git -C $HOME/fn_registry status --short` igual a baseline (regla 11 sandbox breach).
|
||||||
6. Post-mortem: si fallo en alguna iteracion, anotar en seccion `## Hallazgos` y refinar `fn-orquestador/SKILL.md` o `autonomous_loop.md` si corresponde.
|
6. Post-mortem: si fallo en alguna iteracion, anotar en seccion `## Hallazgos` y refinar `fn-orquestador/SKILL.md` o `autonomous_loop.md` si corresponde.
|
||||||
|
|
||||||
## Acceptance
|
## Acceptance
|
||||||
@@ -64,7 +64,7 @@ e2e_checks:
|
|||||||
- [ ] `apps/chart_demo/app.md` contiene bloque `e2e_checks:` con al menos `build` + `binary_exists`.
|
- [ ] `apps/chart_demo/app.md` contiene bloque `e2e_checks:` con al menos `build` + `binary_exists`.
|
||||||
- [ ] `fn-analizador` corrida sobre `chart_demo` reporta `checks_pass=checks_total` (todo verde).
|
- [ ] `fn-analizador` corrida sobre `chart_demo` reporta `checks_pass=checks_total` (todo verde).
|
||||||
- [ ] PR draft existe en Gitea con branch `auto/0120-*` apuntando a `master`.
|
- [ ] PR draft existe en Gitea con branch `auto/0120-*` apuntando a `master`.
|
||||||
- [ ] `git -C /home/lucas/fn_registry status --short` antes/despues del piloto identico (excluyendo solo este `.md` cerrado).
|
- [ ] `git -C $HOME/fn_registry status --short` antes/despues del piloto identico (excluyendo solo este `.md` cerrado).
|
||||||
- [ ] Documento de post-mortem en `## Hallazgos` con: iteraciones totales, tiempo total, proposals creadas, decisiones del orquestador.
|
- [ ] Documento de post-mortem en `## Hallazgos` con: iteraciones totales, tiempo total, proposals creadas, decisiones del orquestador.
|
||||||
|
|
||||||
## DoD
|
## DoD
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Acciones tomadas:
|
|||||||
- Clonado `apps/pipeline_launcher` desde Gitea en aurgi-pc para la investigacion; `pc_locations` pasa de `missing` a `active` tras `fn sync` futuro.
|
- Clonado `apps/pipeline_launcher` desde Gitea en aurgi-pc para la investigacion; `pc_locations` pasa de `missing` a `active` tras `fn sync` futuro.
|
||||||
|
|
||||||
Pendiente fuera de scope:
|
Pendiente fuera de scope:
|
||||||
- `apps/pipeline_launcher/go.mod` tiene `replace fn-registry => /home/lucas/fn_registry` hardcoded — el build solo funciona en home-wsl. Issue aparte si se quiere cross-PC build.
|
- `apps/pipeline_launcher/go.mod` tiene `replace fn-registry => $HOME/fn_registry` hardcoded — el build solo funciona en home-wsl. Issue aparte si se quiere cross-PC build.
|
||||||
- `fn_operations/project_template/operations.db` tiene migraciones aplicadas hasta v5, falta v6. Stale template — issue aparte.
|
- `fn_operations/project_template/operations.db` tiene migraciones aplicadas hasta v5, falta v6. Stale template — issue aparte.
|
||||||
|
|
||||||
Acceptance:
|
Acceptance:
|
||||||
|
|||||||
@@ -65,9 +65,9 @@ e2e_checks:
|
|||||||
# reconfiguracion).
|
# reconfiguracion).
|
||||||
- id: cmake_configure_linux
|
- id: cmake_configure_linux
|
||||||
cmd: >
|
cmd: >
|
||||||
test -f /home/lucas/fn_registry/cpp/build/linux/build.ninja ||
|
test -f $HOME/fn_registry/cpp/build/linux/build.ninja ||
|
||||||
cmake -S /home/lucas/fn_registry/cpp
|
cmake -S $HOME/fn_registry/cpp
|
||||||
-B /home/lucas/fn_registry/cpp/build/linux
|
-B $HOME/fn_registry/cpp/build/linux
|
||||||
-DFN_BUILD_TESTS=OFF
|
-DFN_BUILD_TESTS=OFF
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
timeout_s: 60
|
timeout_s: 60
|
||||||
@@ -77,13 +77,13 @@ e2e_checks:
|
|||||||
# y el linkado con fn_framework (app_base.cpp, GLFW, OpenGL) tiene exito.
|
# y el linkado con fn_framework (app_base.cpp, GLFW, OpenGL) tiene exito.
|
||||||
# Este es el check de compilacion base que corre en cualquier entorno.
|
# Este es el check de compilacion base que corre en cualquier entorno.
|
||||||
- id: build_linux
|
- id: build_linux
|
||||||
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/linux --target altsnap_jitter_test -j4"
|
cmd: "cmake --build $HOME/fn_registry/cpp/build/linux --target altsnap_jitter_test -j4"
|
||||||
timeout_s: 300
|
timeout_s: 300
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
# Verifica que el binario Linux existe tras el build.
|
# Verifica que el binario Linux existe tras el build.
|
||||||
- id: binary_exists_linux
|
- id: binary_exists_linux
|
||||||
cmd: "test -f /home/lucas/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test"
|
cmd: "test -f $HOME/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ e2e_checks:
|
|||||||
cmd: >
|
cmd: >
|
||||||
xvfb-run -a -s "-screen 0 1280x800x24"
|
xvfb-run -a -s "-screen 0 1280x800x24"
|
||||||
env LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe
|
env LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe
|
||||||
/home/lucas/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test
|
$HOME/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test
|
||||||
timeout_s: 60
|
timeout_s: 60
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ e2e_checks:
|
|||||||
# add_imgui_app genera altsnap_jitter_test_appicon.rc; si el .ico falta el build
|
# add_imgui_app genera altsnap_jitter_test_appicon.rc; si el .ico falta el build
|
||||||
# mingw pasa pero el .exe Windows queda sin icono embebido.
|
# mingw pasa pero el .exe Windows queda sin icono embebido.
|
||||||
- id: icon_exists
|
- id: icon_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/apps/altsnap_jitter_test/appicon.ico"
|
cmd: "test -f $HOME/fn_registry/apps/altsnap_jitter_test/appicon.ico"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|
||||||
@@ -124,9 +124,9 @@ e2e_checks:
|
|||||||
# real bajo Win32 que xvfb no puede cubrir.
|
# real bajo Win32 que xvfb no puede cubrir.
|
||||||
- id: windows_run
|
- id: windows_run
|
||||||
cmd: >
|
cmd: >
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry
|
FN_REGISTRY_ROOT=$HOME/fn_registry
|
||||||
bash -c '
|
bash -c '
|
||||||
source /home/lucas/fn_registry/bash/functions/infra/e2e_run_cpp_windows.sh
|
source $HOME/fn_registry/bash/functions/infra/e2e_run_cpp_windows.sh
|
||||||
e2e_run_cpp_windows altsnap_jitter_test
|
e2e_run_cpp_windows altsnap_jitter_test
|
||||||
'
|
'
|
||||||
timeout_s: 300
|
timeout_s: 300
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ e2e_checks:
|
|||||||
# Por que: gate esencial — si el target no compila, nada mas tiene sentido.
|
# Por que: gate esencial — si el target no compila, nada mas tiene sentido.
|
||||||
# Corre sobre el build de Windows via mingw toolchain (cross-compile desde WSL).
|
# Corre sobre el build de Windows via mingw toolchain (cross-compile desde WSL).
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cd /home/lucas/fn_registry/cpp && cmake --build build/windows --target app_hub_launcher -j"
|
cmd: "cd $HOME/fn_registry/cpp && cmake --build build/windows --target app_hub_launcher -j"
|
||||||
timeout_s: 300
|
timeout_s: 300
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ e2e_checks:
|
|||||||
# Este check verifica que el binario existe y es un archivo regular.
|
# Este check verifica que el binario existe y es un archivo regular.
|
||||||
# Si el build cross no produjo el .exe o el cp falló, este check lo detecta.
|
# Si el build cross no produjo el .exe o el cp falló, este check lo detecta.
|
||||||
- id: binary_exists
|
- id: binary_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/app_hub_launcher/app_hub_launcher.exe"
|
cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/app_hub_launcher/app_hub_launcher.exe"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ e2e_checks:
|
|||||||
# Si se borra el ico, el .exe no tiene icono embebido (no falla el build, pero rompe el
|
# Si se borra el ico, el .exe no tiene icono embebido (no falla el build, pero rompe el
|
||||||
# contrato visual de la suite). El .ico es artefacto versionado en el sub-repo.
|
# contrato visual de la suite). El .ico es artefacto versionado en el sub-repo.
|
||||||
- id: appicon_exists
|
- id: appicon_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/apps/app_hub_launcher/appicon.ico"
|
cmd: "test -f $HOME/fn_registry/apps/app_hub_launcher/appicon.ico"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ e2e_checks:
|
|||||||
# 2026-05-16 en app.md). Arreglar antes de promover a critical.
|
# 2026-05-16 en app.md). Arreglar antes de promover a critical.
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: build_frontend
|
- id: build_frontend
|
||||||
cmd: "cd /home/lucas/fn_registry/apps/dag_engine/frontend && pnpm install --frozen-lockfile && pnpm build"
|
cmd: "cd $HOME/fn_registry/apps/dag_engine/frontend && pnpm install --frozen-lockfile && pnpm build"
|
||||||
timeout_s: 180
|
timeout_s: 180
|
||||||
severity: warning
|
severity: warning
|
||||||
# NOTA: severity warning porque pnpm build falla por API drift conocido.
|
# NOTA: severity warning porque pnpm build falla por API drift conocido.
|
||||||
@@ -51,7 +51,7 @@ e2e_checks:
|
|||||||
# de trabajo (idempotente, no afecta al binario productivo).
|
# de trabajo (idempotente, no afecta al binario productivo).
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: build_backend
|
- 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 ."
|
cmd: "cd $HOME/fn_registry/apps/dag_engine && CGO_ENABLED=1 go build -tags fts5 -o /tmp/dag_engine_e2e_bin ."
|
||||||
timeout_s: 120
|
timeout_s: 120
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
@@ -64,7 +64,7 @@ e2e_checks:
|
|||||||
# NO hay flag --migrate-only en el binario actual.
|
# NO hay flag --migrate-only en el binario actual.
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: migrations_apply
|
- 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/"
|
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/fn_registry/apps/dag_engine/dags_migrated/"
|
||||||
timeout_s: 15
|
timeout_s: 15
|
||||||
expect_exit: 0
|
expect_exit: 0
|
||||||
# NOTA: depende de check build_backend (usa /tmp/dag_engine_e2e_bin).
|
# NOTA: depende de check build_backend (usa /tmp/dag_engine_e2e_bin).
|
||||||
@@ -80,7 +80,7 @@ e2e_checks:
|
|||||||
# mal referenciados, etc.).
|
# mal referenciados, etc.).
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: dag_parse_fn_backup
|
- id: dag_parse_fn_backup
|
||||||
cmd: "/tmp/dag_engine_e2e_bin validate /home/lucas/fn_registry/apps/dag_engine/dags_migrated/fn_backup.yaml"
|
cmd: "/tmp/dag_engine_e2e_bin validate $HOME/fn_registry/apps/dag_engine/dags_migrated/fn_backup.yaml"
|
||||||
timeout_s: 10
|
timeout_s: 10
|
||||||
expect_exit: 0
|
expect_exit: 0
|
||||||
expect_stdout_contains: "Validation: PASS"
|
expect_stdout_contains: "Validation: PASS"
|
||||||
@@ -93,7 +93,7 @@ e2e_checks:
|
|||||||
# topo_sort sobre un grafo no trivial.
|
# topo_sort sobre un grafo no trivial.
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: dag_parse_daily_audit
|
- 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"
|
cmd: "/tmp/dag_engine_e2e_bin validate $HOME/fn_registry/apps/dag_engine/dags_migrated/daily-registry-audit.yaml"
|
||||||
timeout_s: 10
|
timeout_s: 10
|
||||||
expect_exit: 0
|
expect_exit: 0
|
||||||
expect_stdout_contains: "Validation: PASS"
|
expect_stdout_contains: "Validation: PASS"
|
||||||
@@ -108,7 +108,7 @@ e2e_checks:
|
|||||||
# health endpoint /api/dags declarado en service.health_endpoint.
|
# health endpoint /api/dags declarado en service.health_endpoint.
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: smoke_server
|
- 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/ &"
|
cmd: "/tmp/dag_engine_e2e_bin server --port 8195 --db /tmp/dag_engine_e2e.db --dags-dir $HOME/fn_registry/apps/dag_engine/dags_migrated/ &"
|
||||||
health: "http://127.0.0.1:8195/api/dags"
|
health: "http://127.0.0.1:8195/api/dags"
|
||||||
timeout_s: 10
|
timeout_s: 10
|
||||||
# NOTA: sin flag --scheduler para no disparar jobs reales.
|
# NOTA: sin flag --scheduler para no disparar jobs reales.
|
||||||
@@ -132,6 +132,6 @@ e2e_checks:
|
|||||||
# Cuando se añadan tests: descomentar y ajustar.
|
# Cuando se añadan tests: descomentar y ajustar.
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# - id: tests
|
# - id: tests
|
||||||
# cmd: "cd /home/lucas/fn_registry/apps/dag_engine && go test -tags fts5 -count=1 ./..."
|
# cmd: "cd $HOME/fn_registry/apps/dag_engine && go test -tags fts5 -count=1 ./..."
|
||||||
# timeout_s: 120
|
# timeout_s: 120
|
||||||
# OMITIDO: sin *_test.go
|
# OMITIDO: sin *_test.go
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ e2e_checks:
|
|||||||
# build: compila el binario con CGO habilitado. Sin -tags fts5 (no lo usa el modulo).
|
# build: compila el binario con CGO habilitado. Sin -tags fts5 (no lo usa el modulo).
|
||||||
# Valida que el modulo go-sqlite3 linkea correctamente en el entorno local.
|
# Valida que el modulo go-sqlite3 linkea correctamente en el entorno local.
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cd /home/lucas/fn_registry/apps/deploy_server && CGO_ENABLED=1 go build -o /tmp/deploy_server_e2e_bin ."
|
cmd: "cd $HOME/fn_registry/apps/deploy_server && CGO_ENABLED=1 go build -o /tmp/deploy_server_e2e_bin ."
|
||||||
timeout_s: 180
|
timeout_s: 180
|
||||||
|
|
||||||
# cli_help: verifica que el binario arranca y responde sin crashear ni pedir args obligatorios.
|
# cli_help: verifica que el binario arranca y responde sin crashear ni pedir args obligatorios.
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ e2e_checks_suggested:
|
|||||||
# No conecta a Metabase — solo resuelve imports.
|
# No conecta a Metabase — solo resuelve imports.
|
||||||
- id: import
|
- id: import
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/metabase_registry &&
|
cd $HOME/fn_registry/apps/metabase_registry &&
|
||||||
/home/lucas/fn_registry/python/.venv/bin/python3 -c
|
$HOME/fn_registry/python/.venv/bin/python3 -c
|
||||||
"import sys, os;
|
"import sys, os;
|
||||||
sys.path.insert(0, os.path.join(os.getcwd(), '..', '..', 'python', 'functions'));
|
sys.path.insert(0, os.path.join(os.getcwd(), '..', '..', 'python', 'functions'));
|
||||||
from metabase import MetabaseClient, metabase_create_card, metabase_create_dashboard, metabase_update_dashboard;
|
from metabase import MetabaseClient, metabase_create_card, metabase_create_dashboard, metabase_update_dashboard;
|
||||||
@@ -49,8 +49,8 @@ e2e_checks_suggested:
|
|||||||
# argparse imprime usage sin necesitar credenciales ni conexion.
|
# argparse imprime usage sin necesitar credenciales ni conexion.
|
||||||
- id: cli_help
|
- id: cli_help
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/metabase_registry &&
|
cd $HOME/fn_registry/apps/metabase_registry &&
|
||||||
/home/lucas/fn_registry/python/.venv/bin/python3 main.py --help
|
$HOME/fn_registry/python/.venv/bin/python3 main.py --help
|
||||||
expect_stdout_contains: "metabase_registry"
|
expect_stdout_contains: "metabase_registry"
|
||||||
expect_exit: 0
|
expect_exit: 0
|
||||||
timeout_s: 10
|
timeout_s: 10
|
||||||
@@ -62,8 +62,8 @@ e2e_checks_suggested:
|
|||||||
# Detecta SyntaxError y NameError de nivel modulo antes de cualquier deploy.
|
# Detecta SyntaxError y NameError de nivel modulo antes de cualquier deploy.
|
||||||
- id: syntax_check
|
- id: syntax_check
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/metabase_registry &&
|
cd $HOME/fn_registry/apps/metabase_registry &&
|
||||||
/home/lucas/fn_registry/python/.venv/bin/python3 -m py_compile
|
$HOME/fn_registry/python/.venv/bin/python3 -m py_compile
|
||||||
main.py create_registry_dashboard.py create_apps_dashboard.py
|
main.py create_registry_dashboard.py create_apps_dashboard.py
|
||||||
create_script_navegador_dashboard.py &&
|
create_script_navegador_dashboard.py &&
|
||||||
echo "syntax OK"
|
echo "syntax OK"
|
||||||
@@ -82,11 +82,11 @@ e2e_checks_suggested:
|
|||||||
# severity: warning porque el fallo esperado viene de red, no del codigo.
|
# severity: warning porque el fallo esperado viene de red, no del codigo.
|
||||||
- id: dry_run_parser
|
- id: dry_run_parser
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/metabase_registry &&
|
cd $HOME/fn_registry/apps/metabase_registry &&
|
||||||
METABASE_URL=http://127.0.0.1:19999
|
METABASE_URL=http://127.0.0.1:19999
|
||||||
METABASE_ADMIN_EMAIL=test@example.com
|
METABASE_ADMIN_EMAIL=test@example.com
|
||||||
METABASE_ADMIN_PASSWORD=fake_password_for_e2e
|
METABASE_ADMIN_PASSWORD=fake_password_for_e2e
|
||||||
/home/lucas/fn_registry/python/.venv/bin/python3 main.py
|
$HOME/fn_registry/python/.venv/bin/python3 main.py
|
||||||
--url http://127.0.0.1:19999
|
--url http://127.0.0.1:19999
|
||||||
--admin-email test@example.com
|
--admin-email test@example.com
|
||||||
--admin-password fake_password_for_e2e
|
--admin-password fake_password_for_e2e
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ e2e_checks:
|
|||||||
# y hacer el check idempotente.
|
# y hacer el check idempotente.
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cd /home/lucas/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go build -tags fts5 -o /tmp/pipeline_launcher_e2e_bin ."
|
cmd: "cd $HOME/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go build -tags fts5 -o /tmp/pipeline_launcher_e2e_bin ."
|
||||||
timeout_s: 120
|
timeout_s: 120
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
@@ -61,7 +61,7 @@ e2e_checks:
|
|||||||
# config/ y views/ que el build check no ejercita separadamente.
|
# config/ y views/ que el build check no ejercita separadamente.
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: vet
|
- id: vet
|
||||||
cmd: "cd /home/lucas/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go vet -tags fts5 ./..."
|
cmd: "cd $HOME/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go vet -tags fts5 ./..."
|
||||||
timeout_s: 60
|
timeout_s: 60
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
@@ -78,7 +78,7 @@ e2e_checks:
|
|||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: pipelines_list_loads
|
- id: pipelines_list_loads
|
||||||
cmd: >
|
cmd: >
|
||||||
COUNT=$(sqlite3 /home/lucas/fn_registry/registry.db
|
COUNT=$(sqlite3 $HOME/fn_registry/registry.db
|
||||||
"SELECT COUNT(*) FROM functions WHERE kind='pipeline' AND tags LIKE '%launcher%';");
|
"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; }
|
[ "$COUNT" -ge 1 ] && echo "launcher_pipelines=$COUNT OK" || { echo "FAIL: no launcher pipelines found in registry.db"; exit 1; }
|
||||||
timeout_s: 10
|
timeout_s: 10
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ e2e_checks:
|
|||||||
# rompe su API de compilacion, este check lo detecta antes de que otro app falle.
|
# rompe su API de compilacion, este check lo detecta antes de que otro app falle.
|
||||||
# Actua como build gate del registry de funciones C++.
|
# Actua como build gate del registry de funciones C++.
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target primitives_gallery -j"
|
cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target primitives_gallery -j"
|
||||||
timeout_s: 300
|
timeout_s: 300
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ e2e_checks:
|
|||||||
# El build puede reportar exit 0 con -j en builds parciales sin producir binario.
|
# El build puede reportar exit 0 con -j en builds parciales sin producir binario.
|
||||||
# Sin este check, capture_mode fallaria con un mensaje de error menos claro.
|
# Sin este check, capture_mode fallaria con un mensaje de error menos claro.
|
||||||
- id: binary_exists
|
- id: binary_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe"
|
cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ e2e_checks:
|
|||||||
- id: capture_mode
|
- id: capture_mode
|
||||||
cmd: >
|
cmd: >
|
||||||
mkdir -p /tmp/primitives_gallery_e2e &&
|
mkdir -p /tmp/primitives_gallery_e2e &&
|
||||||
/home/lucas/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe
|
$HOME/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe
|
||||||
--capture /tmp/primitives_gallery_e2e
|
--capture /tmp/primitives_gallery_e2e
|
||||||
timeout_s: 120
|
timeout_s: 120
|
||||||
severity: warning
|
severity: warning
|
||||||
@@ -108,7 +108,7 @@ e2e_checks:
|
|||||||
# como recurso (.rsrc) en el .exe. Si appicon.ico falta, el build pasa
|
# como recurso (.rsrc) en el .exe. Si appicon.ico falta, el build pasa
|
||||||
# pero el .exe queda sin icono embebido (visible en Explorer + taskbar).
|
# pero el .exe queda sin icono embebido (visible en Explorer + taskbar).
|
||||||
- id: icon_exists
|
- id: icon_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/apps/primitives_gallery/appicon.ico"
|
cmd: "test -f $HOME/fn_registry/apps/primitives_gallery/appicon.ico"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ e2e_checks:
|
|||||||
# Referencia esperada: 43 entradas (conteo manual de k_demos[] en main.cpp L37-84).
|
# Referencia esperada: 43 entradas (conteo manual de k_demos[] en main.cpp L37-84).
|
||||||
- id: demos_count_static
|
- id: demos_count_static
|
||||||
cmd: >
|
cmd: >
|
||||||
count=$(grep -c '^\s*{"' /home/lucas/fn_registry/apps/primitives_gallery/main.cpp);
|
count=$(grep -c '^\s*{"' $HOME/fn_registry/apps/primitives_gallery/main.cpp);
|
||||||
echo "DemoEntry count in source: $count";
|
echo "DemoEntry count in source: $count";
|
||||||
test "$count" -ge 43
|
test "$count" -ge 43
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ e2e_checks:
|
|||||||
# apunta a ../../ (raiz del registry), por lo que el build debe lanzarse
|
# apunta a ../../ (raiz del registry), por lo que el build debe lanzarse
|
||||||
# desde dentro del directorio de la app.
|
# desde dentro del directorio de la app.
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cd /home/lucas/fn_registry/apps/registry_api && CGO_ENABLED=1 go build -tags fts5 -o registry_api ."
|
cmd: "cd $HOME/fn_registry/apps/registry_api && CGO_ENABLED=1 go build -tags fts5 -o registry_api ."
|
||||||
timeout_s: 120
|
timeout_s: 120
|
||||||
severity: critical
|
severity: critical
|
||||||
# por que: sin binario el resto de checks no tiene sentido; fallo de build
|
# por que: sin binario el resto de checks no tiene sentido; fallo de build
|
||||||
@@ -43,7 +43,7 @@ e2e_checks:
|
|||||||
# /api/status. Puerto 8521 (!=8420 prod, !=8420 dev) para no colisionar.
|
# /api/status. Puerto 8521 (!=8420 prod, !=8420 dev) para no colisionar.
|
||||||
# El proceso en background se mata al terminar la suite por fn-analizador.
|
# El proceso en background se mata al terminar la suite por fn-analizador.
|
||||||
- id: smoke
|
- id: smoke
|
||||||
cmd: "/home/lucas/fn_registry/apps/registry_api/registry_api -port 8521 -db /tmp/registry_api_e2e.db &"
|
cmd: "$HOME/fn_registry/apps/registry_api/registry_api -port 8521 -db /tmp/registry_api_e2e.db &"
|
||||||
health: "http://127.0.0.1:8521/api/status"
|
health: "http://127.0.0.1:8521/api/status"
|
||||||
timeout_s: 10
|
timeout_s: 10
|
||||||
severity: critical
|
severity: critical
|
||||||
@@ -91,7 +91,7 @@ e2e_checks:
|
|||||||
- id: auth_check
|
- id: auth_check
|
||||||
cmd: >
|
cmd: >
|
||||||
REGISTRY_API_TOKEN=real-secret
|
REGISTRY_API_TOKEN=real-secret
|
||||||
/home/lucas/fn_registry/apps/registry_api/registry_api -port 8522 -db /tmp/registry_api_e2e_auth.db &
|
$HOME/fn_registry/apps/registry_api/registry_api -port 8522 -db /tmp/registry_api_e2e_auth.db &
|
||||||
sleep 1 &&
|
sleep 1 &&
|
||||||
STATUS=$(curl -s -o /dev/null -w '%{http_code}'
|
STATUS=$(curl -s -o /dev/null -w '%{http_code}'
|
||||||
-X POST http://127.0.0.1:8522/api/sync
|
-X POST http://127.0.0.1:8522/api/sync
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
# (antes del primer "##" de prosa).
|
# (antes del primer "##" de prosa).
|
||||||
# 2. El check 'build' asume que el directorio cpp/build/linux existe y cmake
|
# 2. El check 'build' asume que el directorio cpp/build/linux existe y cmake
|
||||||
# fue configurado previamente. Si no: anteponer
|
# fue configurado previamente. Si no: anteponer
|
||||||
# "cmake -B /home/lucas/fn_registry/cpp/build/linux -S /home/lucas/fn_registry/cpp &&"
|
# "cmake -B $HOME/fn_registry/cpp/build/linux -S $HOME/fn_registry/cpp &&"
|
||||||
# al cmd o usar el check 'build_configure' (opcional, ver abajo).
|
# al cmd o usar el check 'build_configure' (opcional, ver abajo).
|
||||||
# 3. El check 'integration_sqlite_direct' requiere que registry.db exista en
|
# 3. El check 'integration_sqlite_direct' requiere que registry.db exista en
|
||||||
# la raiz del repo. En CI, puede copiarse de un fixture o generarse con
|
# la raiz del repo. En CI, puede copiarse de un fixture o generarse con
|
||||||
@@ -62,7 +62,7 @@ e2e_checks:
|
|||||||
# CGO no aplica (es C++, no Go). FTS5 se compila via SQLITE_ENABLE_FTS5
|
# CGO no aplica (es C++, no Go). FTS5 se compila via SQLITE_ENABLE_FTS5
|
||||||
# en la amalgamation vendoreada (CMakeLists.txt lo setea).
|
# en la amalgamation vendoreada (CMakeLists.txt lo setea).
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/linux --target registry_dashboard -j$(nproc)"
|
cmd: "cmake --build $HOME/fn_registry/cpp/build/linux --target registry_dashboard -j$(nproc)"
|
||||||
timeout_s: 300
|
timeout_s: 300
|
||||||
severity: critical
|
severity: critical
|
||||||
# por que: la app enlaza ~20 funciones del registry C++ + sqlite + ws_client.
|
# por que: la app enlaza ~20 funciones del registry C++ + sqlite + ws_client.
|
||||||
@@ -74,7 +74,7 @@ e2e_checks:
|
|||||||
# Confirma que el binario existe y es ejecutable tras el build.
|
# Confirma que el binario existe y es ejecutable tras el build.
|
||||||
# Tambien verifica la version de symbols minimos esperados (sin linkage roto).
|
# Tambien verifica la version de symbols minimos esperados (sin linkage roto).
|
||||||
- id: verify_binary
|
- id: verify_binary
|
||||||
cmd: "test -x /home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard && /home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard --help 2>&1 || true"
|
cmd: "test -x $HOME/fn_registry/cpp/build/linux/apps/registry_dashboard && $HOME/fn_registry/cpp/build/linux/apps/registry_dashboard --help 2>&1 || true"
|
||||||
expect_exit: 0
|
expect_exit: 0
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: critical
|
severity: critical
|
||||||
@@ -93,8 +93,8 @@ e2e_checks:
|
|||||||
- id: integration_sqlite_direct
|
- id: integration_sqlite_direct
|
||||||
cmd: >
|
cmd: >
|
||||||
DISPLAY="" timeout 3
|
DISPLAY="" timeout 3
|
||||||
/home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard
|
$HOME/fn_registry/cpp/build/linux/apps/registry_dashboard
|
||||||
/home/lucas/fn_registry/registry.db
|
$HOME/fn_registry/registry.db
|
||||||
2>&1 | head -5
|
2>&1 | head -5
|
||||||
expect_exit: 1
|
expect_exit: 1
|
||||||
timeout_s: 10
|
timeout_s: 10
|
||||||
@@ -116,7 +116,7 @@ e2e_checks:
|
|||||||
# Actua como pre-condicion para integration_sqlite_direct.
|
# Actua como pre-condicion para integration_sqlite_direct.
|
||||||
- id: data_schema_check
|
- id: data_schema_check
|
||||||
cmd: >
|
cmd: >
|
||||||
sqlite3 /home/lucas/fn_registry/registry.db
|
sqlite3 $HOME/fn_registry/registry.db
|
||||||
"SELECT COUNT(*) FROM sqlite_master WHERE type='table'
|
"SELECT COUNT(*) FROM sqlite_master WHERE type='table'
|
||||||
AND name IN ('functions','types','apps','analysis','proposals','unit_tests');"
|
AND name IN ('functions','types','apps','analysis','proposals','unit_tests');"
|
||||||
expect_stdout_contains: "6"
|
expect_stdout_contains: "6"
|
||||||
@@ -133,7 +133,7 @@ e2e_checks:
|
|||||||
# via HTTP, pero aqui queremos detectar schema drift independientemente.
|
# via HTTP, pero aqui queremos detectar schema drift independientemente.
|
||||||
- id: call_monitor_schema_check
|
- id: call_monitor_schema_check
|
||||||
cmd: >
|
cmd: >
|
||||||
sqlite3 /home/lucas/fn_registry/projects/fn_monitoring/apps/call_monitor/operations.db
|
sqlite3 $HOME/fn_registry/projects/fn_monitoring/apps/call_monitor/operations.db
|
||||||
"SELECT COUNT(*) FROM sqlite_master WHERE type='table'
|
"SELECT COUNT(*) FROM sqlite_master WHERE type='table'
|
||||||
AND name IN ('calls','violations','sessions');"
|
AND name IN ('calls','violations','sessions');"
|
||||||
expect_stdout_contains: "3"
|
expect_stdout_contains: "3"
|
||||||
@@ -151,7 +151,7 @@ e2e_checks:
|
|||||||
# WsClient sin actualizar todos los call sites.
|
# WsClient sin actualizar todos los call sites.
|
||||||
- id: ws_client_compile_check
|
- id: ws_client_compile_check
|
||||||
cmd: >
|
cmd: >
|
||||||
cmake --build /home/lucas/fn_registry/cpp/build/linux
|
cmake --build $HOME/fn_registry/cpp/build/linux
|
||||||
--target registry_dashboard -j$(nproc) -- --warn-undefined-functions
|
--target registry_dashboard -j$(nproc) -- --warn-undefined-functions
|
||||||
2>&1 | grep -i "ws_client" | grep -i "error" || true
|
2>&1 | grep -i "ws_client" | grep -i "error" || true
|
||||||
expect_stdout_contains: ""
|
expect_stdout_contains: ""
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ e2e_checks:
|
|||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
- id: build
|
- id: build
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/registry_mcp &&
|
cd $HOME/fn_registry/apps/registry_mcp &&
|
||||||
CGO_ENABLED=1 go build -tags fts5 -o registry_mcp .
|
CGO_ENABLED=1 go build -tags fts5 -o registry_mcp .
|
||||||
timeout_s: 120
|
timeout_s: 120
|
||||||
severity: critical
|
severity: critical
|
||||||
@@ -64,7 +64,7 @@ e2e_checks:
|
|||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
- id: tests
|
- id: tests
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/registry_mcp &&
|
cd $HOME/fn_registry/apps/registry_mcp &&
|
||||||
CGO_ENABLED=1 go test -tags fts5 -count=1 -timeout 60s ./...
|
CGO_ENABLED=1 go test -tags fts5 -count=1 -timeout 60s ./...
|
||||||
timeout_s: 90
|
timeout_s: 90
|
||||||
severity: critical
|
severity: critical
|
||||||
@@ -80,7 +80,7 @@ e2e_checks:
|
|||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
- id: naming_reject
|
- id: naming_reject
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/registry_mcp &&
|
cd $HOME/fn_registry/apps/registry_mcp &&
|
||||||
CGO_ENABLED=1 go test -tags fts5 -count=1 -run TestValidateName -v 2>&1 |
|
CGO_ENABLED=1 go test -tags fts5 -count=1 -run TestValidateName -v 2>&1 |
|
||||||
grep -q "PASS"
|
grep -q "PASS"
|
||||||
timeout_s: 30
|
timeout_s: 30
|
||||||
@@ -98,10 +98,10 @@ e2e_checks:
|
|||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
- id: mcp_handshake_stdio
|
- id: mcp_handshake_stdio
|
||||||
cmd: |
|
cmd: |
|
||||||
BINARY=/home/lucas/fn_registry/apps/registry_mcp/registry_mcp
|
BINARY=$HOME/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"}}}'
|
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" \
|
RESPONSE=$(echo "$PAYLOAD" | timeout 5 "$BINARY" \
|
||||||
--registry-root /home/lucas/fn_registry \
|
--registry-root $HOME/fn_registry \
|
||||||
--log-level error \
|
--log-level error \
|
||||||
2>/dev/null | head -n1)
|
2>/dev/null | head -n1)
|
||||||
echo "response: $RESPONSE"
|
echo "response: $RESPONSE"
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ e2e_checks:
|
|||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# CHECK 1: build
|
# CHECK 1: build
|
||||||
# Por que: verifica que el modulo Go compila con CGO (go-sqlite3) y las
|
# Por que: verifica que el modulo Go compila con CGO (go-sqlite3) y las
|
||||||
# dependencias del registry (replace fn-registry => /home/lucas/fn_registry).
|
# dependencias del registry (replace fn-registry => $HOME/fn_registry).
|
||||||
# Sin esto nada funciona. El binario se deja en /tmp para no contaminar el dir.
|
# Sin esto nada funciona. El binario se deja en /tmp para no contaminar el dir.
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: build
|
- id: build
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/script_navegador &&
|
cd $HOME/fn_registry/apps/script_navegador &&
|
||||||
CGO_ENABLED=1 go build -tags fts5 -o /tmp/script_navegador_e2e .
|
CGO_ENABLED=1 go build -tags fts5 -o /tmp/script_navegador_e2e .
|
||||||
timeout_s: 120
|
timeout_s: 120
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ e2e_checks:
|
|||||||
- id: syntax_yaml
|
- id: syntax_yaml
|
||||||
cmd: >
|
cmd: >
|
||||||
/tmp/script_navegador_e2e
|
/tmp/script_navegador_e2e
|
||||||
--script /home/lucas/fn_registry/apps/script_navegador/examples/busqueda_google.yaml
|
--script $HOME/fn_registry/apps/script_navegador/examples/busqueda_google.yaml
|
||||||
--port 19222
|
--port 19222
|
||||||
2>&1 || true
|
2>&1 || true
|
||||||
expect_stdout_contains: "busqueda_google"
|
expect_stdout_contains: "busqueda_google"
|
||||||
@@ -84,7 +84,7 @@ e2e_checks:
|
|||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: ops_schema
|
- id: ops_schema
|
||||||
cmd: >
|
cmd: >
|
||||||
sqlite3 /home/lucas/fn_registry/apps/script_navegador/operations.db
|
sqlite3 $HOME/fn_registry/apps/script_navegador/operations.db
|
||||||
"SELECT name FROM sqlite_master WHERE type='table'
|
"SELECT name FROM sqlite_master WHERE type='table'
|
||||||
AND name IN ('entities','relations','executions','logs','assertions','assertion_results')
|
AND name IN ('entities','relations','executions','logs','assertions','assertion_results')
|
||||||
ORDER BY name;" 2>/dev/null
|
ORDER BY name;" 2>/dev/null
|
||||||
@@ -116,6 +116,6 @@ e2e_checks:
|
|||||||
# No hay archivos *_test.go en el directorio. Si se anaden en el futuro,
|
# No hay archivos *_test.go en el directorio. Si se anaden en el futuro,
|
||||||
# agregar:
|
# agregar:
|
||||||
# - id: tests
|
# - id: tests
|
||||||
# cmd: "cd /home/lucas/fn_registry/apps/script_navegador && go test -count=1 ./..."
|
# cmd: "cd $HOME/fn_registry/apps/script_navegador && go test -count=1 ./..."
|
||||||
# timeout_s: 60
|
# timeout_s: 60
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ e2e_checks:
|
|||||||
# pero el flag no rompe nada y evita confusion futura si se añade FTS).
|
# pero el flag no rompe nada y evita confusion futura si se añade FTS).
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cd /home/lucas/fn_registry/apps/services_api && CGO_ENABLED=1 go build -o services_api ."
|
cmd: "cd $HOME/fn_registry/apps/services_api && CGO_ENABLED=1 go build -o services_api ."
|
||||||
timeout_s: 120
|
timeout_s: 120
|
||||||
severity: critical
|
severity: critical
|
||||||
# por que: si no compila no hay nada que probar
|
# por que: si no compila no hay nada que probar
|
||||||
@@ -47,11 +47,11 @@ e2e_checks:
|
|||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: smoke_once
|
- id: smoke_once
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/services_api &&
|
cd $HOME/fn_registry/apps/services_api &&
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry
|
FN_REGISTRY_ROOT=$HOME/fn_registry
|
||||||
./services_api
|
./services_api
|
||||||
--once
|
--once
|
||||||
--registry /home/lucas/fn_registry
|
--registry $HOME/fn_registry
|
||||||
--db /tmp/services_api_e2e.db
|
--db /tmp/services_api_e2e.db
|
||||||
--bind 127.0.0.1:8585
|
--bind 127.0.0.1:8585
|
||||||
timeout_s: 45
|
timeout_s: 45
|
||||||
@@ -67,10 +67,10 @@ e2e_checks:
|
|||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
- id: smoke_health
|
- id: smoke_health
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry/apps/services_api &&
|
cd $HOME/fn_registry/apps/services_api &&
|
||||||
./services_api
|
./services_api
|
||||||
--bind 127.0.0.1:8585
|
--bind 127.0.0.1:8585
|
||||||
--registry /home/lucas/fn_registry
|
--registry $HOME/fn_registry
|
||||||
--db /tmp/services_api_e2e_http.db
|
--db /tmp/services_api_e2e_http.db
|
||||||
--interval 300s &
|
--interval 300s &
|
||||||
health: "http://127.0.0.1:8585/api/health"
|
health: "http://127.0.0.1:8585/api/health"
|
||||||
@@ -124,7 +124,7 @@ e2e_checks:
|
|||||||
# No existen *_test.go en apps/services_api. Activar cuando se añadan.
|
# No existen *_test.go en apps/services_api. Activar cuando se añadan.
|
||||||
#
|
#
|
||||||
# - id: tests
|
# - id: tests
|
||||||
# cmd: "cd /home/lucas/fn_registry/apps/services_api && CGO_ENABLED=1 go test -count=1 ./..."
|
# cmd: "cd $HOME/fn_registry/apps/services_api && CGO_ENABLED=1 go test -count=1 ./..."
|
||||||
# timeout_s: 120
|
# timeout_s: 120
|
||||||
# severity: critical
|
# severity: critical
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ e2e_checks:
|
|||||||
# (data_table::render, issue 0097) y ws2_32 en WIN32.
|
# (data_table::render, issue 0097) y ws2_32 en WIN32.
|
||||||
# Detecta regresiones de API en data_table o cambios de firma en http_client.h.
|
# Detecta regresiones de API en data_table o cambios de firma en http_client.h.
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target services_monitor -j"
|
cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target services_monitor -j"
|
||||||
timeout_s: 300
|
timeout_s: 300
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ e2e_checks:
|
|||||||
# (ha ocurrido con fn_module_data_table cuando el target es condicional via
|
# (ha ocurrido con fn_module_data_table cuando el target es condicional via
|
||||||
# if(TARGET fn_module_data_table) sin hacer REQUIRED).
|
# if(TARGET fn_module_data_table) sin hacer REQUIRED).
|
||||||
- id: binary_exists
|
- id: binary_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/services_monitor/services_monitor.exe"
|
cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/services_monitor/services_monitor.exe"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ e2e_checks:
|
|||||||
# si el .ico falta el build pasa pero el .exe queda sin icono (phosphor=pulse
|
# si el .ico falta el build pasa pero el .exe queda sin icono (phosphor=pulse
|
||||||
# accent=#10b981 segun app.md). Visible al copiar a Desktop/apps/.
|
# accent=#10b981 segun app.md). Visible al copiar a Desktop/apps/.
|
||||||
- id: icon_exists
|
- id: icon_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/apps/services_monitor/appicon.ico"
|
cmd: "test -f $HOME/fn_registry/apps/services_monitor/appicon.ico"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ e2e_checks:
|
|||||||
# Es el check mas valioso: detecta regresiones de API en cualquiera de las
|
# Es el check mas valioso: detecta regresiones de API en cualquiera de las
|
||||||
# 19 funciones del registry que usa la app.
|
# 19 funciones del registry que usa la app.
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target shaders_lab -j"
|
cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target shaders_lab -j"
|
||||||
timeout_s: 300
|
timeout_s: 300
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ e2e_checks:
|
|||||||
# Detecta casos donde cmake reporta exit 0 pero el linker no produjo binario
|
# Detecta casos donde cmake reporta exit 0 pero el linker no produjo binario
|
||||||
# (muy raro con mingw-w64 pero ha ocurrido en builds parciales con -j).
|
# (muy raro con mingw-w64 pero ha ocurrido en builds parciales con -j).
|
||||||
- id: binary_exists
|
- id: binary_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/shaders_lab/shaders_lab.exe"
|
cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/shaders_lab/shaders_lab.exe"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -42,6 +42,6 @@ e2e_checks:
|
|||||||
# si el .ico falta el build pasa pero el .exe queda sin icono embebido
|
# si el .ico falta el build pasa pero el .exe queda sin icono embebido
|
||||||
# (visible al deploy a /mnt/c/.../Desktop/apps/).
|
# (visible al deploy a /mnt/c/.../Desktop/apps/).
|
||||||
- id: icon_exists
|
- id: icon_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/apps/shaders_lab/appicon.ico"
|
cmd: "test -f $HOME/fn_registry/apps/shaders_lab/appicon.ico"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ e2e_checks:
|
|||||||
# El binario resultante es el mismo que usa el systemd unit.
|
# El binario resultante es el mismo que usa el systemd unit.
|
||||||
# Correr desde la raiz del repo porque go.mod vive ahi.
|
# Correr desde la raiz del repo porque go.mod vive ahi.
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry &&
|
cd $HOME/fn_registry &&
|
||||||
CGO_ENABLED=1 go build -tags fts5
|
CGO_ENABLED=1 go build -tags fts5
|
||||||
-o projects/fn_monitoring/apps/sqlite_api/sqlite_api
|
-o projects/fn_monitoring/apps/sqlite_api/sqlite_api
|
||||||
./projects/fn_monitoring/apps/sqlite_api/
|
./projects/fn_monitoring/apps/sqlite_api/
|
||||||
@@ -35,7 +35,7 @@ e2e_checks:
|
|||||||
# DiscoverDatabases, /tables, /schema, 404 para DB inexistente.
|
# DiscoverDatabases, /tables, /schema, 404 para DB inexistente.
|
||||||
# Usan DB en t.TempDir() — totalmente efimeros.
|
# Usan DB en t.TempDir() — totalmente efimeros.
|
||||||
cmd: >
|
cmd: >
|
||||||
cd /home/lucas/fn_registry &&
|
cd $HOME/fn_registry &&
|
||||||
CGO_ENABLED=1 go test -tags fts5 -count=1 -v
|
CGO_ENABLED=1 go test -tags fts5 -count=1 -v
|
||||||
./projects/fn_monitoring/apps/sqlite_api/
|
./projects/fn_monitoring/apps/sqlite_api/
|
||||||
timeout_s: 60
|
timeout_s: 60
|
||||||
@@ -48,8 +48,8 @@ e2e_checks:
|
|||||||
# encuentre registry.db real (necesario para /api/databases).
|
# encuentre registry.db real (necesario para /api/databases).
|
||||||
# El proceso queda en background; fn-analizador lo mata al terminar.
|
# El proceso queda en background; fn-analizador lo mata al terminar.
|
||||||
cmd: >
|
cmd: >
|
||||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry
|
FN_REGISTRY_ROOT=$HOME/fn_registry
|
||||||
/home/lucas/fn_registry/projects/fn_monitoring/apps/sqlite_api/sqlite_api
|
$HOME/fn_registry/projects/fn_monitoring/apps/sqlite_api/sqlite_api
|
||||||
--bind 127.0.0.1:8684
|
--bind 127.0.0.1:8684
|
||||||
--data-factory-db /tmp/sqlite_api_e2e_df.db &
|
--data-factory-db /tmp/sqlite_api_e2e_df.db &
|
||||||
health: "http://127.0.0.1:8684/api/databases"
|
health: "http://127.0.0.1:8684/api/databases"
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ e2e_checks:
|
|||||||
# los tabs, (c) ninguna TU del modulo rompe ODR.
|
# los tabs, (c) ninguna TU del modulo rompe ODR.
|
||||||
# Es el build gate de data_table v2.0+ para issue 0081 BeginTable migration.
|
# Es el build gate de data_table v2.0+ para issue 0081 BeginTable migration.
|
||||||
- id: build
|
- id: build
|
||||||
cmd: "cmake --build /home/lucas/fn_registry/cpp/build --target tables_qa -j"
|
cmd: "cmake --build $HOME/fn_registry/cpp/build --target tables_qa -j"
|
||||||
timeout_s: 300
|
timeout_s: 300
|
||||||
severity: critical
|
severity: critical
|
||||||
# Nota: si fn_module_data_table aun no esta buildado, cmake lo buildara como
|
# Nota: si fn_module_data_table aun no esta buildado, cmake lo buildara como
|
||||||
@@ -67,7 +67,7 @@ e2e_checks:
|
|||||||
# cmake --build puede retornar exit 0 en rebuilds parciales sin producir binario
|
# cmake --build puede retornar exit 0 en rebuilds parciales sin producir binario
|
||||||
# si el target ya esta up-to-date pero el archivo fue borrado manualmente.
|
# si el target ya esta up-to-date pero el archivo fue borrado manualmente.
|
||||||
- id: binary_exists
|
- id: binary_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/cpp/build/apps/tables_qa/tables_qa"
|
cmd: "test -f $HOME/fn_registry/cpp/build/apps/tables_qa/tables_qa"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: critical
|
severity: critical
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ e2e_checks:
|
|||||||
# implemente --self-test real con imgui_test_engine, ascender a critical y
|
# implemente --self-test real con imgui_test_engine, ascender a critical y
|
||||||
# añadir expect_stdout_contains para verificar resultados concretos.
|
# añadir expect_stdout_contains para verificar resultados concretos.
|
||||||
- id: self_test_stub
|
- id: self_test_stub
|
||||||
cmd: "/home/lucas/fn_registry/cpp/build/apps/tables_qa/tables_qa --self-test"
|
cmd: "$HOME/fn_registry/cpp/build/apps/tables_qa/tables_qa --self-test"
|
||||||
timeout_s: 15
|
timeout_s: 15
|
||||||
expect_exit: 0
|
expect_exit: 0
|
||||||
expect_stdout_contains: "SKIPPED"
|
expect_stdout_contains: "SKIPPED"
|
||||||
@@ -94,7 +94,7 @@ e2e_checks:
|
|||||||
# Windows queda sin icono embebido. Fallo aqui detecta borrado accidental
|
# Windows queda sin icono embebido. Fallo aqui detecta borrado accidental
|
||||||
# del .ico antes de cross-compile.
|
# del .ico antes de cross-compile.
|
||||||
- id: icon_exists
|
- id: icon_exists
|
||||||
cmd: "test -f /home/lucas/fn_registry/apps/tables_qa/appicon.ico"
|
cmd: "test -f $HOME/fn_registry/apps/tables_qa/appicon.ico"
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ e2e_checks:
|
|||||||
# Cuenta "render_" en tabs.h como proxy del numero de tabs declarados.
|
# Cuenta "render_" en tabs.h como proxy del numero de tabs declarados.
|
||||||
- id: tabs_declared
|
- id: tabs_declared
|
||||||
cmd: >
|
cmd: >
|
||||||
count=$(grep -c 'render_' /home/lucas/fn_registry/apps/tables_qa/tabs.h 2>/dev/null);
|
count=$(grep -c 'render_' $HOME/fn_registry/apps/tables_qa/tabs.h 2>/dev/null);
|
||||||
echo "render_ declarations in tabs.h: $count";
|
echo "render_ declarations in tabs.h: $count";
|
||||||
test "$count" -ge 10
|
test "$count" -ge 10
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
@@ -121,7 +121,7 @@ e2e_checks:
|
|||||||
# Este check estático es mas rapido que el build completo y da feedback antes.
|
# Este check estático es mas rapido que el build completo y da feedback antes.
|
||||||
- id: cmakelists_tab_srcs
|
- id: cmakelists_tab_srcs
|
||||||
cmd: >
|
cmd: >
|
||||||
count=$(grep -c '^ tab_' /home/lucas/fn_registry/apps/tables_qa/CMakeLists.txt 2>/dev/null);
|
count=$(grep -c '^ tab_' $HOME/fn_registry/apps/tables_qa/CMakeLists.txt 2>/dev/null);
|
||||||
echo "tab_*.cpp in CMakeLists: $count";
|
echo "tab_*.cpp in CMakeLists: $count";
|
||||||
test "$count" -ge 10
|
test "$count" -ge 10
|
||||||
timeout_s: 5
|
timeout_s: 5
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cfg := infra.WorktreeLaunchConfig{
|
cfg := infra.WorktreeLaunchConfig{
|
||||||
RepoRoot: "/home/lucas/fn_registry",
|
RepoRoot: "$HOME/fn_registry",
|
||||||
Branch: "auto/0115-worktree-launcher-fn",
|
Branch: "auto/0115-worktree-launcher-fn",
|
||||||
WorktreePath: "/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn",
|
WorktreePath: "$HOME/fn_registry/worktrees/0115-worktree-launcher-fn",
|
||||||
Prompt: "Implement issue 0115 — worktree launcher Go function",
|
Prompt: "Implement issue 0115 — worktree launcher Go function",
|
||||||
LogPath: "/tmp/claude-0115.log",
|
LogPath: "/tmp/claude-0115.log",
|
||||||
SkipPerms: true,
|
SkipPerms: true,
|
||||||
@@ -49,7 +49,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validar DoD del issue antes de cerrarlo
|
// Validar DoD del issue antes de cerrarlo
|
||||||
report, _ := infra.AuditDodSchema("/home/lucas/fn_registry/dev/issues", "")
|
report, _ := infra.AuditDodSchema("$HOME/fn_registry/dev/issues", "")
|
||||||
fmt.Printf("dod: %d items, %d invalid\n", report.TotalItems, report.InvalidItems)
|
fmt.Printf("dod: %d items, %d invalid\n", report.TotalItems, report.InvalidItems)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ source bash/functions/infra/launch_cpp_app_windows.sh
|
|||||||
source bash/functions/infra/is_cpp_app_running_windows.sh
|
source bash/functions/infra/is_cpp_app_running_windows.sh
|
||||||
|
|
||||||
deploy_cpp_exe_to_windows "registry_dashboard" \
|
deploy_cpp_exe_to_windows "registry_dashboard" \
|
||||||
"/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
|
"$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
|
||||||
launch_cpp_app_windows "registry_dashboard"
|
launch_cpp_app_windows "registry_dashboard"
|
||||||
sleep 1
|
sleep 1
|
||||||
if is_cpp_app_running_windows "registry_dashboard"; then
|
if is_cpp_app_running_windows "registry_dashboard"; then
|
||||||
@@ -43,11 +43,11 @@ source bash/functions/pipelines/redeploy_cpp_app_windows.sh
|
|||||||
|
|
||||||
# Sin recompilar
|
# Sin recompilar
|
||||||
redeploy_cpp_app_windows "registry_dashboard" \
|
redeploy_cpp_app_windows "registry_dashboard" \
|
||||||
"/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
|
"$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
|
||||||
|
|
||||||
# Con recompilacion previa
|
# Con recompilacion previa
|
||||||
redeploy_cpp_app_windows "chart_demo" \
|
redeploy_cpp_app_windows "chart_demo" \
|
||||||
"/home/lucas/fn_registry/cpp/apps/chart_demo" --build
|
"$HOME/fn_registry/cpp/apps/chart_demo" --build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Comprobar si esta vivo antes de decidir
|
### Comprobar si esta vivo antes de decidir
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Funciones de diagnostico read-only del registry y sus artefactos. Componen `fn d
|
|||||||
// reciben registryRoot (raiz del repo) y retornan slice de resultados + error.
|
// reciben registryRoot (raiz del repo) y retornan slice de resultados + error.
|
||||||
import "fn-registry/functions/infra"
|
import "fn-registry/functions/infra"
|
||||||
|
|
||||||
audits, err := infra.AuditCapabilityGroups("/home/lucas/fn_registry")
|
audits, err := infra.AuditCapabilityGroups("$HOME/fn_registry")
|
||||||
if err != nil { log.Fatal(err) }
|
if err != nil { log.Fatal(err) }
|
||||||
for _, a := range audits {
|
for _, a := range audits {
|
||||||
if !a.OK { fmt.Printf("%s: %v\n", a.Group, a.Issues) }
|
if !a.OK { fmt.Printf("%s: %v\n", a.Group, a.Issues) }
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ Operaciones git y Gitea: descubrir repos, clonar, commit, push/pull, hooks, gest
|
|||||||
# analysis domain_coverage_gaps [cloned]
|
# analysis domain_coverage_gaps [cloned]
|
||||||
#
|
#
|
||||||
# Siguiente paso sugerido:
|
# Siguiente paso sugerido:
|
||||||
# cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync
|
# cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync
|
||||||
|
|
||||||
CGO_ENABLED=1 ./fn index && ./fn sync
|
CGO_ENABLED=1 ./fn index && ./fn sync
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ Cluster de funciones para leer, escribir y vigilar los archivos `dev/issues/*.md
|
|||||||
import "fn-registry/functions/infra"
|
import "fn-registry/functions/infra"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
issuesDir = "/home/lucas/fn_registry/dev/issues"
|
issuesDir = "$HOME/fn_registry/dev/issues"
|
||||||
flowsDir = "/home/lucas/fn_registry/dev/flows"
|
flowsDir = "$HOME/fn_registry/dev/flows"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 1. Carga inicial
|
// 1. Carga inicial
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ hooks:
|
|||||||
```yaml
|
```yaml
|
||||||
name: backup_diario
|
name: backup_diario
|
||||||
schedule: "0 2 * * *"
|
schedule: "0 2 * * *"
|
||||||
working_dir: /home/lucas/fn_registry/apps/mi_app
|
working_dir: $HOME/fn_registry/apps/mi_app
|
||||||
steps:
|
steps:
|
||||||
- name: backup
|
- name: backup
|
||||||
function: backup_db_bash_pipelines
|
function: backup_db_bash_pipelines
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ file_path: "functions/infra/agent_cleanup_worktree.go"
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
err := infra.AgentCleanupWorktree(
|
err := infra.AgentCleanupWorktree(
|
||||||
"/home/lucas/fn_registry",
|
"$HOME/fn_registry",
|
||||||
"auto/0115-worktree-launcher-fn",
|
"auto/0115-worktree-launcher-fn",
|
||||||
"/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn",
|
"$HOME/fn_registry/worktrees/0115-worktree-launcher-fn",
|
||||||
12345, // PID devuelto por AgentLaunchWorktree
|
12345, // PID devuelto por AgentLaunchWorktree
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ file_path: "functions/infra/agent_launch_worktree.go"
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
res := infra.AgentLaunchWorktree(infra.WorktreeLaunchConfig{
|
res := infra.AgentLaunchWorktree(infra.WorktreeLaunchConfig{
|
||||||
RepoRoot: "/home/lucas/fn_registry",
|
RepoRoot: "$HOME/fn_registry",
|
||||||
Branch: "auto/0115-worktree-launcher-fn",
|
Branch: "auto/0115-worktree-launcher-fn",
|
||||||
WorktreePath: "/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn",
|
WorktreePath: "$HOME/fn_registry/worktrees/0115-worktree-launcher-fn",
|
||||||
Prompt: "Implement issue 0115 — worktree launcher Go function",
|
Prompt: "Implement issue 0115 — worktree launcher Go function",
|
||||||
LogPath: "/tmp/claude-0115.log",
|
LogPath: "/tmp/claude-0115.log",
|
||||||
SkipPerms: true,
|
SkipPerms: true,
|
||||||
@@ -44,7 +44,7 @@ if res.Error != "" {
|
|||||||
}
|
}
|
||||||
fmt.Printf("claude PID=%d branch=%s log=%s\n", res.PID, res.Branch, res.LogPath)
|
fmt.Printf("claude PID=%d branch=%s log=%s\n", res.PID, res.Branch, res.LogPath)
|
||||||
// ... agente trabaja ...
|
// ... agente trabaja ...
|
||||||
infra.AgentCleanupWorktree(res.WorktreePath, res.Branch, "/home/lucas/fn_registry", res.PID)
|
infra.AgentCleanupWorktree(res.WorktreePath, res.Branch, "$HOME/fn_registry", res.PID)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Cuando usarla
|
## Cuando usarla
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ file_path: "functions/infra/artefact_doctor.go"
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
checks, err := ArtefactDoctor("/home/lucas/fn_registry")
|
checks, err := ArtefactDoctor("$HOME/fn_registry")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ test_file_path: ""
|
|||||||
file_path: "functions/infra/audit_app_drift.go"
|
file_path: "functions/infra/audit_app_drift.go"
|
||||||
params:
|
params:
|
||||||
- name: registryRoot
|
- name: registryRoot
|
||||||
desc: "Ruta absoluta a la raiz del fn_registry (ej. /home/lucas/fn_registry). Se buscan modules/*/module.md, apps/*/app.md, projects/*/apps/*/app.md y cpp/build/{linux,windows}/apps/<name>/."
|
desc: "Ruta absoluta a la raiz del fn_registry (ej. $HOME/fn_registry). Se buscan modules/*/module.md, apps/*/app.md, projects/*/apps/*/app.md y cpp/build/{linux,windows}/apps/<name>/."
|
||||||
- name: windowsDeployRoot
|
- name: windowsDeployRoot
|
||||||
desc: "Ruta absoluta donde se despliegan los .exe de Windows (ej. /mnt/c/Users/lucas/Desktop/apps). Si vacio, se omite la inspeccion del binario desplegado y solo se usan los artefactos bajo cpp/build."
|
desc: "Ruta absoluta donde se despliegan los .exe de Windows (ej. /mnt/c/Users/lucas/Desktop/apps). Si vacio, se omite la inspeccion del binario desplegado y solo se usan los artefactos bajo cpp/build."
|
||||||
output: "Slice de AppDriftEntry, uno por app C++ encontrada. Status: 'ok' (todas las versiones coinciden), 'drift' (al menos un modulo tiene version distinta), 'no-build' (no se encontro ningun artefacto compilado). Campo Stale lista los nombres de modulos con drift."
|
output: "Slice de AppDriftEntry, uno por app C++ encontrada. Status: 'ok' (todas las versiones coinciden), 'drift' (al menos un modulo tiene version distinta), 'no-build' (no se encontro ningun artefacto compilado). Campo Stale lista los nombres de modulos con drift."
|
||||||
@@ -45,7 +45,7 @@ Detecta apps C++ cuyos binarios/artefactos enlazan una version de modulo inferio
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
entries, err := infra.AuditAppDrift("/home/lucas/fn_registry", "/mnt/c/Users/lucas/Desktop/apps")
|
entries, err := infra.AuditAppDrift("$HOME/fn_registry", "/mnt/c/Users/lucas/Desktop/apps")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ file_path: "functions/infra/audit_app_location.go"
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
violations, err := AuditAppLocation("/home/lucas/fn_registry")
|
violations, err := AuditAppLocation("$HOME/fn_registry")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ type CapabilityGroupAudit struct {
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
audits, err := AuditCapabilityGroups("/home/lucas/fn_registry")
|
audits, err := AuditCapabilityGroups("$HOME/fn_registry")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ imports:
|
|||||||
example: |
|
example: |
|
||||||
import "fn-registry/functions/infra"
|
import "fn-registry/functions/infra"
|
||||||
|
|
||||||
entries, err := infra.AuditCopiedCode("/home/lucas/fn_registry")
|
entries, err := infra.AuditCopiedCode("$HOME/fn_registry")
|
||||||
if err != nil { ... }
|
if err != nil { ... }
|
||||||
for _, e := range entries {
|
for _, e := range entries {
|
||||||
fmt.Printf("%s:%s ~ %s (%s, %.2f)\n",
|
fmt.Printf("%s:%s ~ %s (%s, %.2f)\n",
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ file_path: "functions/infra/audit_cpp_apps.go"
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
audits, err := infra.AuditCppApps("/home/lucas/fn_registry")
|
audits, err := infra.AuditCppApps("$HOME/fn_registry")
|
||||||
if err != nil { log.Fatal(err) }
|
if err != nil { log.Fatal(err) }
|
||||||
for _, a := range audits {
|
for _, a := range audits {
|
||||||
if !a.OK {
|
if !a.OK {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ output: "Slice de DataTableUsageEntry, uno por app C++ con uses_modules: [data_t
|
|||||||
```go
|
```go
|
||||||
import "fn-registry/functions/infra"
|
import "fn-registry/functions/infra"
|
||||||
|
|
||||||
entries, err := infra.AuditDataTableUsage("/home/lucas/fn_registry")
|
entries, err := infra.AuditDataTableUsage("$HOME/fn_registry")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ file_path: "functions/infra/audit_dod_schema.go"
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
report, err := infra.AuditDodSchema(
|
report, err := infra.AuditDodSchema(
|
||||||
"/home/lucas/fn_registry/dev/issues",
|
"$HOME/fn_registry/dev/issues",
|
||||||
"/home/lucas/fn_registry/dev/flows",
|
"$HOME/fn_registry/dev/flows",
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ output: "MlEnvReport con Gpus (puede estar vacio si no hay NVIDIA), Checks con e
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
root := "/home/lucas/fn_registry"
|
root := "$HOME/fn_registry"
|
||||||
report, err := AuditMlEnv(root)
|
report, err := AuditMlEnv(root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ output: "Slice de ModuleDriftCheck (uno por app C++ con CMakeLists.txt). Apps si
|
|||||||
```go
|
```go
|
||||||
import "fn-registry/functions/infra"
|
import "fn-registry/functions/infra"
|
||||||
|
|
||||||
checks, err := infra.AuditModulesDrift("/home/lucas/fn_registry")
|
checks, err := infra.AuditModulesDrift("$HOME/fn_registry")
|
||||||
if err != nil { panic(err) }
|
if err != nil { panic(err) }
|
||||||
for _, c := range checks {
|
for _, c := range checks {
|
||||||
if !c.OK {
|
if !c.OK {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Reporta apps con tag `service` cuya `service:` block esta incompleta.
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
audits, err := infra.AuditServicesSpec("/home/lucas/fn_registry")
|
audits, err := infra.AuditServicesSpec("$HOME/fn_registry")
|
||||||
for _, a := range audits {
|
for _, a := range audits {
|
||||||
if !a.OK {
|
if !a.OK {
|
||||||
fmt.Println(a.AppID, "issues:", a.Issues)
|
fmt.Println(a.AppID, "issues:", a.Issues)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ file_path: "functions/infra/audit_uses_functions.go"
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
results, err := AuditUsesFunctions("/home/lucas/fn_registry")
|
results, err := AuditUsesFunctions("$HOME/fn_registry")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ file_path: "functions/infra/find_unused_functions.go"
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
unused, err := FindUnusedFunctions("/home/lucas/fn_registry")
|
unused, err := FindUnusedFunctions("$HOME/fn_registry")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ imports:
|
|||||||
example: |
|
example: |
|
||||||
import "fn-registry/functions/infra"
|
import "fn-registry/functions/infra"
|
||||||
|
|
||||||
drafts, err := infra.GenerateProposalsFromTelemetry("/home/lucas/fn_registry")
|
drafts, err := infra.GenerateProposalsFromTelemetry("$HOME/fn_registry")
|
||||||
if err != nil { ... }
|
if err != nil { ... }
|
||||||
inserted, total, err := infra.PersistProposalDrafts("/home/lucas/fn_registry", drafts)
|
inserted, total, err := infra.PersistProposalDrafts("$HOME/fn_registry", drafts)
|
||||||
fmt.Printf("%d/%d proposals nuevas\n", inserted, total)
|
fmt.Printf("%d/%d proposals nuevas\n", inserted, total)
|
||||||
file_path: "functions/infra/generate_proposals_from_telemetry.go"
|
file_path: "functions/infra/generate_proposals_from_telemetry.go"
|
||||||
tested: false
|
tested: false
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ output: "Slice de LocationDrift con todos los discrepancias encontradas. Vacio s
|
|||||||
## Ejemplo
|
## Ejemplo
|
||||||
|
|
||||||
```go
|
```go
|
||||||
drifts, err := PcLocationsDrift("/home/lucas/fn_registry", "")
|
drifts, err := PcLocationsDrift("$HOME/fn_registry", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user