From c07254f93a1c4db1a5f44ed38e4601ed472c6214 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 20 Jan 2026 23:07:36 +0100 Subject: [PATCH] Remove SIC code mismatch check from company verification The SIC code mismatch check was flagging tech roles at companies not registered as technology businesses. This is not a reliable measure since many companies employ tech staff regardless of their SIC code. Co-Authored-By: Claude Opus 4.5 --- .../Services/CompanyVerifierService.cs | 61 +------------------ 1 file changed, 1 insertion(+), 60 deletions(-) diff --git a/src/TrueCV.Infrastructure/Services/CompanyVerifierService.cs b/src/TrueCV.Infrastructure/Services/CompanyVerifierService.cs index c05b1ae..6801fbd 100644 --- a/src/TrueCV.Infrastructure/Services/CompanyVerifierService.cs +++ b/src/TrueCV.Infrastructure/Services/CompanyVerifierService.cs @@ -71,14 +71,6 @@ public sealed class CompanyVerifierService : ICompanyVerifierService "manufacturing", "operations", "trading" }; - // SIC codes for tech/software companies - private static readonly HashSet TechSicCodes = new() - { - "62011", "62012", "62020", "62030", "62090", // Computer programming and consultancy - "63110", "63120", // Data processing, hosting - "58210", "58290", // Publishing of computer games, other software - "61100", "61200", "61300", "61900" // Telecommunications - }; public CompanyVerifierService( CompaniesHouseClient companiesHouseClient, @@ -189,10 +181,7 @@ public sealed class CompanyVerifierService : ICompanyVerifierService // Check 4: Company size vs job title CheckCompanySizeVsRole(flags, accountsCategory, jobTitle, match.Item.Title); - // Check 5: SIC code vs job title mismatch - CheckSicCodeMismatch(flags, sicCodes, jobTitle, match.Item.Title); - - // Check 6: Job title plausibility for PLCs + // Check 5: Job title plausibility for PLCs var (jobPlausible, jobNotes) = CheckJobTitlePlausibility(jobTitle, companyType); if (jobPlausible == false) { @@ -500,53 +489,6 @@ public sealed class CompanyVerifierService : ICompanyVerifierService } } - private static void CheckSicCodeMismatch( - List flags, - List? sicCodes, - string? jobTitle, - string companyName) - { - if (sicCodes is null || sicCodes.Count == 0 || string.IsNullOrWhiteSpace(jobTitle)) return; - - var title = jobTitle.ToLowerInvariant(); - - // Check if this is a tech role - var isTechRole = title.Contains("software") || - title.Contains("developer") || - title.Contains("engineer") || - title.Contains("programmer") || - title.Contains("data scientist") || - title.Contains("data analyst") || - title.Contains("devops") || - title.Contains("cloud") || - title.Contains("machine learning") || - title.Contains("ai ") || - title.Contains("frontend") || - title.Contains("backend") || - title.Contains("full stack") || - title.Contains("fullstack"); - - if (isTechRole) - { - // Check if company has any tech SIC codes - var hasTechSic = sicCodes.Any(s => TechSicCodes.Contains(s)); - - if (!hasTechSic) - { - // Get the primary SIC code description (simplified - just show code) - var primarySic = sicCodes.FirstOrDefault() ?? "Unknown"; - - flags.Add(new CompanyVerificationFlag - { - Type = "SicCodeMismatch", - Severity = "Info", - Message = $"Tech role '{jobTitle}' at '{companyName}' (SIC: {primarySic}) - company is not registered as a technology business", - ScoreImpact = -5 - }); - } - } - } - private static (bool? IsPlausible, string? Notes) CheckJobTitlePlausibility(string? jobTitle, string? companyType) { if (string.IsNullOrWhiteSpace(jobTitle) || string.IsNullOrWhiteSpace(companyType)) @@ -875,7 +817,6 @@ public sealed class CompanyVerifierService : ICompanyVerifierService CheckDissolutionDate(flags, endDate, cached.DissolutionDate, cached.Status, cached.CompanyName); CheckDormantCompany(flags, cached.AccountsCategory, jobTitle, cached.CompanyName); CheckCompanySizeVsRole(flags, cached.AccountsCategory, jobTitle, cached.CompanyName); - CheckSicCodeMismatch(flags, sicCodes, jobTitle, cached.CompanyName); var (jobPlausible, jobNotes) = CheckJobTitlePlausibility(jobTitle, cached.CompanyType); if (jobPlausible == false)