CLI: a Go or Python project with a tooling-only package.json gets no full test command

オープン
#292 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@FredApps がすでに取り組んでいます。

2026年11月17日 から。

  • #293 @FredApps による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go, python, typescript
領域
cli, testing

調査の方向性

Start with inferFullCommand in packages/diffci-cli/src/client/full-command.ts and trace how it handles a root package.json without a test script before checking Go and Python project files. Reproduce with the Python or Go setup in the issue and run diffci verify --changed. Done when a tooling-only package.json no longer blocks full command inference, while the two stated package.json cases retain their behavior; pull request #293 is already open.

索引モデルが issue の本文から書いたものです。

説明

inferFullCommand (packages/diffci-cli/src/client/full-command.ts) returns { reason: "package.json has no test script" } as soon as it finds a root package.json without a test script. It never reaches the go.mod and Python checks below it. Many Go and Python repositories keep a package.json only for tooling (prettier, husky, commitlint). For them the full command is never inferred, though the engine selects their tests as Go or Python tests.

Repro: a Python project: pyproject.toml, app.py, tests/test_app.py (pytest), and a package.json with only {"private": true, "devDependencies": {"prettier": "3.0.0"}}. Commit it, edit pyproject.toml (a configuration change, which needs the full suite), and run diffci verify --changed. The Go equivalent is go.mod plus the same package.json.

Expected: the full command is python3 -m pytest (or go test ./...), as without the package.json.

Actual: verify is BLOCKED with "package.json has no test script". inferFullCommand returns that reason for the repository directly.

A package.json that does have a test script still wins, and a package.json with no test script and no other project still reports "package.json has no test script".

主要言語
TypeScript
スター
0
フォーク
4
平均マージ
18時間 41分
マージ済み PR(30日)
48

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DiffCI/core のほかの issue

DiffCI/core の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。