Tests follow the new reply room; the queued-message test waits for the goal to be running

This commit is contained in:
Niko1221 committed 2026-10-16 19:25:32 +02:00
1 parent 2b54cf4fbd
commit f37abb1365
2 files changed
+6 -3

No files matched your search

+5 -2
View File
@@ -92,8 +92,11 @@ test('a message typed while a goal without points runs is queued, can be taken b
assert.throws(() => r.bridge.queueMessage({ chatId: 'q1', text: 'hello' }), /No goal is running/);
const out = [];
const run = r.bridge.runTurn({ ...r.base('q1', f => out.push(f)), goal: { action: 'create', objective: 'keep going', maxRounds: 50 } });
await wait(3000);
const a = r.bridge.queueMessage({ chatId: 'q1', text: 'first thing' });
// the goal turn may take a while to start on a busy machine: queue as soon as it runs
let a = null;
for (let i = 0; i < 150 && !a; i++) { try { a = r.bridge.queueMessage({ chatId: 'q1', text: 'first thing' }); } catch { await wait(100); } }
assert.ok(a, 'the goal was running');
await wait(500);
const b = r.bridge.queueMessage({ chatId: 'q1', text: 'second thing' });
assert.equal(a.message.deliverAt, 'end'); assert.deepEqual(b.queue.map(m => m.text), ['first thing', 'second thing']);
const back = r.bridge.cancelQueued({ chatId: 'q1', id: b.message.id });
+1 -1
View File
@@ -237,7 +237,7 @@ test('the output budget is not the old 8192, and the Reasoning menu reaches the
const off = await ask('think-off', 'Off');
assert.equal(ctk(off).enable_thinking, false); assert.equal(ctk(off).reasoning_effort, undefined);
assert.equal(off.enable_thinking, undefined, 'a top-level enable_thinking is the field the Strata server ignores');
assert.ok(off.max_completion_tokens > 40000, `budget ${off.max_completion_tokens} (the window minus the prompt, never the old 8192)`);
assert.ok(off.max_completion_tokens >= 32000 && off.max_completion_tokens <= 32768, `budget ${off.max_completion_tokens} (half the window, at most 32K: never the old 8192, and room is left for the conversation to be compacted)`);
const high = await ask('think-high', 'High');
assert.equal(ctk(high).enable_thinking, true); assert.equal(ctk(high).reasoning_effort, 'high');
const low = await ask('think-low', 'Low');