2a3d780347
Adds `fn doctor` read-only diagnostic command with subcommands artefacts, services, sync, uses-functions, unused, and --json flag for agents. Each subcommand wraps a registry function in functions/infra/. New functions: - artefact_doctor, services_status, pc_locations_drift, audit_uses_functions, find_unused_functions (Go diagnostics) - backup_sqlite_db, rotate_backups, wait_for_http, wait_for_port, port_kill, tail_journal, pre_commit_hook_install (bash utilities) - notify_telegram (Go HTTP) - backup_all pipeline (tag launcher) Plus prior session leftovers (scan_secrets_in_dirty, append_diary_entry, git utilities, http_session_cookie_middleware, compile/full-git pipelines). Fixes pc_locations_drift filepath.Join bug with absolute dir_path. Documents fn doctor in CLAUDE.md, .claude/rules/fn_doctor.md (rule 23), docs/architecture.md, CHANGELOG.md (2026-05-07), and diary entry. First fn doctor uses-functions run found drift in 7/12 apps (deuda para sincronizar app.md con imports reales). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.7 KiB
2.7 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, 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 | params | output | tested | tests | test_file_path | file_path | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| full_git_push | pipeline | bash | pipelines | 1.0.0 | impure | full_git_push(commit_message?: string) -> stdout: tabla resumen | Push automatico de fn_registry + todos los sub-repos + fn sync. Descubre repos, escanea secrets (aborta si detecta), auto-inicializa apps/analyses sin .git via ensure_repo_synced, auto-commitea dirty trees, pushea solo repos adelantados, pushea ~/.password-store sin commitear, y ejecuta fn sync. |
|
|
false | error_go_core |
|
tabla resumen por stdout: commits creados por repo, push status de cada repo, estado de pass-secrets, resultado de fn sync | false | bash/functions/pipelines/full_git_push.sh |
Ejemplo
# Push con mensaje automatico
fn run full_git_push
# Push con mensaje fijo para todos los repos
fn run full_git_push "chore: sync desde home-wsl"
# Directo
bash bash/functions/pipelines/full_git_push.sh "feat: nueva funcion"
Flujo
discover_git_repos— lista todos los repos bajo$FN_REGISTRY_ROOT- Auto-init — para cada app/analysis sin
.git, llamaensure_repo_synced(requiereGITEA_URL/GITEA_TOKENviapass_get) scan_secrets_in_dirty— escanea cada repo; si hay matches aborta todo y lista los archivosgit_auto_commit_dirty— commitea dirty trees con mensaje fijo o generadogit_push_if_ahead— pushea solo repos con commits locales (sin tocar la red para los up-to-date)- Push de
~/.password-store— solo push (sin commit; pass se autocommitea) fn sync— sincroniza proposals, apps, projects, analysis, vaults, pc_locations con registry_api
Variables de entorno
FN_REGISTRY_ROOT— raiz del registry; default/home/lucas/fn_registryGITEA_URL,GITEA_TOKEN— se cargan depass agentes/gitea-urlypass gitea/dataforge-git-tokenFN_REGISTRY_API,REGISTRY_API_TOKEN— se cargan depass registry/*
Notas
El unico motivo para abortar antes de commitear es la deteccion de secrets. Cualquier otro error (push rechazado por non-fast-forward, fn sync no disponible) se reporta en el resumen y el pipeline continua con el resto de repos. Modo completamente no-interactivo.