@@ -4,6 +4,7 @@ import fs from 'node:fs';
44import os from 'node:os' ;
55import path from 'node:path' ;
66import { guardedAudit , sanitizeAuditInputs } from '../lib/audit-guard.mjs' ;
7+ import { audit as pipelineAudit } from '../lib/pipeline.mjs' ;
78import { projectPaths , sha256 , writeJson } from '../lib/core.mjs' ;
89
910function pageText ( page ) {
@@ -56,6 +57,19 @@ test('deterministic failure stops before the costly audit provider', async () =>
5657 assert . equal ( summary . pass , false ) ;
5758} ) ;
5859
60+ test ( 'legacy llmEnabled config is migrated to deterministic-only audit with provider calls zero' , async ( ) => {
61+ const { root, paths, pages } = fixture ( ) ;
62+ writeJson ( paths . plan , { schemaVersion : '2.0' , pages : [ pages [ 0 ] ] } ) ;
63+ const result = await pipelineAudit ( root ) ;
64+ const migrated = JSON . parse ( fs . readFileSync ( paths . config , 'utf8' ) ) ;
65+ assert . equal ( migrated . audit . llmMode , 'off' ) ;
66+ assert . equal ( migrated . audit . requiredSectionsAsWarnings , true ) ;
67+ assert . equal ( result . pass , true ) ;
68+ assert . equal ( result . llmAuditedPages , 0 ) ;
69+ assert . equal ( result . highRiskFindings , 0 ) ;
70+ assert . equal ( result . llmSkippedReason , 'llm-audit-off' ) ;
71+ } ) ;
72+
5973test ( 'sanitizer drops out-of-context evidence and refs and downgrades unsupported FACT' , ( ) => {
6074 const { root, paths, pages } = fixture ( ) ;
6175 const page = pages [ 0 ] ;
0 commit comments