From e22884308b6f61bcff283b9cb078845e25441eea Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Thu, 6 Nov 2025 16:06:31 +0100 Subject: [PATCH] chore(benchmarks): fix undefined in GitHub question generation --- benchmarks/src/datasets.ts | 1 - benchmarks/src/questions/event-logs.ts | 4 ++++ benchmarks/src/questions/github.ts | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/benchmarks/src/datasets.ts b/benchmarks/src/datasets.ts index fe7e6fa..ab08e3a 100644 --- a/benchmarks/src/datasets.ts +++ b/benchmarks/src/datasets.ts @@ -61,7 +61,6 @@ export interface AnalyticsMetric { export interface Repository { id: number name: string - owner: string repo: string description: string stars: number diff --git a/benchmarks/src/questions/event-logs.ts b/benchmarks/src/questions/event-logs.ts index 2a35e52..93d91d0 100644 --- a/benchmarks/src/questions/event-logs.ts +++ b/benchmarks/src/questions/event-logs.ts @@ -135,6 +135,10 @@ export function generateEventLogsQuestions(logs: EventLog[], getId: () => string // Filtering: multi-condition (level AND status) for (const level of levels.slice(0, QUESTION_LIMITS.eventLogs.filteringLevelAndStatus)) { + // Skip `info` level as it never has status >= 400 by design + if (level === 'info') + continue + const count = logs.filter(l => l.level === level && l.statusCode >= 400).length questions.push( new QuestionBuilder() diff --git a/benchmarks/src/questions/github.ts b/benchmarks/src/questions/github.ts index 38c378b..b588bf9 100644 --- a/benchmarks/src/questions/github.ts +++ b/benchmarks/src/questions/github.ts @@ -13,28 +13,28 @@ export function generateGithubQuestions(repos: Repository[], getId: () => string const repoFieldGenerators: Array<(repo: Repository, getId: () => string) => Question> = [ (repo, getId) => new QuestionBuilder() .id(getId()) - .prompt(`How many stars does ${repo.owner}/${repo.name} have?`) + .prompt(`How many stars does ${repo.repo} have?`) .groundTruth(String(repo.stars)) .type('field-retrieval') .dataset('github') .build(), (repo, getId) => new QuestionBuilder() .id(getId()) - .prompt(`How many forks does ${repo.owner}/${repo.name} have?`) + .prompt(`How many forks does ${repo.repo} have?`) .groundTruth(String(repo.forks)) .type('field-retrieval') .dataset('github') .build(), (repo, getId) => new QuestionBuilder() .id(getId()) - .prompt(`How many watchers does ${repo.owner}/${repo.name} have?`) + .prompt(`How many watchers does ${repo.repo} have?`) .groundTruth(String(repo.watchers)) .type('field-retrieval') .dataset('github') .build(), (repo, getId) => new QuestionBuilder() .id(getId()) - .prompt(`What is the main branch of ${repo.owner}/${repo.name}?`) + .prompt(`What is the main branch of ${repo.repo}?`) .groundTruth(repo.defaultBranch) .type('field-retrieval') .dataset('github')