pregate: a missing pytest is PREGATE_LANE_FAILED (blames the diff), not PREGATE_ENVIRONMENT
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python, typescript
調査の方向性
lib/pregate/checks/lanes.ts の detectRunner の pytest 分岐を読み、planRuns の pnpm/yarn、cargo、dart/flutter に対する PATH チェックと比較してください。Python は利用できるが pytest がない状態を再現し、その後、lane が PREGATE_LANE_FAILED ではなく PREGATE_ENVIRONMENT (missing-binary) を報告し、インストールするかリモートで実行するよう案内することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
What happened
On a machine without pytest, gstack-pregate's lanes check blames the diff for it. A selected Python test runs as python3 -m pytest {files}. That exits 1 with No module named pytest, and the lane reports PREGATE_LANE_FAILED with "fix the in-branch failure". The test itself is fine: it is a unittest test, and python3 -m unittest passes it.
$ python3 -m unittest tests/test_alpha.py
OK
$ python3 -m pytest --version
/opt/homebrew/opt/[email protected]/bin/python3.15: No module named pytest
# upstream main, 1.91.311.0 (94165fff3)
$ gstack-pregate run --stage tests --only lanes --base origin/main --allow-repo-commands
...
lanes: fix: read ~/.gstack/projects/repro-pytest/pregate/runs/…/lanes/lanes.log, fix the in-branch failure, rerun gstack-pregate --stage tests
PREGATE: fail tree=075ba803dd3a head=7ae1d5e297a9 checks=1
gstack-pregate: lanes: local lane exited 1 (? failed of ? ran; 1 files; pipefail); … (PREGATE_LANE_FAILED)
Expected: the same verdict a missing pnpm, cargo, dart or flutter gets: PREGATE_ENVIRONMENT (missing-binary), "install pytest on this machine and rerun, or run the lane remotely; the diff is not at fault". The machine is missing a tool; the diff did nothing wrong.
classifyCommandEnvironment can't catch this at run time: the command's binary is python3, which is on PATH, and No module named pytest is not a not-found line. planRuns already checks PATH before a run for pnpm/yarn (packageRunner), cargo (cargoRunner) and dart/flutter (dartRunner). The pytest branch of detectRunner (lib/pregate/checks/lanes.ts) does no such check.
Steps to reproduce
- A machine where
python3 -m pytestfails withNo module named pytest. - A repo with no
package.jsonand one committed test,tests/test_alpha.py:import unittest class T(unittest.TestCase): def test_a(self): self.assertEqual(1 + 1, 2) - On a branch, change
tests/test_alpha.py, then rungstack-pregate run --stage tests --only lanes --base origin/main --allow-repo-commands.
Found while fixing mixed .mjs + .py root selections, which today get no runner at all (PR follows). Once each language gets its own runner, the Python part hits this on such a machine. This issue is pre-existing and separate from that PR.
Readiness report
gstack doctor 1.91.275.0
ok install root ~/.claude/skills/gstack: claude global current (1.91.275.0)
ok rescue refs none in ~/.claude/skills/gstack
ok state root ~/.gstack durable=yes (selected by default)
ok bun 1.4.3 at /opt/homebrew/bin/bun (floor 1.3.3, tested 1.4.2)
ok hooks 9 hook(s) parse
ok codex codex-cli 0.164.0; self-locate ok; model gpt-6.1-sol (source: ~/.codex/config.toml model)
ok codex probe cached MODEL_OK, 17h ago (not re-run; --live probes now)
not configured artifacts sync off; cross-machine artifacts sync is unavailable
ok browse bundle browse/dist built
ok binaries find-browse, design, pdf, gstack-global-discover launch (4 of 4)
ok cso native helper 1.91.275.0 (f8d0ab033914)
ok claude code 2.1.312 (Claude Code) at ~/.local/bin/claude
ok session journal largest of 60: 36.3 MiB
ok guard log 30 decisions (4 denied)
warn CLAUDE.md the gstack section in ~/.claude/CLAUDE.md lists 39 skills; …
13 ok, 1 warn, 1 not configured, 0 fail
The repro above was also run against upstream main (1.91.311.0), with the same result.
Environment
- Host (Claude Code, Codex, Cursor, ...) and its version: Claude Code 2.1.312
- OS: macOS 26.6.2, Python 3.15 (Homebrew), no pytest installed
- 主要言語
- TypeScript
- スター
- 138k
- フォーク
- 20.5k
- 平均マージ
- 9時間 4分
- マージ済み PR(30日)
- 364
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
garrytan/gstack のほかの issue
-
ubicloud: usage is an awk syntax error on macOS, which also disables the vCPU quota preflight対応中かも @garrytan が今日担当しました。 オープンS3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
ubicloud: reap and up die with "invalid VM name '-'" on a project with no VMs対応中かも @garrytan が今日担当しました。 オープンS3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
gstack-jsonl-merge: non-UTF-8 redirected Python stdout fails on Unicode JSONL and emits CRLF on Windows対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンS2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
autoplan guard: init via `cd <outside dir> &&` permanently denies the session with code evidence (host appends "Shell cwd was reset" to the JSON result)対応中かも @garrytan が今日担当しました。 オープンS3
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
lib/pricing.ts has no rows for claude-haiku-5-5, gemini-4-argon or TypeSafe Jev, so gstack-eval-plan refuses those arms (EVAL_PRICE_MISSING)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンenhancement S3
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
garrytan/gstack#3640 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
garrytan/gstack の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
Doist/todoist-sdk-typescript#740 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster no-stale P1
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
steipete/oracle#614 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MoonshotAI/kimi-code#4591 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Koenkk/zigbee-herdsman-converters#13656 ·
メンテナーはふだん 2 日以内に返信
-
check:passed streams:remove
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信