CoverBot: Increased coverage for cmd/ package files with high churn and bug-fix history#225
CoverBot: Increased coverage for cmd/ package files with high churn and bug-fix history#225tusk-dev[bot] wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f00c45f. Configure here.
| require.Equal(t, "77", meta.PRNumber) | ||
| require.Equal(t, "gl-feature", meta.BranchName) | ||
| require.Equal(t, "pipeline-999", meta.ExternalCheckRunID) | ||
| }) |
There was a problem hiding this comment.
GitLab test missing GitHub env var cleanup
Medium Severity
TestValidateCIMetadata_GitLab "GitLab CI populates metadata from env vars" doesn't clear GITHUB_HEAD_REF or GITHUB_REF_NAME via t.Setenv. Since getBranchFromEnv() checks these GitHub env vars before the GitLab ones (without gating on GITHUB_ACTIONS), when this test runs on GitHub Actions — where those vars are set by the runner — the branch resolves to the GitHub value instead of "gl-feature", causing the require.Equal assertion to fail. The TestGetBranchFromEnv tests correctly clear both vars when testing GitLab paths, but this test does not.
Reviewed by Cursor Bugbot for commit f00c45f. Configure here.


This PR contains 49 unit tests across 2 test files.
CoverBot config: cmd files
File patterns:
cmd/**Why these files?
CoverBot targeted
cmd/run.goandcmd/unit_helpers.gobased on coverage gaps and git history.cmd/run.gostarted at 10.4% coverage with the highest churn in cmd/ (23 commits in 3 months) and 8 bug-fix commits, making it a high-risk file.cmd/unit_helpers.gojumped from 27.9% to 85.3% coverage with CoverBot's tests, covering pure string-parsing functions likeparseRepoSlugFromRemotewith multiple code paths. Both files contain well-isolated, testable symbols requiring no external API or TUI mocking, enabling stable, maintainable tests.Reviewers
Tagged @sohil-kshirsagar — 8+ commits to
cmd/run.gocovering CI status logic, coverage handling, and error handling in cloud mode. Tagged @jy-tan — multiple commits tocmd/run.gofor sandbox mode, branch/commit SHA env var handling, and JSON output logic.Files tested
cmd/run.gocmd/unit_helpers.goAvg +33% line coverage gain across 2 files
cmd/run.gocmd/unit_helpers.goCoverage is calculated by running tests directly associated with each source file, learn more here.
View test details on Tusk ↗