Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Can the agent distinguish stdout and stderr?

未关闭
#37 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
64/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
python

调研方向

从 src/programbench/container.py 约第 85 行开始查看,这里容器执行 helper 似乎会合并 stdout 和 stderr。使用 eval/tests/test_cmatrix.py:120 中的 cmatrix 评估用例复现该行为,并将观察到的流与命令的实际输出进行比较。完成的标准是,预期的 stdout/stderr 行为已明确,默认的 agent 观察不再掩盖二者的区别,并且相关的评估行为已得到检查。

由索引模型根据 Issue 内容生成。

描述

bug

Hi!

I find that some test functions failed against a generated executable because the test expected to have some string in stderr, while the executable gave that string in stdout.

I also noticed that ProgramBench’s container execution helper appears to merge stdout/stderr streams here.

Is stdout/stderr separation intentionally unavailable to agents during exploration? (I think it is still possible for an agent to manually test stream placement with shell redirection, e.g. cmd >/tmp/out 2>/tmp/err, but the default observation format seems to make the distinction easy to miss.)

Thank you!

The commands I ran
uv run --with mini-swe-agent mini-extra programbench \
    --filter "abishekvashok__cmatrix.5c082c6" \
    --output output \
    --model openai/gpt-5.4

uv run programbench eval output

Score log

                 Evaluation Summary                   
 Instance                        Score  Comment     
 abishekvashok__cmatrix.5c082c6     94  507 tests   
 Average                            94  1 instances 
A failed test in eval.json
  • task: abishekvashok/cmatrix
  • test function name: eval.tests.test_cmatrix.TestColorOptions.test_color_invalid_shows_error_message
  • branch: 1b991a57d4e9
self = <test_cmatrix.TestColorOptions object at 0x7732071f2bf0>

    def test_color_invalid_shows_error_message(self):
        """Test invalid color name produces error message."""
        result = run("-C", "purple")
        assert result.returncode == 0  # Exits with 0 but shows error
>       assert b"Invalid color" in result.stderr
E       AssertionError: assert b'Invalid color' in b''
E        +  where b'' = CompletedProcess(args=['./executable', '-C', 'purple'], returncode=0, stdout=b' Invalid color selection\n Valid colors are green, red, blue, white, yellow, cyan, magenta and black.\n', stderr=b'').stderr

eval/tests/test_cmatrix.py:120: AssertionError
主要语言
Python
星标
928
派生
67
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

facebookresearch/ProgramBench 的其他 Issue

查看 facebookresearch/ProgramBench 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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