From b5282f5e00cfe0399cb3f125567db6a15cc0c8ca Mon Sep 17 00:00:00 2001 From: justin Date: Thu, 7 May 2026 10:59:59 -0500 Subject: [PATCH] Fix compliance checker: include structured_checks + pdf_checks from audit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was only reading pdf_checks, missing structured_checks. Also skip minor-only issues — show major/critical that match email campaign data. This fixes the "clean" result for carriers our audit flagged as deficient. Co-Authored-By: Claude Opus 4.6 (1M context) --- api/src/routes/fcc-lookup.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/src/routes/fcc-lookup.ts b/api/src/routes/fcc-lookup.ts index cca1a12..1c1c85d 100644 --- a/api/src/routes/fcc-lookup.ts +++ b/api/src/routes/fcc-lookup.ts @@ -291,8 +291,11 @@ router.get("/api/v1/fcc/lookup", async (req, res) => { ); if (auditRow.rows.length > 0) { const audit = auditRow.rows[0] as Record; - const pChecks = (audit.pdf_checks as Array<{ label: string; severity: string }>) || []; - for (const pc of pChecks) { + // Merge both structured and PDF audit checks + const pChecks = (audit.pdf_checks as Array<{ id?: string; label: string; severity: string }>) || []; + const sChecks = (audit.structured_checks as Array<{ id?: string; label: string; severity: string }>) || []; + for (const pc of [...sChecks, ...pChecks]) { + if (pc.severity === "minor") continue; // only show major/critical if (pc.label && !rmdIssues.some(i => i.label === pc.label)) { rmdIssues.push(pc); }