Files
fn_registry/.claude/commands/full-git-pull.md
T
egutierrez 2a3d780347 feat(doctor): add fn doctor CLI + 14 functions for system management
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>
2026-05-07 01:42:10 +02:00

1.2 KiB

/full-git-pull — Pull automático de fn_registry + sub-repos + submodules + fn sync

Wrapper sobre el pipeline full_git_pull_bash_pipelines. Toda la lógica vive en el registry. Este comando solo ejecuta:

cd /home/lucas/fn_registry
./fn run full_git_pull_bash_pipelines

Argumento

$ARGUMENTS — sin uso, ignorar.

Qué hace el pipeline

  1. discover_git_repos_bash_infra — lista repos locales (mismas exclusiones que push).
  2. git_pull_with_stash_bash_infra por repo: stash si dirty → fetch → pull --ff-only → pop. Estados posibles por repo: [pulled], [up-to-date], [diverged], [stash-conflict].
  3. git submodule update --init --recursive en root.
  4. git_pull_with_stash sobre ~/.password-store.
  5. CGO_ENABLED=1 ./fn index para regenerar registry.db.
  6. ./fn sync con credenciales de pass.

Notas

  • Modo no-interactivo. Auto-stash con --include-untracked.
  • Solo fast-forward. Nunca rebase ni merge automático. Si un repo diverge, se reporta y sigue con el resto.
  • No clona repos faltantes. Cada PC tiene su subset. Para añadir uno, clonarlo a mano y mirar pc_locations para reproducir el path.
  • Para tocar la lógica: editar las funciones del registry, no este wrapper.