You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Layer-2 defense-in-depth for defect qwibitai#6: between updateInstructions(persona) and
setTimeout→requestResponse in webhook.ts onHuman closure, inject a
conversation.item.create with role=user containing a bracketed system-hint
directive. This breaks the conversational context the model inherited from
CASE2_AMD_CLASSIFIER_PROMPT so it cannot mis-read the callee's opening
greeting ('Restaurant Bellavista') as evidence it should continue in
AMD-helper mode.
Text verbatim per RESEARCH §2.5 with ASCII umlauts (Phase 2 CASE6B_PERSONA
convention): 'Beginne bitte mit der Begruessung gemaess deiner neuen
Anweisungen'. Hardcoded literal, not derived from counterpart input —
safe under T-05.1-01-04 (counterpart cannot prompt-inject).
Pitfall 5: conversation.item.create does NOT itself trigger a response.create
(VAD only scopes audio-derived items). The explicit setTimeout→requestResponse
is preserved unchanged.
Tests added (RED before, GREEN after this commit):
- Test F: asserts send order session.update → conversation.item.create →
(after GREET_TRIGGER_DELAY_OUTBOUND_MS) response.create
- Test G: asserts verbatim directive text with ASCII umlauts, no unicode
- Test H (regression, inside F): persona-swap trigger from Wave 3 still fires
Also adds dispatch.getAmdClassifier() test-only accessor so the tests can
drive classifier.onAmdResult('human') end-to-end through the /accept flow.
Full voice-bridge suite: 367 passed / 4 skipped. Build clean. Both defect qwibitai#6
layers now shipped (L1 session.type discriminator, L2 synthetic directive).
// Plan 05.1-01 Task 3 (defect #6 Layer 2, RESEARCH §2.5):
299
+
// synthetic user-directive injection between updateInstructions
300
+
// and the setTimeout→requestResponse. Breaks the conversational
301
+
// context inherited from CASE2_AMD_CLASSIFIER_PROMPT — without
302
+
// this, the model may still mis-read the callee's opening
303
+
// greeting ("Restaurant Bellavista") as evidence it should
304
+
// continue in AMD-helper mode instead of CASE2_OUTBOUND_PERSONA.
305
+
// Text uses ASCII umlauts per Phase 2 CASE6B_PERSONA convention.
306
+
// Pitfall 5: this item.create does NOT itself trigger a
307
+
// response.create (VAD only scopes audio-derived items), so
308
+
// the explicit requestResponse below is still required.
309
+
try{
310
+
ctxRef.sideband.state.ws?.send(
311
+
JSON.stringify({
312
+
type: 'conversation.item.create',
313
+
item: {
314
+
type: 'message',
315
+
role: 'user',
316
+
content: [
317
+
{
318
+
type: 'input_text',
319
+
text: '[System-Hinweis: AMD-Verdict war human. Der Anruf laeuft jetzt im Reservierungs-Modus. Beginne bitte mit der Begruessung gemaess deiner neuen Anweisungen.]',
0 commit comments