feat(generation): score articles with selected relevance model (#48)

This commit is contained in:
2026-11-25 18:09:36 +01:00
parent c5b8d0d4da
commit 90dd2a65d2
53 changed files with 1639 additions and 105 deletions

View File

@ -68,12 +68,16 @@ export function readStackManifest() {
if (!manifest.bootstrapAdmin?.email || !manifest.bootstrapAdmin?.password) {
throw new Error('E2E fake stack manifest must provide disposable bootstrap admin credentials.')
}
for (const field of ['companyQuery', 'companyID', 'companyName', 'companySymbol', 'companyFIGI', 'summaryModelID', 'summarySentinel', 'articleTitle', 'articleURL', 'articleContent', 'candidateID']) {
for (const field of ['companyQuery', 'companyID', 'companyName', 'companySymbol', 'companyFIGI', 'summaryModelID', 'rankingModelID', 'rankingModelName', 'summarySentinel', 'articleTitle', 'articleURL', 'articleContent', 'candidateID']) {
if (typeof manifest.fixtures?.[field] !== 'string' || !manifest.fixtures[field]) {
throw new Error(`E2E fake stack manifest is missing fixtures.${field}.`)
}
}
if (manifest.fixtures.rankingCapability?.selectable !== true || manifest.fixtures.rankingCapability?.mode !== 'json_schema') {
throw new Error('E2E fake stack manifest must provide a compatible structured ranking capability.')
}
const databaseURL = new URL(manifest.databaseUrl)
const databaseName = decodeURIComponent(databaseURL.pathname.replace(/^\//, ''))
if (!/(^|[-_])(e2e|test)([-_]|$)/i.test(databaseName)) {