@@ -284,7 +284,10 @@ function installBinaries(binInstalls: EvalDataV2['binInstalls']): {
284284}
285285
286286export async function runBuffBench ( options : {
287- evalDataPath : string
287+ /** Single eval data file path (backward compatibility) */
288+ evalDataPath ?: string
289+ /** One or more eval data file paths */
290+ evalDataPaths ?: string [ ]
288291 agents : string [ ]
289292 taskConcurrency ?: number
290293 client ?: CodebuffClient
@@ -294,15 +297,34 @@ export async function runBuffBench(options: {
294297} ) {
295298 const {
296299 evalDataPath,
300+ evalDataPaths,
297301 agents,
298302 taskConcurrency = 1 ,
299303 taskIds,
300304 extractLessons = false ,
301305 disableAnalysis = false ,
302306 } = options
303307
308+ const resolvedEvalDataPaths =
309+ ( evalDataPaths && evalDataPaths . length > 0
310+ ? evalDataPaths
311+ : evalDataPath
312+ ? [ evalDataPath ]
313+ : undefined ) ?? [ ]
314+
315+ if ( resolvedEvalDataPaths . length === 0 ) {
316+ throw new Error ( 'runBuffBench: provide evalDataPaths (or evalDataPath).' )
317+ }
318+ if ( resolvedEvalDataPaths . length > 1 ) {
319+ console . warn (
320+ `runBuffBench: multiple evalDataPaths provided, using first: ${ resolvedEvalDataPaths [ 0 ] } ` ,
321+ )
322+ }
323+
324+ const primaryEvalDataPath = resolvedEvalDataPaths [ 0 ]
325+
304326 const evalData : EvalDataV2 = JSON . parse (
305- fs . readFileSync ( evalDataPath , 'utf-8' ) ,
327+ fs . readFileSync ( primaryEvalDataPath , 'utf-8' ) ,
306328 )
307329
308330 // Install binaries once at the beginning
@@ -512,7 +534,8 @@ export async function runBuffBench(options: {
512534 const finalResults = {
513535 metadata : {
514536 timestamp : new Date ( ) . toISOString ( ) ,
515- evalDataPath,
537+ evalDataPath : primaryEvalDataPath ,
538+ evalDataPaths : resolvedEvalDataPaths ,
516539 agentsTested : agents ,
517540 commitsEvaluated : commitsToRun . length ,
518541 totalCommitsInEval : evalData . evalCommits . length ,
0 commit comments