Skip to content

Commit c0427db

Browse files
committed
evals: fix prompt turns bug. label logs with date
1 parent 5a4dcf0 commit c0427db

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export async function runSingleEval(
9494

9595
let currentDecision: AgentDecision = 'continue'
9696
let attempts = 0
97-
const MAX_ATTEMPTS = promptWithAgent ? 1 : 5
97+
const MAX_ATTEMPTS = promptWithAgent ? 5 : 1
9898

9999
while (currentDecision === 'continue' && attempts < MAX_ATTEMPTS) {
100100
// Check for process-level errors
@@ -120,7 +120,7 @@ export async function runSingleEval(
120120
// Get next prompt from prompting agent with timeout
121121
let agentResponse: z.infer<typeof AgentDecisionSchema>
122122
try {
123-
agentResponse = !promptWithAgent
123+
agentResponse = promptWithAgent
124124
? {
125125
decision: 'continue',
126126
reasoning: 'Using spec as sole prompt',
@@ -458,7 +458,8 @@ export async function runGitEvals(
458458
.split('\n')[0]
459459
.replace(/[^a-zA-Z0-9]/g, '_')
460460
.slice(0, 30)
461-
const logFilename = `${safeMessage}-${evalCommit.sha.slice(0, 7)}.log`
461+
const date = new Date().toISOString().replace(/[:.]/g, '-')
462+
const logFilename = `${date}-${safeMessage}-${evalCommit.sha.slice(0, 7)}.log`
462463
const logPath = path.join(logsDir, logFilename)
463464
const logStream = logToStdout
464465
? process.stdout

0 commit comments

Comments
 (0)