feat: full feature buildout — streaming, i18n, mastery map, admin, jobs
Progressive lesson streaming via onSegment callback (fixes SSE for non-English users — locale was shadowed in lesson-reader useEffect). Adds: BullMQ workers, Redis stream buffer, token budget enforcement, Langfuse tracing, golden-eval runner, Playwright e2e scaffolding, lesson depth/locale/preferences schema, mastery map UI, admin panel (blueprints/users/reports/quality/misconceptions), image queries, source citations, view transitions, reading animations, i18n (next-intl), PDF export, surprise endpoint, and 402 passing unit tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -187,6 +187,25 @@ async function main(): Promise<void> {
|
||||
console.log('\n✓ PASS: grading quality within thresholds\n');
|
||||
}
|
||||
|
||||
// Persist run to DB when PERSIST_EVAL_RUNS=1 (CI/admin use; skip locally by default)
|
||||
if (process.env.PERSIST_EVAL_RUNS === '1') {
|
||||
try {
|
||||
const { insertEvalRun } = await import('../../src/lib/db/queries');
|
||||
await insertEvalRun({
|
||||
suite: 'grading',
|
||||
falseFailRate,
|
||||
accuracy,
|
||||
total: CASES.length,
|
||||
passed: Math.round(accuracy * CASES.length),
|
||||
modelVersion: process.env.LLM_GRADER_MODEL ?? 'unknown',
|
||||
gitSha: process.env.GIT_SHA,
|
||||
});
|
||||
console.log('[eval] Run persisted to eval_run table.');
|
||||
} catch (err) {
|
||||
console.warn('[eval] Failed to persist run (non-fatal):', err);
|
||||
}
|
||||
}
|
||||
|
||||
process.exit(failed ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user