diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index eb73626..6ab821b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -92,10 +92,3 @@ jobs: - name: Ejecutar celdas ci-safe de RUNBOOK.md run: make runme-ci - - - name: Diagnóstico de runme (sólo si falló el paso anterior) - if: failure() - run: | - echo "runme version: $(runme --version)" - echo "--- /tmp/runme-ci.log ---" - cat /tmp/runme-ci.log 2>&1 || echo "(sin log)" diff --git a/Makefile b/Makefile index 50241ea..8a8c523 100644 --- a/Makefile +++ b/Makefile @@ -56,4 +56,4 @@ runme-check: build ./scripts/runme-check.sh runme-ci: build - runme --log --log-file /tmp/runme-ci.log run --filename RUNBOOK.md --tag ci-safe --all --skip-prompts + ./scripts/runme-ci.sh diff --git a/RUNBOOK.md b/RUNBOOK.md index 61730b3..79479ef 100644 --- a/RUNBOOK.md +++ b/RUNBOOK.md @@ -59,14 +59,24 @@ ninguna llave privada real. ## Ejecutar +`make runme-ci` corre `scripts/runme-ci.sh`, que invoca cada celda `ci-safe` +por su nombre exacto, una por una, deteniéndose en el primer fallo: + ```text -runme run --filename RUNBOOK.md --tag ci-safe --all --skip-prompts +runme run --filename RUNBOOK.md --skip-prompts clusterlog-runme-preflight +runme run --filename RUNBOOK.md --skip-prompts clusterlog-sync-check +runme run --filename RUNBOOK.md --skip-prompts clusterlog-validate-local +runme run --filename RUNBOOK.md --skip-prompts clusterlog-verify-head ``` -es lo que corre `make runme-ci`: exactamente las celdas marcadas `ci-safe`, -en orden, deteniéndose en el primer fallo (verificado con Runme real; ver el -ADR-0004 del motor). Nunca ejecute `runme run --all --skip-prompts` **sin** -`--tag ci-safe` sobre este archivo ni sobre `runbooks/weekly-review.md`: sin -ese filtro, `--all` también incluiría celdas que mutan estado real de esta -instancia. Ésas deben correrse una por una, a mano, después de revisar sus +No usa `runme run --tag ci-safe --all`: esa forma sí funciona en una +terminal normal, pero en el runner real de esta instancia aborta al entrar a +su UI interactiva de progreso multi-tarea (no se pudo reproducir en local +para diagnosticarlo más a fondo — ver `scripts/runme-ci.sh`). Invocar cada +celda por nombre evita esa ruta de código. + +Nunca ejecute `runme run --all --skip-prompts` sobre este archivo ni sobre +`runbooks/weekly-review.md`: sin filtrar por nombre o etiqueta, `--all` +también incluiría celdas que mutan estado real de esta instancia. Ésas +deben correrse una por una, a mano, después de revisar sus prerrequisitos. diff --git a/scripts/runme-ci.sh b/scripts/runme-ci.sh new file mode 100755 index 0000000..bd3963b --- /dev/null +++ b/scripts/runme-ci.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Corre cada celda ci-safe de RUNBOOK.md por nombre exacto, una por una. +# +# No usa "runme run --tag ci-safe --all": esa forma sí funciona en una +# terminal normal (verificado), pero en el runner real de Gitea Actions +# de esta instancia aborta de inmediato ("could not execute command: +# aborted") apenas entra a su UI interactiva de progreso multi-tarea +# ("Initializing...'/"Parsing files..."), sin producir log útil pese a +# --log/--log-file. No se pudo reproducir el crash localmente para +# diagnosticarlo más a fondo. Invocar cada celda por nombre, sin --all, +# usa una ruta de código distinta (confirmado con --dry-run: no dispara +# esa UI) y evita el problema. +# +# La lista debe coincidir con las celdas "ci-safe" de RUNBOOK.md. +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$ROOT" + +CI_SAFE_CELLS=( + clusterlog-runme-preflight + clusterlog-sync-check + clusterlog-validate-local + clusterlog-verify-head +) + +for cell in "${CI_SAFE_CELLS[@]}"; do + echo "== $cell ==" + runme run --filename RUNBOOK.md --skip-prompts "$cell" +done