Skip to content

feat: Phase 2 DI, settings, secrets, package layout - #11

Merged
soos3d merged 1 commit into
mainfrom
feat/phase-2
Aug 10, 2026
Merged

feat: Phase 2 DI, settings, secrets, package layout#11
soos3d merged 1 commit into
mainfrom
feat/phase-2

Conversation

@soos3d

@soos3d soos3d commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • create_app() + DI: routers take deps from app.state via api/deps.py; all route set_* globals removed
  • pydantic-settings SpectraXSettings with YAML + SPECTRAX_* env overrides; SurveillanceConfig adapter kept temporarily
  • SecretsStore: file (mode 0600) / keyring / memory; credentials facade unchanged for callers
  • Package moves: recording/, detection/, api/; shims at old import paths
  • CLI: serve and doctor; config prints deprecation; no more os._exit watchdog
  • Deploy: deploy/systemd/{spectrax,mediamtx}.service + README

Still open (follow-ups on this phase)

  • Lifespan fully owns MediaMTX child spawn (mediamtx.managed)
  • Hard-delete run/detect; finish CLI collapse
  • Coverage ratchet toward 80%

Test plan

  • 52 tests green: characterization, auth, config, secrets, app factory, layout
  • Ruff E,F,B on Phase 2 paths
  • CI Ubuntu 3.11/3.12
  • Optional: spectrax doctor and spectrax serve with MediaMTX locally

Introduce create_app() with app.state DI (routes no longer use set_*
globals), pydantic-settings SpectraXSettings, SecretsStore
(file/keyring/memory) behind the credentials facade, and package moves
into recording/, detection/, and api/. Add serve/doctor CLI entry points,
deploy/systemd units, and tests for config/secrets/app factory. Phase 0
characterization and auth suites remain the regression net.
@soos3d
soos3d merged commit 11287bc into main Aug 10, 2026
2 checks passed
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