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

オープン
#12 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

@harman-2167 がすでに取り組んでいます。

2026年10月15日 から。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, shell
領域
devops, tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
2.8k
フォーク
250
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

EvoMap/AutoResearch のほかの issue

EvoMap/AutoResearch の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。