feat: Coverage-Drohne (sin-code cover) with scan, check, gaps, generate, hook - #239
Merged
Conversation
added 3 commits
June 16, 2026 22:28
Coverage batch: autodev, codegraph, resource, sandbox, memory, mcpclient, permission, style, catalog, testutil, triage, usage, summary, stopgate, learning, security/sca. Adds package-level hooks for testable error paths and expands tests to hit all statements. Issue: coverage retroactive backfill
# Conflicts: # cmd/sin-code/internal/memory/memory_more_test.go
…te, hook - New cmd/sin-code/internal/coverdrohne package at 100% statement coverage. - New sin-code cover subcommand: scan, check, gaps, generate, hook. - Wired NewCoverCmd into the root cobra command. - Updated golden help text. - Added cover_cmd.doc.md with SOTA design notes (TestGen-LLM, Qodo Cover). The hook subcommand prints or installs a git pre-commit script that runs sin-code cover check --min 100, so coverage is checked before every commit. Refs coverage automation / test-creation hooks follow-up.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Deployment failed with the following error: Learn More: https://vercel.com/manheiler-8784s-projects?upgradeToPro=build-rate-limit |
🏆 CEO Audit — A+ (100.0/100)
📥 Download full report (Markdown)
|
🏆 CEO Audit — A+ (100.0/100)
📥 Download full report (Markdown) Run ID:
|
| } | ||
|
|
||
| func defaultRunGoTest(dir, packages, coverprofile string) ([]byte, error) { | ||
| cmd := exec.Command("go", "test", packages, "-count=1", "-p=1", "-coverprofile="+coverprofile) |
| coverprofile := filepath.Join(tmpDir, "coverage.out") | ||
| out, err := runGoTestHook(root, packages, coverprofile) | ||
| if err != nil { | ||
| os.RemoveAll(tmpDir) |
| return nil, fmt.Errorf("go test failed: %w\n%s", err, string(out)) | ||
| } | ||
| if s.Verbose { | ||
| os.Stderr.Write(out) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Introduces
sin-code cover, the Coverage-Drohne tool for SIN-Code.scan— package coverage table (text/JSON)check— CI gate with--mincoverage thresholdgaps— uncovered functions/blocks per packagegenerate— AI test-generation request JSONhook— print or install a git pre-commit coverage gateCoverage
The
cmd/sin-code/internal/coverdrohnepackage is at 100% statement coverage (go tool cover -func).SOTA design
The implementation follows the same principles as Meta TestGen-LLM and Qodo Cover:
The
hooksubcommand is the first test-creation automation hook: it installs a pre-commit script that refuses commits while any package is below the configured coverage threshold.Notes
go test ./cmd/sin-code/internal/coverdrohne -coverprints a 75% summary line in Go 1.26.4; the coverage profile is 100% pergo tool cover -func. This appears to be a display quirk in this Go version for the package-level summary.Closes the coverage automation tooling step.