mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
test(voice): pin diagnostics wiring and in-flight crop dedupe; tighten docs
Third review pass on #835. No runtime change. - Controller test: viewport decisions reach the controller's debug log. - Policy test: a second request for a snapshot still being captured is logged pointer-already-requested and is not captured twice. - CURRENT-STATE: pointer-not-fresh also covers a missing snapshot, already-requested covers an earlier attempt that threw, and the image step runs when any tool output of the response was sent. - Changelog: describe what is recorded rather than a fixed miscount.
This commit is contained in:
1 parent
d0a612786a
commit
df37c9360d
4 files changed
+55
-5
No files matched your search
@@ -3708,3 +3708,29 @@ test('voice runs app actions itself and other tools through the catalog', async
|
||||
assert.deepEqual(disposals, [['removed']]);
|
||||
assert.equal(withToolCatalog(runner, undefined), runner);
|
||||
});
|
||||
|
||||
test('the controller forwards viewport escalation diagnostics to its debug log', async () => {
|
||||
const records = [];
|
||||
const controller = new GevRealtimeController({
|
||||
ui: createTestVoiceUi(),
|
||||
runner: async () => ({ ok: true }),
|
||||
radioLayer: { subscribePlaybackControls: () => () => {}, setVoiceDucked() {} },
|
||||
});
|
||||
controller.debugLog = (event, detail) => records.push({ event, detail });
|
||||
controller.dc = { readyState: 'open', send() {}, close() {} };
|
||||
|
||||
assert.equal(
|
||||
await controller.sendVisualContextIfUseful({
|
||||
action: 'get_entity_context',
|
||||
scene: { basemap: { viewScale: 'regional' } },
|
||||
}),
|
||||
false,
|
||||
);
|
||||
assert.deepEqual(
|
||||
records.filter((record) => record.event.startsWith('viewport_context.')),
|
||||
[{
|
||||
event: 'viewport_context.decision',
|
||||
detail: { contextId: 1, send: false, reason: 'view-scale-not-local', viewScale: 'regional' },
|
||||
}],
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user