fix: remove dead definitionParser reference in RepositorySynchronizer
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Blocked by required conditions
Platform: moko-platform CI / Gate 4: Governance (push) Blocked by required conditions
Platform: moko-platform CI / Gate 5: Template Integrity (push) Blocked by required conditions
Platform: moko-platform CI / CI Summary (push) Blocked by required conditions
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 37s
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: Auto Version Bump / Version Bump (push) Failing after 3s

The definitionParser property was never initialized or implemented.
synchronizeRepository() crashed with "Call to a member function
parseForPlatform() on null". Replaced with direct use of
getSharedWorkflows() which provides all files to sync.
This commit is contained in:
Jonathan Miller
2026-06-06 12:09:14 -05:00
parent bfba45e8b5
commit ff5794d0cc
+6 -28
View File
@@ -173,37 +173,15 @@ class RepositorySynchronizer
$platform = $this->detectPlatform($repoInfo);
$this->logger->logInfo("Detected platform for {$repo}: {$platform}");
// Load file list from the Terraform definition for this platform
$filesToSync = $this->definitionParser->parseForPlatform($platform, $repoRoot);
// Append shared workflows — the parser can't extract them from nested
// subdirectories blocks due to heredoc interference in .tf files.
$sharedFiles = $this->getSharedWorkflows($platform, $repoRoot);
// Deduplicate by destination — shared workflows take precedence over parser entries
$seen = [];
foreach ($filesToSync as $f) {
$seen[$f['destination']] = true;
}
foreach ($sharedFiles as $f) {
if (!isset($seen[$f['destination']])) {
$filesToSync[] = $f;
}
}
$defCount = count($filesToSync) - count($sharedFiles);
$sharedAdded = count($filesToSync) - $defCount;
$sharedTotal = count($sharedFiles);
// Load shared workflows and config files for this platform from templates
$filesToSync = $this->getSharedWorkflows($platform, $repoRoot);
$sharedTotal = count($filesToSync);
$this->logger->logInfo(
"Loaded " . count($filesToSync) . " sync entries for {$platform}"
. " (def={$defCount}, shared={$sharedAdded}/{$sharedTotal} added, "
. ($sharedTotal - $sharedAdded) . " deduped)"
"Loaded {$sharedTotal} sync entries for {$platform}"
);
// Log shared workflow destinations for debugging
foreach ($sharedFiles as $sf) {
foreach ($filesToSync as $sf) {
$dest = $sf['destination'] ?? '?';
$added = !isset($seen[$dest]) ? 'ADDED' : 'DEDUPED';
$this->logger->logInfo(" shared: {$dest} [{$added}]");
$this->logger->logInfo(" sync: {$dest}");
}
if (empty($filesToSync)) {