Skip to content

feat(setup): add generic setup test-connection endpoint#32

Merged
lan17 merged 6 commits intomainfrom
lev/wizard
Feb 26, 2026
Merged

feat(setup): add generic setup test-connection endpoint#32
lan17 merged 6 commits intomainfrom
lev/wizard

Conversation

@lan17
Copy link
Copy Markdown
Owner

@lan17 lan17 commented Feb 26, 2026

Summary

  • add POST /api/v1/setup/test-connection for non-persistent setup connectivity checks
  • add setup API models for test-connection payload/response in homesec.models.setup
  • implement setup service dispatch for camera | storage | notifier | analyzer probes with backend-specific validation and timeout handling
  • support camera probes for rtsp, ftp, local_folder, and onvif
  • include structured 400 mapping for unknown backends with available_backends hints
  • regenerate UI API artifacts (ui/src/api/generated/openapi.json, ui/src/api/generated/schema.ts)

Behavior Notes

  • probes are intentionally non-persistent: no config writes, no runtime reloads
  • plugin-based probes (storage/notifier/analyzer) validate config, instantiate plugin, run ping(), and always attempt shutdown()
  • route uses canonical API envelope on errors

Validation

  • DB_DSN=postgresql+psycopg://homesec:homesec@localhost:5433/homesec make check

Related Notion

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 88.51852% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.88%. Comparing base (9b7160f) to head (b51288d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/homesec/services/setup.py 87.80% 30 Missing ⚠️
src/homesec/app.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   82.74%   82.88%   +0.13%     
==========================================
  Files         107      107              
  Lines        9382     9650     +268     
==========================================
+ Hits         7763     7998     +235     
- Misses       1619     1652      +33     

☔ 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.

@lan17 lan17 merged commit 4a428d6 into main Feb 26, 2026
4 checks passed
@lan17 lan17 deleted the lev/wizard branch February 26, 2026 16:44
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