Files
fn_registry/bash/functions/pipelines/audit_registry_paths.md
T
egutierrez 8413db65cc feat: funciones bash audit_registry_paths y validate_registry_paths
Pipeline para auditar file_path del registry contra disco y función shell para validar paths individuales.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 03:23:47 +02:00

2.2 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path
audit_registry_paths pipeline bash pipelines 1.0.0 impure audit_registry_paths([output_file: string]) -> void Audita file_path de todas las functions y types en registry.db, verifica que cada ruta apunte a un archivo existente en disco, y genera un txt con las rutas rotas para que agentes puedan corregirlas.
registry
audit
validation
paths
launcher
pipeline
bash
assert_command_exists_bash_shell
assert_file_exists_bash_shell
validate_registry_paths_bash_shell
report_execution_json_bash_shell
exit_with_status_bash_shell
false error_go_core
false
bash/functions/pipelines/audit_registry_paths.sh

Ejemplo

# Con default (genera broken_paths.txt en la raiz)
./bash/functions/pipelines/audit_registry_paths.sh

# Con ruta personalizada
./bash/functions/pipelines/audit_registry_paths.sh /tmp/broken.txt

# Desde fn run (pipeline launcher)
fn run audit_registry_paths

Flujo

  1. assert_command_exists — verifica que sqlite3 esta disponible
  2. assert_file_exists — verifica que registry.db existe y reporta su tamano
  3. validate_registry_paths (functions) — itera todas las functions, verifica cada file_path
  4. validate_registry_paths (types) — itera todos los types, verifica cada file_path
  5. Genera broken_paths.txt con formato legible para agentes
  6. report_execution_json — imprime JSON de ejecucion a stdout
  7. exit_with_status — exit code segun resultado

Formato de salida

# Broken file_path entries in registry.db
# Generated: 2026-04-03T10:00:00Z
# Total: 11 broken paths
#
# Format: id | file_path (in .md) | domain | table
# ---

## Functions (11)
cdp_click_go_browser | functions/infra/cdp_click.go | browser | functions

Notas

El archivo de salida es consumible por agentes: cada linea tiene el ID de la funcion/tipo y el file_path que necesita correccion. El agente puede leer el .md correspondiente, encontrar el archivo real en disco, y actualizar el campo file_path.