From 5548eae35d0edb99b18818a587bc708570d37d23 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 26 Apr 2026 15:54:43 -0500 Subject: [PATCH] chore: add debug logging to workflow sync deduplication --- lib/Enterprise/RepositorySynchronizer.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Enterprise/RepositorySynchronizer.php b/lib/Enterprise/RepositorySynchronizer.php index e867eb7..1be1d8d 100644 --- a/lib/Enterprise/RepositorySynchronizer.php +++ b/lib/Enterprise/RepositorySynchronizer.php @@ -195,7 +195,16 @@ class RepositorySynchronizer } } - $this->logger->logInfo("Loaded " . count($filesToSync) . " sync entries from definition for {$platform}"); + $defCount = count($filesToSync) - count($sharedFiles); + $sharedAdded = count($filesToSync) - $defCount; + $sharedTotal = count($sharedFiles); + $this->logger->logInfo("Loaded " . count($filesToSync) . " sync entries for {$platform} (def={$defCount}, shared={$sharedAdded}/{$sharedTotal} added, " . ($sharedTotal - $sharedAdded) . " deduped)"); + // Log shared workflow destinations for debugging + foreach ($sharedFiles as $sf) { + $dest = $sf['destination'] ?? '?'; + $added = !isset($seen[$dest]) ? 'ADDED' : 'DEDUPED'; + $this->logger->logInfo(" shared: {$dest} [{$added}]"); + } if (empty($filesToSync)) { $this->logger->logWarning("No syncable entries found in definition for platform '{$platform}', skipping {$repo}");