@@ -101,6 +101,12 @@ async function extractAndValidate(symbol, month, zipPath) {
101101 close_time : new Date ( item . close_time ) . toISOString ( ) ,
102102 expected_close_time : new Date ( item . expected_close_time ) . toISOString ( ) ,
103103 shortened_by_ms : item . shortened_by_ms
104+ } ) ) ,
105+ extended_closes : validation . extended_closes . map ( ( item ) => ( {
106+ open_time : new Date ( item . open_time ) . toISOString ( ) ,
107+ close_time : new Date ( item . close_time ) . toISOString ( ) ,
108+ expected_close_time : new Date ( item . expected_close_time ) . toISOString ( ) ,
109+ extended_by_ms : item . extended_by_ms
104110 } ) )
105111 } ;
106112}
@@ -125,13 +131,14 @@ async function main() {
125131 files . push ( { ...entry , archive_sha256 : archive . expectedSha256 } ) ;
126132 console . log (
127133 `${ label } : rows=${ entry . row_count } , missing=${ entry . missing_interval_count } , ` +
128- `shortened=${ entry . shortened_close_count } `
134+ `irregular_close=${ entry . irregular_close_count } ` +
135+ `(shortened=${ entry . shortened_close_count } , extended=${ entry . extended_close_count } )`
129136 ) ;
130137 }
131138 }
132139
133140 const manifest = {
134- schema_version : 1 ,
141+ schema_version : 2 ,
135142 strategy_id : "regime-trend-v1" ,
136143 source : "Binance public data monthly spot klines" ,
137144 source_base : "https://data.binance.vision/data/spot/monthly/klines" ,
@@ -142,6 +149,7 @@ async function main() {
142149 final_holdout_opened : false ,
143150 symbols : FIVE_MINUTE_SYMBOLS ,
144151 months,
152+ close_time_policy : "record shortened or extended close_time anomalies; replay ordering uses open_time and OHLC" ,
145153 files
146154 } ;
147155 await writeFile ( manifestPath , `${ JSON . stringify ( manifest , null , 2 ) } \n` , "utf8" ) ;
0 commit comments