docs(issues): roadmap fase 2 navegador + ports Go + runtime embebido
Anade siete issues que definen el camino para hacer graph_explorer distribuible como binario Windows autocontenido (sin WSL): - 0032 — browser_session enrichers via Playwright (login interactivo, cookies persistentes, fetch_webpage_browser, web_search_browser). - 0033 — dispatcher multi-lenguaje (lang: go|python|bash en manifest) + runtime Python embebido en <app>/runtime/. 3 fases (A=dispatcher, B=runtime, C=UI badges). - 0033b — vendoring de funciones Python por enricher (_vendored/ + .vendor.lock) para que los enrichers no dependan de registry_root en runtime. - 0033c — fn check vendored: drift detection con --fix. - 0033d — fn index lee python_runtime / python_runtime_deps de app.md. - 0033e — /compile orquesta freeze + vendor + go builds. - 0034 — port de los 5 enrichers de sistema a Go. Reusa funciones Go del registry directamente (no copias). Tests pytest existentes pasan sin cambios. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
---
|
||||
id: 0033c
|
||||
title: Comando `fn check vendored` — drift detection
|
||||
status: pending
|
||||
priority: medium
|
||||
created: 2026-05-02
|
||||
depends_on: [0033b]
|
||||
---
|
||||
|
||||
## Objetivo
|
||||
|
||||
Subcomando del CLI `fn` para detectar drift entre los `_vendored/`
|
||||
de los enrichers y la fuente del registry. Permite auditoria en CI y
|
||||
diagnostico rapido cuando algo deja de funcionar tras editar una
|
||||
funcion.
|
||||
|
||||
## CLI
|
||||
|
||||
```bash
|
||||
fn check vendored # recorre todas las apps con vendoring
|
||||
fn check vendored apps/graph_explorer # solo esta app
|
||||
fn check vendored --fix # re-vendoriza si detecta drift
|
||||
```
|
||||
|
||||
Salida esperada:
|
||||
|
||||
```
|
||||
[OK] apps/graph_explorer/enrichers/fetch_webpage 3 funcs, lock OK
|
||||
[DRIFT] apps/graph_explorer/enrichers/extract_links 1 func cambio
|
||||
- extract_urls_py_cybersecurity (lock=abc123, current=def456)
|
||||
[MISS] apps/graph_explorer/enrichers/web_search sin .vendor.lock
|
||||
```
|
||||
|
||||
Exit codes:
|
||||
- 0: todo OK
|
||||
- 1: drift detectado
|
||||
- 2: error operativo (manifest invalido, registry.db inaccesible)
|
||||
|
||||
## Implementacion
|
||||
|
||||
`cmd/fn/check_vendored.go`:
|
||||
1. Glob `apps/*/enrichers/*/manifest.yaml` y
|
||||
`projects/*/apps/*/enrichers/*/manifest.yaml`.
|
||||
2. Filtrar los con `lang: python` y `uses_functions` no vacio.
|
||||
3. Por cada uno:
|
||||
- Si no existe `.vendor.lock` → MISS.
|
||||
- Por cada linea del lock: leer `file_path` actual de registry.db,
|
||||
calcular sha256, comparar.
|
||||
4. Con `--fix`: invocar `vendor_enricher_python.sh` cuando se detecta
|
||||
drift o miss.
|
||||
|
||||
## Tests
|
||||
|
||||
- Caso OK: manifest + lock + ficheros consistentes.
|
||||
- Caso DRIFT: editamos un .py vendorizado, el comando lo detecta.
|
||||
- Caso MISS: enricher con `lang: python` y `uses_functions` no vacio
|
||||
pero sin lock.
|
||||
- Caso `--fix`: tras drift, ejecutar con `--fix` deja todo OK.
|
||||
|
||||
## Definicion de hecho
|
||||
|
||||
- `fn check vendored` reporta el estado correctamente en los 3
|
||||
casos.
|
||||
- `--fix` re-vendoriza y deja exit code 0.
|
||||
- Tests Go en `cmd/fn/check_vendored_test.go`.
|
||||
Reference in New Issue
Block a user