CI: no coverage report; integration tests and scanners not separable
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
調査の方向性
Start with .github/workflows/ci.yml (the test and sandbox jobs) and Makefile, then read the TestIntegration* guards in internal/sandbox/integration_test.go and internal/engine/integration_test.go. Done means the coverage figure is published in CI, make test-short skips the container tests, and TestExternalScannersInstalled in internal/seed/external_test.go can be run against installed scanners. The scanner and CI parts need maintainer input on pinned versions and coverage floors before work starts.
索引モデルが issue の本文から書いたものです。
説明
Summary
CI reports no coverage, container integration tests cannot be excluded from a plain make test, and the external scanner adapters are never run against the real tools.
Where
.github/workflows/ci.yml:40.github/workflows/ci.yml:73internal/sandbox/integration_test.go:19internal/engine/integration_test.go:55internal/bench/run_test.go:381Makefile:22internal/seed/external_test.go:410internal/seed/external_test.go:415internal/seed/external_test.go:433.github/workflows/ci.yml:41
Details
No workflow, Makefile target or make.ps1 target produces a coverage profile (a search for coverprofile, codecov and coverage in .github, Makefile, make.ps1 and action.yml finds only rm -rf ... coverage.out in clean). Coverage therefore fell to 30.0% for internal/cli and 52.8% for internal/gitx with nothing reporting it. Separately, the 13 TestIntegration* tests have no build tag and no testing.Short() guard (sandbox/integration_test.go:19-32, engine/integration_test.go:55-73); they run in every plain go test ./... on a machine with Docker, and the Linux test job runs them twice per push (once in test, once in sandbox). In this audit's run they took 9 to 19 seconds each (internal/sandbox 58 s in total), and TestRunDeterministicRealCorpus took 50 s; only that test and the scanner test honor -short (bench/run_test.go:381, seed/external_test.go:418). There is no documented fast loop: CONTRIBUTING.md:65 and AGENTS.md:16 give only make test.
TestExternalScannersInstalled runs each adapter only when its binary is on PATH and skips otherwise (external_test.go:415-417); for semgrep, osv-scanner and trivy a failed run is also turned into a skip (433-435). No workflow installs any of the five scanners, and there is no equivalent of SPACKLE_REQUIRE_RUNTIME for them, so in CI all five subtests skip on every run. In this audit's run 4 of 5 skipped (only gitleaks is installed here). The rest of external_test.go checks parsers against JSON written by hand in the test file.
Impact
Coverage gaps like the ones above appear without notice. Local make test takes several minutes on a developer machine with Docker running, which discourages running it.
The command lines Spackle builds (external.go, 837 lines) and the output shapes it parses are pinned only to hand-written samples. A scanner release that renames a flag or a JSON field makes the adapter fail or return nothing for users, and CI stays green. A missing lead source is a silent loss of recall.
Suggested fix
(1) In the Linux test job add -coverprofile=coverage.out -coverpkg=./internal/... to one matrix cell, print go tool cover -func to the job summary, and fail when the total or a named package (internal/cli, internal/gitx, internal/engine) drops below an agreed floor. (2) Make the integration tests skip under -short (add the check to integrationRuntime and to TestIntegrationRealSandboxProofAndFix, but keep SPACKLE_REQUIRE_RUNTIME=1 overriding it), add a test-short target to Makefile and make.ps1 running go test -short -shuffle=on ./..., and document it and the single-test form (go test -run TestName ./internal/pkg) in CONTRIBUTING.md. (3) Run the matrix test job with -short on Linux so the container tests run once, in the sandbox job.
Add a scheduled and manually triggered Linux job that installs pinned versions of gitleaks, hadolint, semgrep, osv-scanner and trivy and runs go test -run TestExternalScannersInstalled ./internal/seed with a new SPACKLE_REQUIRE_SCANNERS=1 that turns both skips into failures (mirroring integration_test.go:25-27). In that mode also assert a minimum result per tool on the planted tree: semgrep reports the os.system call, hadolint reports the latest tag or root user, gitleaks reports the planted token (already asserted at external_test.go:440). Save one real output file per pinned scanner version under internal/seed/testdata/ and feed it to the existing parser tests so parser regressions are caught on every PR without the tools.
Acceptance criteria
- CI publishes a coverage figure
- A short-mode or tag separates container tests
- One CI job runs the adapters against installed scanners
-
make lint,make testandmake buildpass
Getting started
- Relevant files:
.github/workflows/ci.yml,internal/sandbox/integration_test.go,internal/engine/integration_test.go,internal/bench/run_test.go,Makefile,internal/seed/external_test.go - How to run tests:
make test(Unix) or.\make.ps1 test(Windows PowerShell); lint withmake lint - Related docs:
CONTRIBUTING.md,AGENTS.md,docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 35948f7. Severity: low. Effort: M. audit-key: ci|.github/workflows/ci.yml|jobs.test
- 主要言語
- Go
- スター
- 0
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/Spackle のほかの issue
-
enhancement good first issue severity: low
難易度 2/5 半日 初心者へのやさしさ 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TMHSDigital/Spackle#135 ·
-
bug good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
TMHSDigital/Spackle#131 ·
-
bug good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TMHSDigital/Spackle#129 ·
TMHSDigital/Spackle の issue をすべて見る
似ている issue
-
bug raised-by:reviewer
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
medici-finance/assay#7655 ·
メンテナーはふだん 1 日以内に返信
-
helm chart: make DaemonSet pod affinity configurable via values.yaml対応中かも @Young-Zen が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
flannel-io/flannel#2632 ·
メンテナーはふだん 6 日以内に返信
-
go-vulnerability security-scan
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
teslashibe/agent-go#36 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nwverse/persona#15194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug flaky-test
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rosskukulinski/tailworks#411 ·
メンテナーはふだん 1 日以内に返信