Skip to content

Commit 41b7e47

Browse files
committed
Run bun install for codebuff evals
1 parent c879dc0 commit 41b7e47

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

evals/git-evals/eval-codebuff2.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"repoUrl": "https://github.com/CodebuffAI/codebuff",
33
"generationDate": "2025-08-17T02:05:02.152Z",
4+
"initCommand": "bun install",
45
"evalCommits": [
56
{
67
"sha": "456858ccc77ebfeb400ef12bcf9dd167470a6639",
@@ -2425,4 +2426,4 @@
24252426
]
24262427
}
24272428
]
2428-
}
2429+
}

evals/git-evals/run-git-evals.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ export async function runGitEvals(
419419
testRepoName,
420420
evalCommit.sha,
421421
true,
422+
evalData.initCommand,
422423
)
423424

424425
console.log(

evals/git-evals/run-single-eval.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ async function runSingleEvalTask(options: {
167167
evalData.repoUrl,
168168
testRepoName,
169169
evalCommit.sha,
170+
undefined,
171+
evalData.initCommand,
170172
)
171173
console.log(`Repository cloned to: ${projectPath}`)
172174

evals/git-evals/setup-test-repo.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export async function setupTestRepo(
4040
customRepoName: string,
4141
commitSha: string = 'HEAD',
4242
addRandomSuffix: boolean = false,
43+
initCommand?: string,
4344
): Promise<string> {
4445
const repoName = customRepoName || extractRepoNameFromUrl(repoUrl)
4546
console.log(`Setting up test repository: ${repoName}...`)
@@ -178,6 +179,24 @@ export async function setupTestRepo(
178179

179180
console.log(`Repository has ${commitCount} commits in history`)
180181

182+
try {
183+
if (initCommand) {
184+
console.log(`Executing initialization command: ${initCommand}`)
185+
const [command, ...args] = initCommand.split(' ')
186+
execFileSync(command, args, {
187+
cwd: repoDir,
188+
stdio: 'inherit',
189+
timeout: 240_000, // 4 minute timeout for init commands
190+
})
191+
console.log('Initialization command completed successfully')
192+
}
193+
} catch (error) {
194+
console.error('Error executing initialization command:', error)
195+
throw new Error(
196+
`Initialization command failed: ${error instanceof Error ? error.message : String(error)}`,
197+
)
198+
}
199+
181200
console.log('Repository verification passed')
182201

183202
return repoDir

evals/git-evals/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface EvalData {
2020
repoUrl: string // URL of the git repository to clone
2121
testRepoName?: string // Optional - can be inferred from repoUrl
2222
generationDate: string
23+
initCommand?: string // Optional command to run during scaffolding setup
2324
evalCommits: EvalCommit[]
2425
}
2526

0 commit comments

Comments
 (0)