[Bug] ar-supervisor hangs on exit when project root contains spaces

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

@harman-2167 ya está trabajando en esto.

Desde el 15/10/2026.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, shell
Área
devops, tooling

Línea de trabajo

Start in ar-runtime/scripts/ar-supervisor.sh, reading monitor_pids() and reap_monitors() to trace how the project root is recovered and how cleanup waits for the monitor. Reproduce the issue with a root containing whitespace, then add the suggested supervisor cleanup test. Done means the monitor is stopped and reaped, the supervisor exits, and the run manifest is sealed.

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

Descripción

Summary

monitor_pids() parses ps -eo pid=,command= output with line.split() and takes the next token after --project-root. A valid project path containing spaces is split into multiple tokens, so the monitor's actual root never matches ABS_PROJ.

On the first run for such a project, reap_monitors() consequently does not signal the monitor. It then waits on MONITOR_PID unconditionally; because that child is still running, the supervisor's EXIT trap blocks indefinitely.

Reproduction

  1. Run ar-runtime/scripts/ar-supervisor.sh with a project root such as /tmp/research project.
  2. Let the supervisor start its ar-gemini-monitor.py --project-root "/tmp/research project" child.
  3. Let the supervisor exit (for example after the retry budget is exhausted).
  4. Observe that the supervisor remains stuck in reap_monitors() waiting for the monitor; the monitor continues running.

The parser behavior is reproducible from a typical ps line: after splitting "... --project-root /tmp/research project ...", the value read for --project-root is only /tmp/research, not the original argument.

Expected behavior

The monitor is stopped and reaped, then the supervisor exits and seals the run manifest.

Suggested direction

Avoid recovering argv boundaries from the display-formatted ps command string, or use an encoding/quoting-aware process inspection method. Add a supervisor cleanup test whose project root contains whitespace.

Lenguaje dominante
Python
Estrellas
2.8k
Forks
250
Métricas de merge de PR
Sin PR fusionados en 30 d

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 EvoMap/AutoResearch

Todos los issues de EvoMap/AutoResearch

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.