fix(stats): harden server lifecycle and verify compiled runtime (#261)

This commit is contained in:
sudacode authored and GitHub committed 2026-09-20 23:19:03 -07:00
1 parent f9c4e892dc
commit 383aed8bad
37 files changed
+1381 -323

No files matched your search

+4 -4
View File
@@ -433,11 +433,11 @@ test('warm tokenization release can signal readiness before the first subtitle a
test('stats server Yomitan note creation honors configured Anki server override policy', () => {
const source = readSource('src/main/runtime/stats-server-runtime.ts');
const startStatsServerBlock = source.match(
/statsServer = startStatsServer\(\{(?<body>[\s\S]*?)\n \}\);/,
const statsServerConfigBlock = source.match(
/const buildStatsServerConfig[\s\S]*?return \{(?<body>[\s\S]*?)\n \};\n \};/,
)?.groups?.body;
const addYomitanNoteBlock = startStatsServerBlock?.match(
/addYomitanNote:\s*async\s*\(word: string\)\s*=>\s*\{(?<body>[\s\S]*?)\n \},/,
const addYomitanNoteBlock = statsServerConfigBlock?.match(
/addYomitanNote:\s*async\s*\(word: string\)\s*=>\s*\{(?<body>[\s\S]*?)\n \},/,
)?.groups?.body;
assert.ok(addYomitanNoteBlock);