fetch_ml/internal/worker
Jeremie Fraeys 062b78cbe0
refactor: Phase 4 - Extract lifecycle types and interfaces
Created lifecycle package with foundational types for future extraction:

1. internal/worker/lifecycle/runloop.go (117 lines)
   - TaskExecutor interface for task execution contract
   - RunLoopConfig for run loop configuration
   - RunLoop type with core orchestration logic
   - MetricsRecorder and Logger interfaces for dependencies
   - Start(), Stop() methods for loop control
   - executeTask() method for task lifecycle management

2. internal/worker/lifecycle/health.go (52 lines)
   - HealthMonitor type for health tracking
   - RecordHeartbeat(), IsHealthy(), MarkUnhealthy() methods
   - Heartbeater interface for heartbeat operations
   - HeartbeatLoop() function for background heartbeats

Note: These are interface/type foundations for Phase 5.
The actual Worker struct methods remain in runloop.go until
Phase 5 when they'll migrate to use these abstractions.

Build status: Compiles successfully
2026-02-17 14:22:58 -05:00
..
execution refactor: Phase 4 deferred - Extract GPU utilities and execution helpers 2026-02-17 14:03:11 -05:00
executor refactor: Phase 2 - Extract executor implementations 2026-02-17 14:14:04 -05:00
integrity refactor: Phase 3 - Extract data integrity layer 2026-02-17 14:20:41 -05:00
interfaces refactor: Phase 1 - Extract worker interfaces 2026-02-17 14:10:03 -05:00
lifecycle refactor: Phase 4 - Extract lifecycle types and interfaces 2026-02-17 14:22:58 -05:00
artifacts.go perf: add profiling benchmarks and parallel Go baseline for C++ optimization 2026-02-12 12:04:02 -05:00
config.go refactor: Phase 4 - split worker package into focused files 2026-02-17 12:57:02 -05:00
data_integrity.go ci: push all workflow updates 2026-02-12 13:28:15 -05:00
execution.go refactor: Phase 4 deferred - Extract GPU utilities and execution helpers 2026-02-17 14:03:11 -05:00
factory.go refactor: Phase 4 - split worker package into focused files 2026-02-17 12:57:02 -05:00
gpu.go refactor: Phase 4 deferred - Extract GPU utilities and execution helpers 2026-02-17 14:03:11 -05:00
gpu_detector.go feat(worker): add integrity checks, snapshot staging, and prewarm support 2026-01-05 12:31:13 -05:00
hash_selector.go feat: add native library bridge and queue integration 2026-02-16 20:38:30 -05:00
jupyter_task.go feat(core): API, worker, queue, and manifest improvements 2026-02-12 12:05:17 -05:00
metrics.go refactor: Phase 4 - split worker package into focused files 2026-02-17 12:57:02 -05:00
native_bridge.go feat: implement C++ native libraries for performance-critical operations 2026-02-16 20:38:04 -05:00
native_bridge_libs.go feat: add native library bridge and queue integration 2026-02-16 20:38:30 -05:00
native_bridge_nocgo.go feat: add native library bridge and queue integration 2026-02-16 20:38:30 -05:00
runloop.go feat: add native library bridge and queue integration 2026-02-16 20:38:30 -05:00
snapshot_store.go perf: add profiling benchmarks and parallel Go baseline for C++ optimization 2026-02-12 12:04:02 -05:00
worker.go refactor: Phase 4 - split worker package into focused files 2026-02-17 12:57:02 -05:00