soulsync/tests/automation
BoulderBadgeDad 40149d09f7 video automations: 'Scan Video Library' — the first video twin (shared engine)
The video side gets its OWN automations at music-side parity, kept separate so
nothing on the music side breaks. First twin: Scan Video Library — tells the media
server to rescan the user's SELECTED video sections (movies/TV, never music), then
reads the result into video.db so freshly-downloaded media shows as owned.

Architecture (scope tags + video twins on the shared engine):
- Handler core/automation/handlers/video_scan_library.py — pure function with
  injected I/O (server_refresh / run_video_scan); production lazily binds
  refresh_video_server_sections() + the video scanner. Owns its own progress.
  Lives on the SHARED automation side so it may import core.video (isolation only
  forbids core/video & api/video from importing music, not the reverse).
- blocks.py gains a 'scope' tag ('both' generic / 'video' video-only / absent=music)
  + blocks_for_scope(). The music /api/automations/blocks now filters out video
  blocks; new isolated /api/video/automations/blocks serves the video palette.
- automation_engine seeds 'Scan Video Library' (owned_by='video', schedule 6h) so
  it appears ONLY on the video Automations page; ensure_system_automations now
  honours owned_by + action_config. Music page excludes owned_by='video' rows.

kettui: seam-level tests for every handler path (happy/no-server/scan-error/never-
raises/mode), scope filtering (music excludes video, video gets generics, music
parity preserved), seeding (owned_by + mode), registration drift guard. 39 new
tests; full automation suite (288) + isolation guards green.
2026-06-19 19:38:18 -07:00
..
__init__.py Lift /api/automations/* into core/automation/ 2026-04-27 18:05:14 -07:00
test_automation_api.py Add owned_by column for Auto-Sync schedule ownership 2026-05-24 23:40:22 -07:00
test_automation_blocks.py video automations: 'Scan Video Library' — the first video twin (shared engine) 2026-06-19 19:38:18 -07:00
test_automation_progress.py Lift /api/automations/* into core/automation/ 2026-04-27 18:05:14 -07:00
test_automation_signals.py Lift /api/automations/* into core/automation/ 2026-04-27 18:05:14 -07:00
test_engine_profile_context.py Automations: run each as its OWNER profile in the background (part 1 of per-profile sync) 2026-06-10 15:37:56 -07:00
test_engine_schedule_integration.py video automations: 'Scan Video Library' — the first video twin (shared engine) 2026-06-19 19:38:18 -07:00
test_handler_error_storage.py Harden playlist pipeline source refresh 2026-05-24 19:31:00 -07:00
test_handler_registration.py video automations: 'Scan Video Library' — the first video twin (shared engine) 2026-06-19 19:38:18 -07:00
test_handler_video_scan_library.py video automations: 'Scan Video Library' — the first video twin (shared engine) 2026-06-19 19:38:18 -07:00
test_handlers_maintenance.py Remove old auto-acting Quality Scanner tool (replaced by Quality Upgrade Finder job) 2026-06-13 12:14:45 -07:00
test_handlers_personalized_pipeline.py Remove old auto-acting Quality Scanner tool (replaced by Quality Upgrade Finder job) 2026-06-13 12:14:45 -07:00
test_handlers_playlist.py Remove old auto-acting Quality Scanner tool (replaced by Quality Upgrade Finder job) 2026-06-13 12:14:45 -07:00
test_handlers_simple.py Remove old auto-acting Quality Scanner tool (replaced by Quality Upgrade Finder job) 2026-06-13 12:14:45 -07:00
test_playlist_pipeline_folder_mode.py Remove old auto-acting Quality Scanner tool (replaced by Quality Upgrade Finder job) 2026-06-13 12:14:45 -07:00
test_progress_callbacks.py Remove old auto-acting Quality Scanner tool (replaced by Quality Upgrade Finder job) 2026-06-13 12:14:45 -07:00
test_schedule.py Close three review gaps before PR 1 ships 2026-05-27 11:33:05 -07:00