fix(worker): name quarantined prompt files and their replacements in the recovery Warn

PromptFileRecovery's orphan-quarantine log only reported a bare count, so a customized
merge-helper-execute.md silently stopped applying with no pointer to where it went. Log each
quarantined file's destination path, and for merge-helper-execute.md specifically call out that
it was split into merge-helper-wait.md and merge-helper-merge.md with no content migration.
This commit is contained in:
mika kuns
2026-08-11 16:55:32 +02:00
parent e343baf21a
commit 1003fdbf46
2 changed files with 62 additions and 3 deletions
@@ -24,10 +24,21 @@ public sealed class PromptFileRecovery : IHostedService
PromptFiles.ReconcileStaleDefaults(_root);
var orphans = PromptFiles.QuarantineOrphans(_root);
if (orphans.Count > 0)
_logger.LogWarning("Prompt file recovery: quarantined {Count} orphaned prompt file(s) into _orphans", orphans.Count);
else
if (orphans.Count == 0)
{
_logger.LogInformation("Prompt file recovery: no orphaned prompt files found");
return Task.CompletedTask;
}
foreach (var orphan_path in orphans)
{
_logger.LogWarning("Prompt file recovery: quarantined orphaned prompt file {orphan_path}", orphan_path);
if (Path.GetFileNameWithoutExtension(orphan_path)
.StartsWith("merge-helper-execute", StringComparison.OrdinalIgnoreCase))
_logger.LogWarning(
"Prompt file recovery: {orphan_path} was a customization of the retired merge-helper-execute.md prompt, which was split into merge-helper-wait.md and merge-helper-merge.md; its content was not migrated to either",
orphan_path);
}
return Task.CompletedTask;
}