Staging to Production #51

Merged
claude merged 165 commits from main into production 2026-06-08 18:28:46 +00:00
2 changed files with 6 additions and 5 deletions
Showing only changes of commit b114156e9c - Show all commits
@@ -125,9 +125,9 @@ public sealed class CvMatcherService : ICvMatcherService
var evidence = evidenceChunks.Count > 0 ? string.Join("\n\n", evidenceChunks.Take(4)) : Limit(job.Text, 4000); var evidence = evidenceChunks.Count > 0 ? string.Join("\n\n", evidenceChunks.Take(4)) : Limit(job.Text, 4000);
var systemPrompt = await _aiPrompts.GetAsync("ai.cv-match.system-prompt", language, ct) var systemPrompt = await _aiPrompts.GetAsync("ai.cv-match.system-prompt", language, ct)
?? (language == "ro" ?? throw new InvalidOperationException(
? "Ești un motor strict de potrivire CV-job. Returnează doar JSON. Punctează realist între 0 și 100." $"AI prompt not found: key='ai.cv-match.system-prompt', language='{language}'. " +
: "You are a strict CV-to-job matching engine. Return JSON only. Score realistically from 0 to 100."); $"This is a configuration error. Ensure the cvMatcher.AiPrompts table is properly seeded with language-specific prompts.");
var userPrompt = $""" var userPrompt = $"""
CV: CV:
@@ -37,8 +37,9 @@ public sealed class EmailTemplateService : IEmailTemplateService
&& _valueCache.TryGetValue(CacheKey(key, "en"), out var fallback)) && _valueCache.TryGetValue(CacheKey(key, "en"), out var fallback))
return fallback; return fallback;
_logger.LogWarning("Email template not found: key={Key}, language={Language}", key, language); throw new InvalidOperationException(
return key; $"Email template not found: key='{key}', language='{language}'. " +
$"This is a configuration error. Ensure the email.Templates table is properly seeded.");
} }
/// <inheritdoc /> /// <inheritdoc />