Python adapter test: interpreter probed twice can disagree on Windows (python3 vs python), failing CI at random
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github-actions, python, typescript
- 領域
- ci-cd, testing-qa
調査の方向性
まず tests/repo/python-adapter.test.ts、特に111行目付近のインタープリターに関するアサーションを確認し、次に src/repo/adapters/python.ts と70行目付近のテストにおけるインタープリターの設定を読みます。Pythonアダプタのテストを実行し、解析時に記録されたインタープリターと比較しているか、そうでなければ作業ディレクトリによって異なるPython 3の起動コマンドを許容しているかを確認します。Windowsでの失敗が、別々に行われる2回のインタープリター照会に依存しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
tests/repo/python-adapter.test.ts ("selects the pytest files a change reaches and runs them with the interpreter it found") failed once on check (windows-latest, 24) for the docs-only PR #291 (run 44200296961, job 134452346206). The other three check jobs in that run passed:
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ executable: 'python3'
- executable: 'python'
at TestContext.<anonymous> (D:\a\core\core\tests\repo\python-adapter.test.ts:111:14)
Why it can disagree. The test and the adapter each probe for an interpreter, in different directories and at different times:
- The test computes the expected interpreter once at module load:
const interpreter = pythonInterpreter(process.cwd());(L70). - The adapter calls
pythonInterpreter()again, with the fixture's temp directory ascwd, when it builds the graph. pythonInterpreter()(src/repo/adapters/python.tsL74) triespython3, thenpython, thenpy -3, each with a 10 sspawnSynctimeout, and takes the first that prints3.
On Windows runners, python3 is often the App Execution Alias stub or a slow first start. One probe can fail or time out on python3 and fall through to python, while the next probe succeeds with python3. The command the adapter writes is valid either way, but the assertion pins the test's own probe result.
This is not the known Rust temp-dir EBUSY/EPERM flake (#235); the failing test and the error are different. Recent Windows failures on other PRs were all the Rust one, so this looks rare.
Expected: the test asserts the interpreter the analysis recorded (or any working Python 3 launcher), not a second independent probe. Alternatively, pythonInterpreter() gives the same answer for the whole process, so one run cannot get two different interpreters.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 4
- 平均マージ
- 18時間 41分
- マージ済み PR(30日)
- 48
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DiffCI/core のほかの issue
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at random対応中かも @FredApps が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
Agent tools: changed_files lists only the new path of a renamed file対応中かも @FredApps が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
adapter good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
adapter bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
agent-ready area: ui-server priority: p3 type: test
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
schlessera/brain-kit#4249 ·
メンテナーはふだん 1 日以内に返信
-
documentation tool triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
can1357/oh-my-pi#19608 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
dependencies tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
bcgov/nr-waste-plus#1549 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
blixvip/solana-tx-parse#18 ·