From 417133afce8fc5597884ace1408fb6fd794a3787 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Tue, 17 Feb 2026 16:49:26 -0500 Subject: [PATCH] refactor: Export test compatibility functions from worker package - Added DirOverallSHA256Hex re-export from integrity package - Added NormalizeSHA256ChecksumHex re-export from integrity package - Added integrity import to worker.go - Fixed import errors for test compilation Build status: Compiles successfully --- internal/worker/worker.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/worker/worker.go b/internal/worker/worker.go index 70f15f3..90c501e 100644 --- a/internal/worker/worker.go +++ b/internal/worker/worker.go @@ -11,6 +11,7 @@ import ( "github.com/jfraeys/fetch_ml/internal/metrics" "github.com/jfraeys/fetch_ml/internal/resources" "github.com/jfraeys/fetch_ml/internal/worker/executor" + "github.com/jfraeys/fetch_ml/internal/worker/integrity" "github.com/jfraeys/fetch_ml/internal/worker/lifecycle" ) @@ -138,3 +139,13 @@ func (w *Worker) getGPUDetector() GPUDetector { func SelectDependencyManifest(filesPath string) (string, error) { return executor.SelectDependencyManifest(filesPath) } + +// DirOverallSHA256Hex re-exports the integrity function for test compatibility. +func DirOverallSHA256Hex(root string) (string, error) { + return integrity.DirOverallSHA256Hex(root) +} + +// NormalizeSHA256ChecksumHex re-exports the integrity function for test compatibility. +func NormalizeSHA256ChecksumHex(checksum string) (string, error) { + return integrity.NormalizeSHA256ChecksumHex(checksum) +}