• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 21667999079
61%

Build:
DEFAULT BRANCH: main
Ran 04 Feb 2026 10:39AM UTC
Jobs 1
Files 490
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Feb 2026 10:31AM UTC coverage: 60.732% (+0.05%) from 60.687%
21667999079

push

github

web-flow
Add CLI validation for Desktop app alignment (#3535)

* feat(cli): add desktop alignment validation package

Add pkg/desktop/ package to detect and validate when ToolHive Desktop
manages CLI installation via marker file at ~/.toolhive/.cli-source.

- types.go: CliSourceMarker and ValidationResult structs
- marker.go: marker file reading and path utilities
- validation.go: path comparison and conflict detection logic

Related to: toolhive-studio#1512
RFC: THV-0020

* feat(cli): integrate desktop validation into root command

Add PersistentPreRunE hook to validate desktop alignment before
every CLI command. Returns hard stop error when conflict detected
between standalone CLI and Desktop-managed installation.

* test(cli): add desktop validation unit and e2e tests

- Unit tests for marker file parsing, path comparison, symlink resolution
- E2E tests for conflict scenarios, stale markers, and skip override

* fix(cli): address linter errors in desktop validation

- Simplify if-return in commands.go (revive)
- Add gosec nolint for marker file read (G304)
- Add paralleltest nolint for tests that modify HOME env
- Add goconst nolint for platform checks
- Fix gci import ordering and struct formatting

* test(cli): improve desktop validation test coverage

Add additional unit tests to improve coverage from ~70% to ~87%:
- Test MarkerFileExists() function
- Test ReadMarkerFile() function
- Test GetMarkerFilePath() function
- Test ValidateDesktopAlignment() with actual conflict
- Test CheckDesktopAlignment() with copy method
- Test buildConflictMessage() without desktop version
- Test ReadMarkerFileFromPath() with read error
- Test resolvePath() with relative paths
- Test pathsEqual() on both case-sensitive and case-insensitive platforms

Remaining uncovered lines are OS error paths that require mocking.

* fix(cli): add paralleltest nolint to test functions

* fix(windows): add logic for copy on windows

* refactor: adress feedback

142 of 185 new or added lines in 3 files covered. (76.76%)

3 existing lines in 2 files now uncovered.

40288 of 66337 relevant lines covered (60.73%)

75.83 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
0.0
0.0% cmd/thv/app/commands.go
7
83.72
pkg/desktop/marker.go
32
76.81
pkg/desktop/validation.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% cmd/thv/app/commands.go
2
94.67
-1.33% pkg/vmcp/composer/dag_executor.go
Jobs
ID Job ID Ran Files Coverage
1 21667999079.1 04 Feb 2026 10:39AM UTC 490
60.73
GitHub Action Run
Source Files on build 21667999079
  • Tree
  • List 490
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21667999079
  • 60ecf3f2 on github
  • Prev Build on main (#21667958360)
  • Next Build on main (#21668446476)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc