Skip to content

test audit#44

Merged
hugoh merged 5 commits into
mainfrom
test-audit
Jul 1, 2026
Merged

test audit#44
hugoh merged 5 commits into
mainfrom
test-audit

Conversation

@hugoh

@hugoh hugoh commented Jul 1, 2026

Copy link
Copy Markdown
Owner
  • fix(runner): guard errgroup.SetLimit against zero concurrency
  • test(tui): wire goleak into TestMain and fix shared-fixture leak risk
  • test(backend): isolate git/jj integration tests from ambient config
  • chore(mise): remove unused test-int task
  • test: cover previously-untested code paths and add subtests

hugoh added 5 commits July 1, 2026 06:20
A zero-value Concurrency (e.g. a bare model/config struct in tests, or
future misconfiguration) made every errgroup.Go() block forever on a
zero-capacity semaphore, permanently leaking the fan-out goroutine.
Caught by wiring goleak into the tui test suite.

Also isolates the git-shelling runner tests from the developer's
ambient global git config, skips them consistently when git isn't on
PATH, and adds coverage for ResultColor and the zero-concurrency path.
Detects goroutine leaks in internal/tui and cmd; ignores the one
known non-fixable leak inside the third-party teatest library. Also
converts internal/tui's shared package-level test config into a
constructor so future test mutations can't leak across tests, and
switches update_test.go's bash-based git setup to exec.CommandContext,
isolated from the developer's ambient git config.
git and jj tests that shell out to real binaries now skip consistently
when the binary is missing (previously jj tests skipped but git tests
hard-failed), and set HOME/GIT_CONFIG_GLOBAL/JJ_CONFIG so a
developer's or CI runner's global VCS config can't change test
behavior. jj tests also configure a fixed user identity instead of
relying on ambient jj config for commits/describes.
No test in the repo carries //go:build integration, so test-int has
always been a no-op; drop it and its ci-core dependency instead of
keeping dead scaffolding around.
Adds coverage for runShellInteractive (cmd), Repo.ActiveBackend
(config), the confirmModel bubbletea component and Out/Warnf/WarnStyle
(ui). Also splits theme.TestStateColor/TestColorCode into named,
parallel subtests instead of one bulk assertion loop.
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@deepsource-io

deepsource-io Bot commented Jul 1, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in a359908...81ce7c0 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Go Jul 1, 2026 11:44a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.78%. Comparing base (a359908) to head (81ce7c0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
+ Coverage   87.54%   88.78%   +1.24%     
==========================================
  Files          34       34              
  Lines        3637     3638       +1     
==========================================
+ Hits         3184     3230      +46     
+ Misses        354      311      -43     
+ Partials       99       97       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hugoh hugoh merged commit 264af0b into main Jul 1, 2026
7 checks passed
@hugoh hugoh deleted the test-audit branch July 1, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant