@@ -13,7 +13,7 @@ import type {
1313 Severity ,
1414 Suppression ,
1515 TraceFinding ,
16- TraceV2 ,
16+ TraceV3 ,
1717} from '../types.js'
1818
1919const SHA256 = / ^ s h a 2 5 6 : [ 0 - 9 a - f ] { 64 } $ /
@@ -134,7 +134,7 @@ function issueToFinding(issueInput: Issue): TraceFinding {
134134 return { fingerprint : findingFingerprint ( core ) , ...core , suppressed : false }
135135}
136136
137- export function hasRecordedAgentReview ( trace : TraceV2 ) : boolean {
137+ export function hasRecordedAgentReview ( trace : TraceV3 ) : boolean {
138138 return (
139139 trace . findings . some ( ( finding ) => finding . source === 'agent' || finding . source === 'external' ) ||
140140 trace . checks_executed . some ( ( execution ) => {
@@ -156,7 +156,7 @@ export interface CompileTraceOptions {
156156}
157157
158158/** Compile trace schema v2. Version 1 remains a separate frozen type. */
159- export function compileTrace ( result : ScanResult , options : CompileTraceOptions = { } ) : TraceV2 {
159+ export function compileTrace ( result : ScanResult , options : CompileTraceOptions = { } ) : TraceV3 {
160160 const findings = result . issues
161161 . map ( issueToFinding )
162162 . sort ( ( left , right ) =>
@@ -253,7 +253,7 @@ export function compileTrace(result: ScanResult, options: CompileTraceOptions =
253253 } ) ) ,
254254 } ,
255255 }
256- const trace : TraceV2 = { ...unsigned , attestation : { digest : sha256 ( unsigned ) , signed : false } }
256+ const trace : TraceV3 = { ...unsigned , attestation : { digest : sha256 ( unsigned ) , signed : false } }
257257 const validation = validateTraceValue ( trace )
258258 if ( ! validation . valid ) {
259259 // Self-compiled traces are acyclic. A complexity miss on a large app must
@@ -818,7 +818,7 @@ export function validateTrace(value: unknown): TraceValidationResult {
818818 }
819819}
820820
821- export function assertCompatibleTrace ( value : unknown ) : asserts value is TraceV2 {
821+ export function assertCompatibleTrace ( value : unknown ) : asserts value is TraceV3 {
822822 const validation = validateTrace ( value )
823823 if ( ! validation . valid ) throw new Error ( `Invalid App Security trace: ${ validation . errors . join ( '; ' ) } ` )
824824}
0 commit comments