Skip to content

Commit 7f31ad7

Browse files
committed
fix: update evaluator calibration condition and refine questions handling in schemas
1 parent b376d6d commit 7f31ad7

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
evaluator-calibration:
6969
name: Evaluator Calibration
7070
runs-on: ubuntu-latest
71-
if: github.event_name == 'workflow_dispatch' || secrets.ANTHROPIC_API_KEY != ''
71+
if: github.event_name == 'workflow_dispatch' || github.repository == 'bronz3beard/ai.tech-lead-stack'
7272
env:
7373
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
7474
steps:

src/lib/ai/reflexion/providers-env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function buildRunner(
8080
prompt,
8181
});
8282
addUsage(usage);
83-
return output;
83+
return { ...output, questions: output.questions.slice(0, 5) };
8484
},
8585
getUsage() {
8686
if (!warnedAboutCost) {

src/lib/ai/reflexion/schema.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const InterviewSchema = z.object({
4141
runId: z.string(),
4242
revision: z.number(),
4343
recommendation: z.enum(['approve', 'refine-plan', 'tune-loop', 'stop']),
44-
questions: z.array(QuestionSchema).max(5),
44+
questions: z.array(QuestionSchema), // limit enforced in INTERVIEWER_SYSTEM prompt + sliced in code
4545
});
4646
export type Interview = z.infer<typeof InterviewSchema>;
4747

@@ -61,7 +61,6 @@ export const UsageSnapshotSchema = z.object({
6161
});
6262
export type UsageSnapshot = z.infer<typeof UsageSnapshotSchema>;
6363

64-
6564
export const CritiqueSchema = z.object({
6665
gstackDiagnosis: z
6766
.number()

0 commit comments

Comments
 (0)