Wave 2 integration: deps manifest (sigma, graphology, puppeteer-core), test-run emission guard

This commit is contained in:
Amos
2026-08-22 10:32:37 +03:00
parent 8728573253
commit db833a3537
3 changed files with 378 additions and 5 deletions
+7 -4
View File
@@ -51,10 +51,13 @@ export async function handleChatRequest(req: Request, agent?: TeacherAgent): Pro
// W4: fold this chat into the knowledge-graph ledgers (tree nodes /
// edges, quiz outcomes, taught events) — synchronous but tiny
// (append-only JSONL), and errors never touch the response.
try {
emitChat(chatId);
} catch (err) {
console.error(`[chat ${chatId}] graph emission failed:`, err);
// Skipped under tests: scripted chats are fixtures, not knowledge.
if (process.env.NODE_ENV !== "test") {
try {
emitChat(chatId);
} catch (err) {
console.error(`[chat ${chatId}] graph emission failed:`, err);
}
}
},
});