@@ -6,7 +6,7 @@ import { parseSpec } from "./spec.js";
66import { scanAnnotations } from "./annotations.js" ;
77import { computeCoverage , type CoverageResult } from "./cover.js" ;
88import { computeReviewTargets , verdictViolations , type ReviewTask } from "./review.js" ;
9- import { scanVerdicts } from "./verdict.js" ;
9+ import { legacyMigrationNotices , scanVerdicts , type MigrationNotice } from "./verdict.js" ;
1010import { runVerifyCommands } from "./verify.js" ;
1111import { allRequirements } from "./spec.js" ;
1212import type { Annotation , SpecFile , Verdict , Violation } from "./model.js" ;
@@ -27,6 +27,7 @@ export interface CheckContext {
2727 coverViolations : Violation [ ] ;
2828 reviewViolations : Violation [ ] ;
2929 malformedVerdictViolations : Violation [ ] ;
30+ migrationNotices : MigrationNotice [ ] ;
3031 verifyViolations : Violation [ ] ;
3132 notInitialized : boolean ;
3233 /** Present for `check --changed`; limits report counts and manual output to affected requirements. */
@@ -90,8 +91,11 @@ export function buildContext(root: string, options: BuildOptions = {}): CheckCon
9091 const allReviewTargets = computeReviewTargets ( config , specs , coverage , repoFiles , annotations , markerLineByFile ) ;
9192 const reviewTargets = config . reviews ? allReviewTargets : [ ] ;
9293 // Malformed verdict files are loud violations, not silent passes or skips (REQ-003.7.2).
93- const { verdicts, violations : malformedVerdicts } = scanVerdicts ( root ) ;
94- const reviewViolations = [ ...malformedVerdicts , ...verdictViolations ( reviewTargets , verdicts ) ] ;
94+ const verdictScan = scanVerdicts ( root ) ;
95+ const { verdicts, violations : malformedVerdicts , stableFiles } = verdictScan ;
96+ const currentReviewIds = new Map ( reviewTargets . map ( ( target ) => [ target . requirement . id , target . reviewId ] ) ) ;
97+ const migrationNotices = legacyMigrationNotices ( verdictScan , currentReviewIds ) ;
98+ const reviewViolations = [ ...malformedVerdicts , ...verdictViolations ( reviewTargets , verdicts , stableFiles ) ] ;
9599
96100 // [review: instructions: <path>] pointing at a missing file (REQ-005.1.4),
97101 // and [review: <globs>] matching nothing — a typo'd glob must fail loudly
@@ -135,6 +139,7 @@ export function buildContext(root: string, options: BuildOptions = {}): CheckCon
135139 coverViolations : coverage . violations ,
136140 reviewViolations,
137141 malformedVerdictViolations : malformedVerdicts ,
142+ migrationNotices,
138143 verifyViolations,
139144 notInitialized,
140145 } ;
@@ -145,6 +150,7 @@ export interface CheckReport {
145150 violations : Violation [ ] ;
146151 uncoveredRequirements : string [ ] ;
147152 staleReviews : string [ ] ;
153+ migrationNotices : string [ ] ;
148154 manualRequirements : { id : string ; text : string } [ ] ;
149155 requirementCount : number ;
150156 coveredCount : number ;
@@ -160,6 +166,7 @@ export function buildReport(ctx: CheckContext): CheckReport {
160166 violations,
161167 uncoveredRequirements : ctx . coverage . uncovered . map ( ( r ) => r . id ) ,
162168 staleReviews : ctx . reviewViolations . map ( ( v ) => v . message ) ,
169+ migrationNotices : ctx . migrationNotices . map ( ( notice ) => notice . message ) ,
163170 manualRequirements : ctx . coverage . manual . map ( ( r ) => ( { id : r . id , text : r . text } ) ) ,
164171 requirementCount : enforcedTestReqs . length ,
165172 coveredCount : ctx . coverage . covered . size ,
0 commit comments