Skip to content

Commit a7a5d18

Browse files
Sync public snapshot from freebuff-private
1 parent 33b49d8 commit a7a5d18

6 files changed

Lines changed: 73 additions & 65 deletions

File tree

‎bun.lock‎

Lines changed: 43 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎evals/buffbench/eval-codebuff.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"binPath": "bin/bun"
99
}
1010
],
11-
"initCommand": "bun install && git checkout -- bun.lock",
11+
"initCommand": "bun install",
1212
"finalCheckCommands": ["bun run typecheck", "bun run test"],
1313
"env": {
1414
"ANTHROPIC_API_KEY": "test-key",

‎evals/buffbench/eval-codebuff2.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"repoUrl": "https://github.com/CodebuffAI/codebuff",
33
"generationDate": "2025-12-10",
4-
"initCommand": "bun install && git checkout -- bun.lock",
4+
"initCommand": "bun install",
55
"binInstalls": [
66
{
77
"name": "bun",

‎evals/buffbench/eval-manifold.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"repoUrl": "https://github.com/manifoldmarkets/manifold",
33
"generationDate": "2025-10-12T19:12:52.933Z",
4-
"initCommand": "yarn install && git checkout -- yarn.lock",
4+
"initCommand": "yarn install",
55
"finalCheckCommands": [
66
"yarn --cwd common tsc --noEmit",
77
"yarn --cwd backend/api compile",

‎evals/buffbench/eval-manifold2.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"repoUrl": "https://github.com/manifoldmarkets/manifold",
33
"generationDate": "2025-12-10",
4-
"initCommand": "yarn install && git checkout -- yarn.lock",
4+
"initCommand": "yarn install",
55
"finalCheckCommands": [
66
"yarn --cwd common tsc --noEmit",
77
"yarn --cwd backend/api compile",

‎evals/subagents/test-repo-utils.ts‎

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,31 @@ export async function cloneAtCommit(params: {
3737
}
3838
}
3939

40+
/** Runs the task's setup (usually a dependency install), then restores every
41+
* tracked file whatever its exit status. An install rewrites the lockfile,
42+
* and a change no agent made would sit in every arm's diff for the judge to
43+
* dock. Untracked output such as node_modules stays. */
44+
export function runInitCommand(params: {
45+
repoDir: string
46+
initCommand: string
47+
env?: Record<string, string>
48+
}): void {
49+
const { repoDir, initCommand, env } = params
50+
console.log(`Running init command: ${initCommand}...`)
51+
try {
52+
execSync(initCommand, {
53+
cwd: repoDir,
54+
stdio: 'ignore',
55+
env: { ...process.env, ...env },
56+
})
57+
} catch (error) {
58+
console.error(
59+
`Error running init command: ${getErrorObject(error).message}`,
60+
)
61+
}
62+
execSync('git checkout -q -- .', { cwd: repoDir, stdio: 'ignore' })
63+
}
64+
4065
/**
4166
* Helper function to manage test repository lifecycle
4267
* Sets up a test repo, runs a function with the repo cwd, then cleans up
@@ -60,20 +85,7 @@ export const withTestRepo = async <T>(
6085
try {
6186
await cloneAtCommit({ repoUrl, repoDir, sha: parentSha })
6287

63-
if (initCommand) {
64-
console.log(`Running init command: ${initCommand}...`)
65-
try {
66-
execSync(initCommand, {
67-
cwd: repoDir,
68-
stdio: 'ignore',
69-
env: { ...process.env, ...env },
70-
})
71-
} catch (error) {
72-
console.error(
73-
`Error running init command: ${getErrorObject(error).message}`,
74-
)
75-
}
76-
}
88+
if (initCommand) runInitCommand({ repoDir, initCommand, env })
7789

7890
// Run the provided function with the repo directory
7991
return await fn(repoDir)

0 commit comments

Comments
 (0)