Skip to content

Add E2E tests for skills overwrite protection and CLI#4010

Merged
ChrisJBurns merged 6 commits intomainfrom
3655-e2e-skills-tests
Mar 17, 2026
Merged

Add E2E tests for skills overwrite protection and CLI#4010
ChrisJBurns merged 6 commits intomainfrom
3655-e2e-skills-tests

Conversation

@JAORMX
Copy link
Copy Markdown
Collaborator

@JAORMX JAORMX commented Mar 5, 2026

Summary

Closes #3655

All server wiring, service implementation, handlers, and CLI commands were already complete. This PR adds the missing E2E test coverage identified in the acceptance criteria:

  • Overwrite protection tests (API-level): duplicate install → 409, reinstall after uninstall succeeds, force flag allows overwrite
  • Build + validate lifecycle (API-level): validate then build the same skill directory end-to-end
  • CLI-level E2E tests (new cli_skills_test.go): tests thv skill commands (validate, build, install, list, info, uninstall) via the compiled binary with TOOLHIVE_API_URL pointing to a test server — proving the full CLI → REST API → service flow

Test plan

  • Existing API skills E2E tests continue to pass (LABEL_FILTER=skills)
  • New overwrite protection tests pass
  • New CLI skills E2E tests pass
  • No regressions in other E2E tests

🤖 Generated with Claude Code

Add missing E2E test coverage for the skills lifecycle (issue #3655):

- Overwrite protection: test duplicate install returns 409, reinstall
  after uninstall succeeds, and force flag allows overwrite
- Build + validate lifecycle: validate then build the same skill dir
- CLI-level E2E tests: new cli_skills_test.go testing the full
  thv skill CLI → REST API → service flow including validate, build,
  install, list, info, uninstall, and a full lifecycle test

Closes #3655

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the size/S Small PR: 100-299 lines changed label Mar 5, 2026
The E2E CI matrix filters by label (core, mcp, api, etc). Without
the "api" label, CLI skills tests would not run in any CI job.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Mar 5, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.86%. Comparing base (29a2c67) to head (242922d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4010      +/-   ##
==========================================
+ Coverage   68.85%   68.86%   +0.01%     
==========================================
  Files         467      467              
  Lines       46983    46983              
==========================================
+ Hits        32349    32354       +5     
+ Misses      11974    11970       -4     
+ Partials     2660     2659       -1     

☔ View full report in Codecov by Sentry.
📢 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.

The force flag controls filesystem overwrite of unmanaged directories,
not DB duplicate bypass. A duplicate install with force still returns
409 because the DB record already exists. Updated the test expectation
to match this behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Mar 5, 2026
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Mar 12, 2026
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Mar 16, 2026
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Mar 17, 2026
@ChrisJBurns ChrisJBurns merged commit 16b1238 into main Mar 17, 2026
38 checks passed
@ChrisJBurns ChrisJBurns deleted the 3655-e2e-skills-tests branch March 17, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ServerBuilder wiring and E2E tests

4 participants