microskills: a command wrapped in bash -lc or zsh -lc is not observed
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
調査の方向性
tokeneconomizer/microskills/observe.py の unwrap と _WRAP_RE から始め、classify_command がそれをどう呼び出しているかをたどってください。loopguard/turn の _pieces と _SHELLS は、パスとスクリプトによるシェル名の扱いをすでに実装しているので、それに倣ってください。issue にあるオフライン再現を実行してください。bash -lc 'pytest -q'、/bin/zsh -lc 'pytest -q'、/bin/bash -lc 'pytest -q' のすべてが [('run_tests', 'pytest')] を返せば完了です。
索引モデルが issue の本文から書いたものです。
説明
unwrap in tokeneconomizer/microskills/observe.py strips a shell wrapper only when it is spelled /bin/bash -lc or /bin/sh -c (_WRAP_RE). Codex runs each shell call as [<user's shell>, "-lc", <script>] (Shell::derive_exec_args in codex-rs), so the shell comes by name or by path, and is /bin/zsh for a user on macOS's default shell. A rollout's argv such as ["bash", "-lc", "pytest -q"] is joined to bash -lc 'pytest -q' (trace.codex._command_text). The observer reads any of these as a command named bash or zsh, so the session shows it no test run, no interpreter run and no package tool, and teaches it nothing. The loop guard already reads all of them by their script (loopguard.turn._pieces, _SHELLS).
Reproduction (offline):
from tokeneconomizer.microskills.observe import classify_command
for cmd in ["/bin/bash -lc 'pytest -q'", "bash -lc 'pytest -q'", "/bin/zsh -lc 'pytest -q'"]:
print(cmd, "->", [(o.intent, o.form) for o in classify_command(cmd)])
Expected: [('run_tests', 'pytest')] for all three
Actual: [('run_tests', 'pytest')] for the first, [] for bash -lc and /bin/zsh -lc
Upstream main: 747b8016538c13da7ba9d455b89e5e6595bf5294
Python 3.13.18, Linux
- 主要言語
- Python
- スター
- 7.4k
- フォーク
- 500
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 123
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TokenEconomizer のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/TokenEconomizer#360 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
microskills: bundle exec and pnpm exec are recorded as bundle run and pnpm run対応中かも @Shizoqua が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/TokenEconomizer#344 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
README: state the minimum Python version next to the test instructions対応中かも @rahul05ranjan が 4 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoft/TokenEconomizer#328 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
loopguard: a PHPUnit or CTest run is judged without its summary, so a failing run can end a turn green対応中かも @Shizoqua が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
microsoft/TokenEconomizer#353 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
trace: the usage a Pi tool reports on its own result is left out of the session's usage対応中かも @Shizoqua が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
microsoft/TokenEconomizer#352 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/TokenEconomizer の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
reasons-gate
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
benthomasson/reasons-service#190 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 3 日以内に返信