feat: add DAVE adaptive synthetic persona
All checks were successful
Codex Template Compliance / template-compliance (pull_request) Successful in 7s
Build / test-and-image (pull_request) Successful in 46s

This commit is contained in:
2026-07-05 22:28:40 +02:00
parent 1f12f7c5b9
commit 994c806ea3
8 changed files with 32 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ test('first startup asks only for language before personal information', async (
const { sent, onboarding } = setup();
assert.equal(await onboarding.ensureStarted(), true);
assert.equal(sent.length, 1);
assert.match(sent[0].text, /DAVE/);
assert.match(sent[0].text, /language|Sprache/i);
assert.deepEqual(sent[0].options.replyMarkup.inline_keyboard[0].map(button => button.callback_data), [
'security_language:de',

View File

@@ -26,6 +26,8 @@ test('Telegram AI chat uses bounded history and current intelligence context', a
assert.equal(await assistant.reply('Explain the implications in detail', { chatId: 42 }), 'Second answer');
assert.match(calls[0].systemPrompt, /untrusted evidence/i);
assert.match(calls[0].systemPrompt, /Your name is DAVE/);
assert.match(calls[0].systemPrompt, /ADAPTIVE WRITING STYLE/);
assert.match(calls[0].userMessage, /risk-off/);
assert.deepEqual(calls[0].options, { maxTokens: 1024, timeout: 120000 });
assert.match(calls[1].userMessage, /User: What changed today\?/);

View File

@@ -112,6 +112,9 @@ test('step exhaustion uses a final-only prompt and returns synthesized evidence'
assert.equal(result.answer, 'The available evidence does not confirm the claim.');
assert.match(prompts[1], /Tool use is finished and unavailable/);
assert.doesNotMatch(prompts[1], /ALLOWLISTED TOOLS/);
assert.match(prompts[0], /Your name is DAVE/);
assert.match(prompts[0], /ADAPTIVE WRITING STYLE/);
assert.match(prompts[1], /Your name is DAVE/);
});
test('repeated tool calls during finalization fail closed without leaking protocol JSON', async () => {