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

未关闭
#12 1 条评论 0 个 reaction 已指派 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. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

EvoMap/AutoResearch 的其他 Issue

查看 EvoMap/AutoResearch 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。