CI handoff fails the attempt when GitHub's pull request head lags behind the pushed branch

Cerrado
#1,012 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #1048 de @usine-phildl — fusionado

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github, typescript
Área
backend, ci-cd

Línea de trabajo

Start in packages/orchestrator/src/ by reading the AwaitingCi handoff and the “no harvested pull request” check, then trace the GitHub polling adapter. Add a test where the origin branch is at the pushed head while the pull request API still reports the previous head. Done means the handoff tolerates bounded API lag and reports a persistent mismatch as retryable InfraFailure.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Observed on the dogfood instance on 2026-11-05, run 570618ea8f9766b3f94c7c2db014b2a9 (act-on-findings on #1000, attempt .../act-on-findings/1).

What happened

  • 16:07:47Z the child pushed b88703df to fix/976-resume-durable-child; git ls-remote shows the branch at that commit.
  • 16:09:06Z the child returned [usine:awaiting-ci] {"pull_request":1000,"head":"b88703df…"}.
  • 16:09:17Z the harvest recorded the result, and the attempt failed with AgentFailure: The CI handoff has no harvested pull request for the checkout's pushed head.
  • At 16:15Z GitHub's pull request API still reported head.sha = c66d6cd4 (the previous push) with updated_at = 16:08:01Z, while refs/heads/fix/976-resume-durable-child was at b88703df. The pull request head lagged the branch by several minutes (GitHub was degraded at the time).

So the handoff compared the pushed head against a stale pull request head and treated the mismatch as the agent's fault. Nothing was wrong with the push, and the operator had to rescue the item by hand (watch CI for the pushed commit, relabel, resolve the failure). This counts as a manual PR rescue for the CI-wait trial.

Expected

  • The handoff accepts the agent's pull_request number plus the pushed head when the branch ref on origin is at that head, without requiring the pull request API to have caught up.
  • If it must read the pull request head, retry for a bounded window (GitHub can lag minutes) before failing, and log the branch head versus the pull request head on each try.
  • A mismatch that persists after the window is an InfraFailure (retryable), not an AgentFailure: the agent did what it was asked.

Files

The CI-wait handoff harvest in packages/orchestrator/src/ (the AwaitingCi state and the "no harvested pull request" check), the GitHub polling adapter, and a test with a lagging pull request head.

Lenguaje dominante
TypeScript
Estrellas
1
Forks
0
Merge medio
3 h 23 min
PR fusionados (30 d)
400

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de basaltbytes/usine

Todos los issues de basaltbytes/usine

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.