gpt-5.3 codex review: Phase 7 and the addition of the new test-effectiveness-auditor skill.
Quality Gate / gate (push) Failing after 12s

This commit is contained in:
Jim Lancaster
2026-08-20 11:50:10 -05:00
parent 443a1e29c8
commit 7c4300f9c2
21 changed files with 831 additions and 119 deletions
+10 -2
View File
@@ -8,6 +8,7 @@ from transcription.errors import AppError
from transcription.errors import ErrorCategory
from transcription.services import ServiceBundle
from transcription.services.sources import SourceService
from transcription.worker import WorkerHealth
from transcription.worker import process_next_queued_job
from transcription.worker import run_worker_loop
@@ -23,6 +24,7 @@ async def test_run_worker_loop_stops_on_non_retriable_exception(monkeypatch, cap
"""
calls = 0
stop_event = asyncio.Event()
worker_health = WorkerHealth()
async def _fake_process_next_queued_job(*, session=None, session_factory=None, services=None):
nonlocal calls
@@ -34,12 +36,16 @@ async def test_run_worker_loop_stops_on_non_retriable_exception(monkeypatch, cap
with caplog.at_level(logging.CRITICAL):
await asyncio.wait_for(
run_worker_loop(stop_event=stop_event, poll_interval_seconds=0),
run_worker_loop(stop_event=stop_event, poll_interval_seconds=0, worker_health=worker_health),
timeout=5,
)
assert calls == 1
assert "Worker loop stopped after a non-retriable error" in caplog.text
snapshot = worker_health.snapshot()
assert snapshot.state == "failed"
assert snapshot.error_id is not None
assert snapshot.error_category == ErrorCategory.INTERNAL_UNEXPECTED.value
@pytest.mark.asyncio
@@ -47,6 +53,7 @@ async def test_run_worker_loop_survives_retriable_exception(monkeypatch, caplog)
"""A retriable fault is still suppressed so transient conditions do not stop work."""
calls = 0
stop_event = asyncio.Event()
worker_health = WorkerHealth()
async def _fake_process_next_queued_job(*, session=None, session_factory=None, services=None):
nonlocal calls
@@ -65,10 +72,11 @@ async def test_run_worker_loop_survives_retriable_exception(monkeypatch, caplog)
monkeypatch.setattr("transcription.worker.process_next_queued_job", _fake_process_next_queued_job)
with caplog.at_level(logging.ERROR):
await run_worker_loop(stop_event=stop_event, poll_interval_seconds=0)
await run_worker_loop(stop_event=stop_event, poll_interval_seconds=0, worker_health=worker_health)
assert calls == 2
assert "Worker loop exception" in caplog.text
assert worker_health.snapshot().state == "stopped"
@pytest.mark.asyncio