CI: no coverage report; integration tests and scanners not separable
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Go
- Étoiles
- 0
- Forks
- 1
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TMHSDigital/Spackle
-
enhancement good first issue severity: low
Difficulté 2/5 Une demi-journée Accessibilité débutants 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
TMHSDigital/Spackle#135 ·
-
bug good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
TMHSDigital/Spackle#131 ·
-
runs and runs compare print target text without the control-character cleaning the reports useOuvertebug good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
TMHSDigital/Spackle#129 ·
Toutes les issues de TMHSDigital/Spackle
Issues similaires
-
bug raised-by:reviewer
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
medici-finance/assay#7655 ·
Les mainteneurs répondent en général sous 1 jour
-
helm chart: make DaemonSet pod affinity configurable via values.yamlPeut-être pris @Young-Zen l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
flannel-io/flannel#2632 ·
Les mainteneurs répondent en général sous 6 jours
-
go-vulnerability security-scan
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
teslashibe/agent-go#36 ·
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
nwverse/persona#15194 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug flaky-test
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
rosskukulinski/tailworks#411 ·
Les mainteneurs répondent en général sous 1 jour