gpt-5.3-codesx review: Phase 5 Release Readiness & Contract Enforcement
Quality Gate / gate (push) Failing after 10s

This commit is contained in:
Jim Lancaster
2026-08-20 08:42:51 -05:00
parent cdd846fe29
commit 443a1e29c8
7 changed files with 62 additions and 379 deletions
+19 -1
View File
@@ -7,7 +7,25 @@ import pytest
from transcription.services.sources import transcribe_document_image
HAS_OPENROUTER_KEY = bool(os.getenv("OPENROUTER_API_KEY"))
def _load_openrouter_key_from_dotenv() -> str | None:
"""Best-effort read of OPENROUTER_API_KEY from local .env without printing it."""
env_path = Path(__file__).resolve().parents[2] / ".env"
if not env_path.exists():
return None
for raw_line in env_path.read_text(encoding="utf-8").splitlines():
line = raw_line.strip()
if not line or line.startswith("#") or "=" not in line:
continue
key, value = line.split("=", 1)
if key.strip() != "OPENROUTER_API_KEY":
continue
resolved = value.strip().strip('"').strip("'")
return resolved or None
return None
HAS_OPENROUTER_KEY = bool(os.getenv("OPENROUTER_API_KEY") or _load_openrouter_key_from_dotenv())
REAL_IMAGES_DIR = Path(__file__).resolve().parents[1] / "fixtures" / "images" / "real"
ARTIFACTS_DIR = Path(__file__).resolve().parents[1] / "artifacts" / "transcriptions"