{"record":{"id":"fb7c689a835a051b","repo":"santifer/career-ops","slug":"cv-fact-check-warning-basename-inputpath","errorCode":null,"errorMessage":"⚠️  CV fact check warning: ${basename(inputPath)}","messagePattern":"⚠️  CV fact check warning: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"generate-pdf.mjs","lineNumber":1363,"sourceCode":"  // normalized HTML, which is the document that actually prints.\n  if (!skipFactCheck && cvMarkdown) {\n    // Imported lazily, INSIDE the guard. A static import is resolved at module\n    // load whether or not this branch runs, and the page-budget/batch suites copy\n    // generate-pdf.mjs alone into a temp workspace — a static import of a sibling\n    // that isn't copied made every one of those suites die with\n    // ERR_MODULE_NOT_FOUND before reaching the behaviour under test. Those\n    // fixtures also ship no cv.md, so this branch is never entered there. If the\n    // module is genuinely missing in a real workspace this throws and the render\n    // fails, which is the correct direction to fail for a fact gate.\n    const { assertFacts } = await import('./verify-cv-facts.mjs');\n    const factCheck = assertFacts(html, { label: basename(inputPath) });\n    // Ahead of the verdict, because it qualifies it: with no config the phrase\n    // lists are empty, so a \"passed\" below covers metrics and facts only.\n    if (factCheck.configMissing) {\n      console.warn('⚠️  No config/cv-facts.json — forbidden/advisory phrase checks did not run.');\n    }\n    if (factCheck.verdict === 'warn') {\n      console.warn(`⚠️  CV fact check warning: ${basename(inputPath)}`);\n      for (const phrase of factCheck.warnings) console.warn(`  - advisory phrase: ${phrase}`);\n    } else {\n      console.log('✅ Fact check passed');\n    }\n  }\n\n  return renderHtmlToPdf(html, outputPath, {\n    format,\n    baseDir: dirname(inputPath),\n    reportNum,\n    inputPath,\n    maxPages,\n    strictPages,\n    styleTokens: readStyleTokens(resolve(workspaceRoot, 'config', 'profile.yml')),\n  });\n}\n\n/**","sourceCodeStart":1345,"sourceCodeEnd":1381,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/generate-pdf.mjs#L1345-L1381","documentation":"generate-pdf.mjs runs a fact-check pass over the generated CV (metrics and facts against config/cv-facts.json, plus forbidden/advisory phrase lists). When the fact-check verdict is 'warn', it prints this warning naming the input file, followed by one line per advisory phrase found. It is a non-fatal console.warn: the PDF still renders.","triggerScenarios":"Running the CV/PDF mode when factCheckCV() returns verdict 'warn' — i.e. the CV text contains phrases on the advisory list (hedged or risky wording) but nothing on the forbidden list.","commonSituations":"CV drafts containing advisory phrasing like 'helped with', 'involved in', or unquantified claims the phrase lists flag; authors reviewing generated PDFs before sending them out.","solutions":["Read the '  - advisory phrase:' lines printed immediately after and rewrite those phrases in cv.md or the generated CV","Re-run the PDF generation and confirm the verdict changes to '✅ Fact check passed'","If a flagged phrase is actually fine, add it to an allowlist in config/cv-facts.json","If config/cv-facts.json is missing, create it so forbidden/advisory checks actually run (the warning above this one indicates they were skipped)"],"exampleFix":"// before\ndraft: \"I was involved in migrating the pipeline\"\n// after\ndraft: \"Migrated the ingestion pipeline, cutting batch time 40%\"","handlingStrategy":"validation","validationCode":"// run the fact-check standalone before rendering\nconst fc = await factCheckCV(cvText, config);\nif (fc.verdict === 'warn') fc.warnings.forEach(w => console.log('advisory:', w));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep config/cv-facts.json present so phrase checks actually run","Lint cv.md against the advisory phrase list before each PDF build","Treat the '✅ Fact check passed' line as a release gate for CVs"],"tags":["cv","fact-check","pdf-generation","console-warning"],"backgroundTag":"schema-validation-failed","analyzedSha":"aac998c7ed7248ea853b720ceeb1fdbeb322fc5d","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}