BUG : Repository indexing can get stuck in pending with no recovery path

Abierto
#228 1 comentario 0 reacciones 0 asignados Ver en GitHub

@AkshitGarg054 ya está trabajando en esto.

Desde el 12/1/2026.

  • #232 de @AkshitGarg054 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
backend

Línea de trabajo

Comienza leyendo RepoService.index_repo() y sigue el manejo del estado de indexación a través del punto de entrada /analyze_repo. Reproduce o inspecciona el flujo pending interrumpido; después, verifica que una solicitud de indexación posterior pueda borrar el error anterior, activar de nuevo el análisis y dejar de permanecer bloqueada indefinidamente.

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

Descripción

Is there an existing issue for this?
  • I have searched the existing issues
What happened?

📌 Issue Overview

While reviewing the repository indexing flow, I noticed that a repository can get permanently stuck in the pending state if the indexing process is interrupted (e.g. backend crash or network failure).

This results in users being blocked from re-indexing the repository, even though no indexing job may actually be running.

🎯 Expected Behavior

The user should be able to re-index the repo if the previous indexing is stuck in "pending" state.

🚨 Actual Behavior

The indexing flow in RepoService.index_repo() behaves as follows:

  1. status = completed : Indexing is considered done.

  2. status = pending :
    Backend returns : “Repository indexing in progress. Please wait.”

  3. status = failed : Backend resets state to pending and re-triggers /analyze_repo.

For a new repository :
A database row is inserted with status = pending and /analyze_repo is called.

If the backend crashes or the request never completes after this point, the repository remains in pending. Any subsequent indexing request will hit case (2) and be blocked indefinitely.

💡 Suggested Improvements

Treat pending as a retryable state, similar to failed.

  • Allow re-indexing when status = pending.
  • Reset state to pending.
  • Clear any previous error.
  • Re-trigger /analyze_repo.
Record
  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
Lenguaje dominante
Python
Estrellas
103
Forks
143
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 AOSSIE-Org/Devr.AI

Todos los issues de AOSSIE-Org/Devr.AI

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.