fix(voice): accept verified Marin cancellation completion race
This commit is contained in:
@@ -198,7 +198,11 @@ class RealtimeAdapter:
|
|||||||
# Selected-profile probe: docs/guides/live-context-sync-repair.md.
|
# Selected-profile probe: docs/guides/live-context-sync-repair.md.
|
||||||
# The runtime separately requires the cancellation intent event_id,
|
# The runtime separately requires the cancellation intent event_id,
|
||||||
# terminal response confirmation, and heard-position truncation.
|
# terminal response confirmation, and heard-position truncation.
|
||||||
return (self.model in ("gpt-realtime-mini", "gpt-realtime-2.1") and self.voice == "shimmer"
|
return ((self.model, self.voice) in {
|
||||||
|
("gpt-realtime-mini", "shimmer"),
|
||||||
|
("gpt-realtime-2.1", "shimmer"),
|
||||||
|
("gpt-realtime-2.1", "marin"),
|
||||||
|
}
|
||||||
and isinstance(error, dict)
|
and isinstance(error, dict)
|
||||||
and error.get("type") == "invalid_request_error"
|
and error.get("type") == "invalid_request_error"
|
||||||
and error.get("code") == "response_cancel_not_active"
|
and error.get("code") == "response_cancel_not_active"
|
||||||
|
|||||||
@@ -195,4 +195,22 @@ for `gpt-realtime-2.1/shimmer`. The adapter accepts this exact profile and
|
|||||||
signature alongside the previously probed `gpt-realtime-mini/shimmer`.
|
signature alongside the previously probed `gpt-realtime-mini/shimmer`.
|
||||||
Runtime event-ID, terminal response, and unheard-audio truncation gates remain
|
Runtime event-ID, terminal response, and unheard-audio truncation gates remain
|
||||||
mandatory. The incident observation is profile-specific evidence; this change
|
mandatory. The incident observation is profile-specific evidence; this change
|
||||||
does not establish that cancellation acknowledgement deadlines are resolved.
|
does not establish that cancellation acknowledgement deadlines are resolved.
|
||||||
|
|
||||||
|
### Verified Marin cancellation race (2026-10-13)
|
||||||
|
|
||||||
|
Operational session 79421770-4615-4140-ae2f-fc590510787d pinned
|
||||||
|
`gpt-realtime-2.1/marin`. Turn 7 cancellation was dispatched at elapsed 44499 ms;
|
||||||
|
completed terminal confirmation arrived at 44677 ms. The correlated error then
|
||||||
|
matched all three exact structured type/code/null-param guards but failed the
|
||||||
|
Shimmer-only profile guard, closing with CANCELLATION_PROVIDER_ERROR.
|
||||||
|
The verified profile set now additionally includes gpt-realtime-2.1/marin.
|
||||||
|
It does not admit other model/voice pairs or relax event-ID correlation,
|
||||||
|
terminal confirmation, final playback positions or truncation acknowledgement.
|
||||||
|
Synthetic regressions reproduce the original rejection, cover both terminal
|
||||||
|
orderings, and retain failure when terminal confirmation is absent.
|
||||||
|
|
||||||
|
Verification: four new regression assertions failed before the fix;
|
||||||
|
114 focused synchronization, interruption and retained-search tests passed
|
||||||
|
afterward. A default-disabled trace test now isolates the operator .env.
|
||||||
|
Post-fix real microphone acceptance remains pending a fresh Marin session.
|
||||||
|
|||||||
@@ -856,3 +856,17 @@ errors. Publication remains atomic, ready and inactive until selection.
|
|||||||
F01 capabilities add `allow_partial_extraction` and report effective review gates.
|
F01 capabilities add `allow_partial_extraction` and report effective review gates.
|
||||||
Failed existing documents require a new upload to use this new frozen policy.
|
Failed existing documents require a new upload to use this new frozen policy.
|
||||||
Regression source: `tests/unit/test_partial_extraction.py`.
|
Regression source: `tests/unit/test_partial_extraction.py`.
|
||||||
|
|
||||||
|
|
||||||
|
### Verified Marin cancellation race (2026-10-13)
|
||||||
|
|
||||||
|
Operational session 79421770-4615-4140-ae2f-fc590510787d pinned
|
||||||
|
`gpt-realtime-2.1/marin`. Turn 7 cancellation was dispatched at elapsed 44499 ms;
|
||||||
|
completed terminal confirmation arrived at 44677 ms. The correlated error then
|
||||||
|
matched all three exact structured type/code/null-param guards but failed the
|
||||||
|
Shimmer-only profile guard, closing with CANCELLATION_PROVIDER_ERROR.
|
||||||
|
The verified profile set now additionally includes gpt-realtime-2.1/marin.
|
||||||
|
It does not admit other model/voice pairs or relax event-ID correlation,
|
||||||
|
terminal confirmation, final playback positions or truncation acknowledgement.
|
||||||
|
Synthetic regressions reproduce the original rejection, cover both terminal
|
||||||
|
orderings, and retain failure when terminal confirmation is absent.
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ from tests.unit.test_realtime_phase1 import (
|
|||||||
from tests.unit.test_realtime_repairs import Clock, without_ticker
|
from tests.unit.test_realtime_repairs import Clock, without_ticker
|
||||||
|
|
||||||
|
|
||||||
def test_numeric_timeline_is_disabled_by_default(runner, persisted, caplog):
|
def test_numeric_timeline_is_disabled_by_default(runner, persisted, caplog, monkeypatch, tmp_path):
|
||||||
|
# Default behavior must not depend on the operator's diagnostic .env.
|
||||||
|
monkeypatch.chdir(tmp_path)
|
||||||
|
monkeypatch.delenv("LIVE_DIAGNOSTIC_TRACE_ENABLED", raising=False)
|
||||||
caplog.set_level(logging.INFO, logger="app.modules.voice.diagnostics")
|
caplog.set_level(logging.INFO, logger="app.modules.voice.diagnostics")
|
||||||
async def scenario():
|
async def scenario():
|
||||||
runtime, transport, _ = await make(SimpleNamespace(engine=None), runner, persisted)
|
runtime, transport, _ = await make(SimpleNamespace(engine=None), runner, persisted)
|
||||||
@@ -229,12 +232,14 @@ CAPTURED_NO_ACTIVE = dict(type="invalid_request_error",
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("terminal_order", ["before_error", "after_error", "missing"])
|
@pytest.mark.parametrize("terminal_order", ["before_error", "after_error", "missing"])
|
||||||
def test_captured_selected_profile_cancellation_race(runner, persisted, terminal_order):
|
@pytest.mark.parametrize("model,voice", [("gpt-realtime-mini", "shimmer"), ("gpt-realtime-2.1", "marin")])
|
||||||
|
def test_captured_selected_profile_cancellation_race(runner, persisted, terminal_order, model, voice):
|
||||||
async def scenario():
|
async def scenario():
|
||||||
clock = Clock()
|
clock = Clock()
|
||||||
runtime, transport, out = await make(SimpleNamespace(engine=None), runner,
|
runtime, transport, out = await make(SimpleNamespace(engine=None), runner,
|
||||||
persisted, clock=clock)
|
persisted, clock=clock)
|
||||||
await without_ticker(runtime)
|
await without_ticker(runtime)
|
||||||
|
runtime.adapter.model, runtime.adapter.voice = model, voice
|
||||||
try:
|
try:
|
||||||
await input_turn(runtime)
|
await input_turn(runtime)
|
||||||
await response(runtime, transport)
|
await response(runtime, transport)
|
||||||
@@ -351,6 +356,9 @@ def test_terminal_technical_failure_is_not_accepted_as_cancellation_race(
|
|||||||
@pytest.mark.parametrize("model,voice,accepted", [
|
@pytest.mark.parametrize("model,voice,accepted", [
|
||||||
("gpt-realtime-mini", "shimmer", True),
|
("gpt-realtime-mini", "shimmer", True),
|
||||||
("gpt-realtime-2.1", "shimmer", True),
|
("gpt-realtime-2.1", "shimmer", True),
|
||||||
|
("gpt-realtime-2.1", "marin", True),
|
||||||
|
("gpt-realtime-mini", "marin", False),
|
||||||
|
("gpt-realtime-2.1", "cedar", False),
|
||||||
("gpt-realtime-2.1", "alloy", False),
|
("gpt-realtime-2.1", "alloy", False),
|
||||||
("gpt-realtime-2.1-mini", "shimmer", False),
|
("gpt-realtime-2.1-mini", "shimmer", False),
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user