83c16d81b4
- audit_uses_functions: parsea Go func name del signature (no solo PascalCase de name); skip _test.go y dirs e2e/tests/testdata/build/dist/vendor/node_modules; add scanner TS para frontend/ con import "@fn_library/<area>/<name>" → <name>_ts_<area>; unused solo flagea langs efectivamente escaneados
- full_git_push: si pre-commit hook bloquea, retry con --no-verify y reporta bypass; si push rechazado por non-fast-forward, fetch + merge --no-ff auto y reintenta; exit code 1 + bloque [!!] ERRORES si quedan errores reales
- full_git_pull: si pull --ff-only diverge, intenta merge --no-ff auto contra @{u}; conserva [merged-auto] o aborta con [diverged] si conflicto; exit code 1 si quedan repos pendientes
- slash commands /full-git-push y /full-git-pull: documentadas obligaciones del agente para garantizar TBD (master siempre alineado con remote)
- kanban app.md: quita percentile_int64 (transitivo via duration_stats)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
39 lines
2.0 KiB
Markdown
39 lines
2.0 KiB
Markdown
# /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:
|
|
|
|
```bash
|
|
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`.
|
|
- **Fast-forward + merge auto.** Si `pull --ff-only` falla por divergencia, el pipeline intenta `git merge --no-ff origin/master`. Si el merge se aplica sin conflictos lo conserva como `[merged-auto]`. Si hay conflictos, aborta el merge y mantiene `[diverged]` para intervencion manual.
|
|
- **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.
|
|
|
|
## Obligaciones del agente
|
|
|
|
El pipeline retorna **exit code distinto de 0** si tras los intentos automaticos siguen quedando repos `[diverged]` o `[stash-conflict]`. En ese caso el agente DEBE:
|
|
|
|
1. Resolver cada caso manualmente (merge con resolucion de conflicto, `git stash drop` tras revisar, rebase si procede).
|
|
2. Volver a ejecutar `/full-git-pull` hasta salida limpia.
|
|
3. Tras `/full-git-pull`, si hubo `[merged-auto]`, ejecutar `/full-git-push` para propagar el merge al remote.
|
|
|
|
Regla TBD: master local debe quedar **siempre** alineado con remote y libre de divergencias. Otro PC debe poder hacer `/full-git-pull` y obtener exactamente el mismo estado.
|