Logotipo de Pipeline Failure Triage And Recovery

Pipeline Failure Triage And Recovery

Comunidad
selvarajmurugesan90
pipeline-failure-triage-and-recovery

Diagnostica y recupera una ejecución de CI fallida o inestable: distingue una regresión real de un fallo intermitente o del entorno, elige la estrategia de repetición adecuada (un solo trabajo, toda la canalización o una repetición selectiva), limpia la caché o las dependencias dañadas y pone en cuarentena una prueba que se haya confirmado como inestable, sin ocultar fallos reales. Úsalo cuando el usuario pregunte «por qué ha fallado esta canalización o compilación», «esta prueba es inestable o hay un error real», «debería volver a ejecutar CI», «la canalización falla a veces con el mismo commit», «limpiar la caché de CI» o «poner esta prueba inestable en cuarentena».

Add to TypingMind

Descripción general

Editorselvarajmurugesan90
Repositorioops-engineering-skills
Nombre de la habilidadpipeline-failure-triage-and-recovery
Estrellas
44
Forks
18
Archivos incluidos
Solo instrucciones
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por selvarajmurugesan90 en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Pipeline Failure Triage And Recovery en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/devops/skills/pipeline-failure-triage-and-recovery
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/selvarajmurugesan90/ops-engineering-skills.git /tmp/ops-engineering-skills
mkdir -p .claude/skills
cp -r /tmp/ops-engineering-skills/plugins/devops/skills/pipeline-failure-triage-and-recovery .claude/skills/pipeline-failure-triage-and-recovery
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Pipeline Failure Triage And Recovery en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Pipeline Failure Triage And Recovery automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Pipeline Failure Triage And Recovery no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Pipeline Failure Triage and Recovery

Purpose

A failed CI run is a decision point, not just a red X: is this a real regression that must be fixed before merging, a flaky test that fails intermittently regardless of the code change, or an environmental problem (a corrupted cache, a transient network blip to a package registry, a rate-limited external dependency) that has nothing to do with the code at all? Treating every failure as "just re-run it" trains engineers to ignore CI, while treating every failure as a real regression wastes hours chasing a bug that doesn't exist. This skill covers triaging a failed run methodically, choosing the narrowest safe recovery action, and fixing the underlying cause of recurring flakiness or corruption instead of only re-running around it.

When to use

  • A pipeline run fails and it's unclear whether the failure is caused by the change under test, a flaky test, or CI infrastructure/environment.
  • The same commit passes on re-run with no code change, suggesting flakiness rather than a real bug.
  • A build fails with dependency-resolution errors, missing packages, or "works on my machine but not in CI" symptoms that point at a corrupted or stale cache.
  • Deciding whether to re-run a single failed job, the whole pipeline, or only specific downstream stages.
  • A specific test or job fails often enough that people have started reflexively re-running CI without investigating, or have started ignoring red pipelines altogether.

Prerequisites & environment

  • Read access to the CI platform's run logs and, ideally, per-step timing and cache-hit metadata (GitHub Actions run logs and actions/cache hit/miss output, GitLab CI job traces and cache job artifacts, Jenkins console output and workspace state).
  • The ability to re-run a single job/stage in isolation, not only the entire pipeline from scratch — this is a platform capability, not something to build ad hoc (GitHub Actions "Re-run failed jobs", GitLab "Retry" per job, Jenkins "Replay"/stage restart where supported).
  • A test-flakiness or quarantine mechanism appropriate to the test framework (a @flaky/quarantine tag, a separate flaky-test job that doesn't block merge, or a test-management tool that tracks flake rate per test) — see ci-cd-pipeline-design for where quality gates sit in the overall pipeline.
  • Enough historical run data (last 10-20 runs of the same job) to tell a one-off blip from a pattern; most CI platforms retain this by default.

Step-by-step guidance

  1. Read the actual failure, not just the red status. Open the failed step's log and find the first error, not the last one — a cascade of downstream errors (e.g., "server not reachable" repeated 40 times) is usually caused by one earlier failure (e.g., "port already in use" or "npm ERR! 403 Forbidden"). Scrolling to the bottom of a long log and reacting to the last line is a common way to misdiagnose the real cause.

  2. Classify the failure before deciding on a recovery action:

    • Real regression — the failure is a deterministic assertion/ compile/lint error directly traceable to lines changed in this diff. Fix the code; do not re-run.
    • Flaky — the same commit, unchanged, fails intermittently across multiple re-runs with a non-deterministic symptom (race condition, timing-dependent assertion, order-dependent test state). Confirm by re-running the specific failed job (not the whole pipeline) 2-3 times; if it passes without any code change, it's flaky.
    • Environmental/infrastructure — package registry timeout, runner out of disk space, transient network error to an external service, Docker daemon not ready yet. Usually has a recognizable infrastructure-level error message (ECONNRESET, 429 Too Many Requests, no space left on device) rather than an assertion failure.
    • Cache/dependency corruption — a stale or partially-written cache (e.g., a node_modules/.venv/Maven local repo cache saved mid- install, or a lockfile/cache-key mismatch after a dependency bump) causes a build to fail in CI with an error that doesn't reproduce locally with a clean install. Symptom: errors like "Cannot find module X" for a package that is definitely declared, or version mismatches between what's declared and what's actually resolved.
  3. Re-run at the narrowest scope that actually re-tests the failure. Re-running the entire pipeline from Source when only one downstream test job failed wastes time and CI minutes, and — worse — can mask a real intermittent failure by giving it more chances to pass by luck.

    • GitHub Actions: gh run rerun <run-id> --failed re-runs only failed jobs.
    • GitLab CI: retry the specific failed job from the pipeline UI/API (POST /projects/:id/jobs/:job_id/retry), not "Run pipeline" again.
    • Jenkins (declarative): use Restart from Stage for a specific stage when the plugin supports it, rather than re-triggering the whole build.
  4. For suspected cache/dependency corruption, invalidate the cache deliberately rather than guessing. Bump the cache key (most CI caches are keyed off a lockfile hash) so the next run rebuilds from a clean state:

    yaml
    # GitHub Actions actions/cache — bump the key suffix to force a miss
    - uses: actions/cache@v4
      with:
        path: ~/.npm
        key: npm-${{ hashFiles('package-lock.json') }}-v2   # was -v1

    If the corruption recurs across multiple unrelated commits, the root cause is usually a cache key that doesn't fully capture what changes the cache's validity (e.g., keyed on package.json but not package-lock.json, so a lockfile-only change doesn't bust a stale cache) — fix the key, don't just clear the cache once and move on.

  5. Confirm flakiness quantitatively before quarantining a test, not after a single failed run. Re-run the specific test/job in isolation 3-5 times; a test that fails 1-2 times out of 5 with no code change is flaky, a test that fails once and then passes 10/10 afterward was more likely a genuine environmental blip that day.

    bash
    # pytest example: re-run only the failed test, several times, in isolation
    pytest tests/test_checkout.py::test_concurrent_orders --count=5
  6. Quarantine confirmed-flaky tests visibly, with an owner and a deadline — move them to a non-blocking "flaky" job/tag rather than silently skipping or deleting them, and file a ticket to actually fix the race condition:

    yaml
    # pytest.ini / marker-based quarantine, run separately and non-blocking
    markers =
      flaky: known-flaky test, tracked in JIRA-1234, does not block merge
    bash
    pytest -m "not flaky"          # blocking CI job
    pytest -m "flaky" || true      # separate, non-blocking, still visible
  7. If the same job flakes repeatedly across many PRs/commits, treat it as a pipeline reliability problem worth root-causing — a shared test-order dependency, an unpinned external service being hit directly instead of mocked, or a resource limit on the runner (memory, file descriptors) — rather than accepting "CI is just flaky" as a permanent state. This is the CI-specific instance of the toil this causes: engineers re-running CI reflexively instead of trusting it.

Best practices

  • Track flake rate per test/job over time (most CI platforms or test dashboards surface this); a rising flake rate is an early warning sign worth acting on before it becomes "just re-run it twice."
  • Never silently delete or comment out a failing test to make CI green — quarantine it visibly with an owner and a tracking ticket (step 6), so the underlying bug it may be catching isn't lost.
  • Prefer re-running the narrowest failed unit (single job/stage) over the whole pipeline; if the platform doesn't support that, treat "add per-job re-run" as a pipeline improvement worth investing in.
  • Key caches on the actual input that determines validity (lockfile hash, not just a manifest file that doesn't capture transitive version changes) so corruption from a stale cache doesn't recur.
  • Distinguish "the pipeline is flaky" from "this one test is flaky" — infrastructure-level flakiness (runner capacity, network to a shared dependency) needs a different fix than a race condition in one test.
  • Keep a lightweight log (even just linked tickets) of quarantined flaky tests and their fix status — an unowned quarantine list grows forever and quietly erodes test coverage.

Common pitfalls

  • Symptom: A build fails in CI with a dependency error that doesn't reproduce when run locally with a fresh checkout. Fix: Suspect a stale/corrupted cache before suspecting the code — bump the cache key and re-run (step 4); if it passes clean, the cache key doesn't capture something that changed (usually a lockfile not included in the key).

  • Symptom: Engineers reflexively click "re-run" on every red pipeline without reading the log, and a real regression eventually merges because it happened to pass on the second or third try. Fix: Require reading the actual failed step's log and classifying the failure (step 2) before re-running; if a test needs 2-3 re-runs to pass "normally," that is itself evidence of flakiness that should be quarantined and fixed, not treated as routine.

  • Symptom: A test is marked @skip or deleted after a few flaky failures, and months later a real bug it would have caught reaches production. Fix: Quarantine, don't delete — move it to a non-blocking job with a tracked ticket and an owner (step 6), so the coverage isn't silently lost and someone is accountable for fixing the underlying race condition.

  • Symptom: The same job has flaked on unrelated PRs for months, and each time someone just re-runs it and moves on. Fix: Treat repeated flakiness on the same job as a reliability problem to root-cause (step 7) — check for shared/leaked state between tests, unmocked calls to a real external service, or runner resource exhaustion, instead of accepting indefinite manual re-runs as normal.

  • Symptom: A cache-clearing fix works once, but the same corruption comes back a few weeks later after an unrelated dependency bump. Fix: The cache key almost certainly doesn't hash the right input (e.g. it's keyed on a directory listing or a manifest file instead of the lockfile) — fix the key to reflect everything that actually invalidates the cache, not just clear it reactively each time.

Worked example

Scenario: A GitHub Actions job test-integration fails on a PR with Error: connect ECONNRESET from a call to an external payments sandbox API, while the test-unit job in the same run passes.

  1. Read the log: the first error is ECONNRESET from an HTTP call in tests/integration/test_payment_capture.py, not an assertion failure — this looks environmental, not a regression in the diff (the diff only touches an unrelated checkout module).
  2. Classify: no code in this PR touches payment integration; check history — this same job flaked with the identical error on two other unrelated PRs in the last week. Pattern points to environmental flakiness (the sandbox API itself is rate-limiting or intermittently unavailable), not a real regression.
  3. Narrow re-run: gh run rerun <run-id> --failed re-runs only test-integration. It passes clean on retry with no code change, confirming flakiness rather than a real failure.
  4. Root-cause instead of accepting the re-run as routine: the integration test calls the real sandbox API directly with no retry/ backoff and no circuit breaker; three flakes in a week is a pattern, not a coincidence. File a ticket to add a retry-with-backoff wrapper around the sandbox call and, in the meantime, mark the specific test @pytest.mark.flaky(reruns=2, reruns_delay=5) so isolated sandbox blips don't block unrelated PRs while the real fix is pending — visible in CI output, tracked, not silently hidden.
  5. Merge is not blocked further: the PR's actual diff (checkout module) had a clean test-unit run and the flaky integration test is now quarantined with a tracked fix, so the team isn't stuck re-running CI on every unrelated PR that happens to touch this suite.

Cross-references

Preguntas frecuentes

¿Qué hace la habilidad de IA Pipeline Failure Triage And Recovery?

Diagnostica y recupera una ejecución de CI fallida o inestable: distingue una regresión real de un fallo intermitente o del entorno, elige la estrategia de repetición adecuada (un solo trabajo, toda la canalización o una repetición selectiva), limpia la caché o las dependencias dañadas y pone en cuarentena una prueba que se haya confirmado como inestable, sin ocultar fallos reales. Úsalo cuando el usuario pregunte «por qué ha fallado esta canalización o compilación», «esta prueba es inestable o hay un error real», «debería volver a ejecutar CI», «la canalización falla a veces con el mismo c...

¿Por qué usar Pipeline Failure Triage And Recovery en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Pipeline Failure Triage And Recovery está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Pipeline Failure Triage And Recovery en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/devops/skills/pipeline-failure-triage-and-recovery. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Pipeline Failure Triage And Recovery?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Pipeline Failure Triage And Recovery?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Pipeline Failure Triage And Recovery con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Pipeline Failure Triage And Recovery?

Sí. selvarajmurugesan90 la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇