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>
30 lines
1.6 KiB
Markdown
30 lines
1.6 KiB
Markdown
# /full-git-push — Push automático de fn_registry + sub-repos + fn sync
|
|
|
|
Wrapper sobre el pipeline `full_git_push_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta:
|
|
|
|
```bash
|
|
cd /home/lucas/fn_registry
|
|
./fn run full_git_push_bash_pipelines "$ARGUMENTS"
|
|
```
|
|
|
|
## Argumento
|
|
|
|
`$ARGUMENTS` — opcional. Mensaje de commit fijo para todos los repos dirty. Sin argumento, el pipeline genera un mensaje automático por repo según los paths cambiados (ver `bash/functions/infra/git_auto_commit_dirty.sh`).
|
|
|
|
## Qué hace el pipeline
|
|
|
|
1. `discover_git_repos_bash_infra` — lista repos bajo `fn_registry` (excluye `node_modules`, `.venv`, `cpp/vendor`, `cpp/build`, `sources`, `temp`, `subrepos`).
|
|
2. Auto-inicializa apps/analyses sin `.git` con `ensure_repo_synced_bash_infra` (Gitea `dataforge/<basename>`).
|
|
3. `scan_secrets_in_dirty_bash_cybersecurity` — aborta si detecta nombres sospechosos (`.env*`, `*credentials*`, `*.key`, `*.pem`, `id_rsa*`, `*secret*`, `*token*.txt`).
|
|
4. `git_auto_commit_dirty_bash_infra` — commitea cada repo dirty.
|
|
5. `git_push_if_ahead_bash_infra` — push solo si `rev-list @{u}..HEAD > 0` (sin red previa).
|
|
6. Push de `~/.password-store` (sin commitear, pass autocommitea).
|
|
7. `./fn sync` con credenciales cargadas desde `pass`.
|
|
|
|
## Notas
|
|
|
|
- **Modo no-interactivo por diseño.** Auto-commitea sin preguntar.
|
|
- **Único motivo de aborto antes de commitear:** secret detectado por nombre.
|
|
- Si un sub-repo va `behind` el remote, su push se omite (no aborta el resto). Correr `/full-git-pull` y reintentar.
|
|
- Para tocar la lógica: editar las funciones del registry, no este wrapper.
|