Close local release-quality gaps and reconcile workplan status
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a0e332-3365-77c0-8491-084e9ea33ac1
This commit is contained in:
tegwick 2026-09-27 17:36:27 +02:00
parent 37436bb562
commit 7cd633986e
56 changed files with 462 additions and 237 deletions

View file

@ -4,8 +4,8 @@ Shared pytest fixtures for llm-connect tests.
import pytest
from llm_connect.models import RunConfig, LLMResponse
from llm_connect.adapter import MockLLMAdapter
from llm_connect.models import LLMResponse, RunConfig
@pytest.fixture

View file

@ -7,7 +7,6 @@ from llm_connect.models import RunConfig
from llm_connect.profiles import CUSTODIAN_TRIAGE_BALANCED, ProfiledLLMAdapter, RuntimeProfile
from llm_connect.server import LLMServer
ROOT = Path(__file__).resolve().parents[1]
SCRIPT = ROOT / "scripts" / "smoke_activity_core_endpoint.py"
FIXTURE_DIR = ROOT / "fixtures" / "activity_core"

View file

@ -3,8 +3,9 @@ Tests for MockLLMAdapter and ErrorLLMAdapter (Core adapter utilities).
"""
import pytest
from llm_connect.adapter import MockLLMAdapter, ErrorLLMAdapter
from llm_connect.models import RunConfig, LLMResponse
from llm_connect.adapter import ErrorLLMAdapter, MockLLMAdapter
from llm_connect.models import LLMResponse
class TestMockLLMAdapter:

View file

@ -3,11 +3,12 @@ Tests for async_execute_prompt (FR-3).
"""
import asyncio
import pytest
from llm_connect.models import RunConfig, BudgetTracker
from llm_connect.adapter import MockLLMAdapter
from llm_connect.exceptions import LLMBudgetExceededError
from llm_connect.models import BudgetTracker, RunConfig
class TestAsyncExecutePrompt:
@ -46,7 +47,6 @@ class TestAsyncExecutePrompt:
def test_concurrent_faster_than_sequential(self):
"""Gathering N async calls should not be N× slower than one call."""
import time
adapter = MockLLMAdapter()
config = RunConfig()

View file

@ -3,11 +3,12 @@ Tests for BudgetTracker (FR-4) and LLMBudgetExceededError.
"""
import threading
import pytest
from llm_connect.models import BudgetTracker, RunConfig
from llm_connect.adapter import MockLLMAdapter
from llm_connect.exceptions import LLMBudgetExceededError, LLMError
from llm_connect.models import BudgetTracker, RunConfig
class TestBudgetTracker:

View file

@ -1,6 +1,6 @@
import pytest
from llm_connect.costs import CostEstimate, CostModel, estimate_cost
from llm_connect.costs import CostModel, estimate_cost
from llm_connect.rates import ModelRate, ModelRateRegistry

View file

@ -3,13 +3,14 @@ Tests for the LLMError exception hierarchy (Core).
"""
import pytest
from llm_connect.exceptions import (
LLMError,
LLMConfigurationError,
LLMAPIError,
LLMConfigurationError,
LLMError,
LLMRateLimitError,
LLMTimeoutError,
LLMSubprocessError,
LLMTimeoutError,
)

View file

@ -3,16 +3,17 @@ Tests for create_adapter() and create_embedding_adapter() factories.
"""
import pytest
from llm_connect.factory import create_adapter
from llm_connect.embedding_factory import create_embedding_adapter
from llm_connect.exceptions import LLMConfigurationError
from llm_connect.adapter import LLMAdapter
from llm_connect.embedding_adapter import EmbeddingAdapter
from llm_connect.openrouter import OpenRouterAdapter
from llm_connect.claude_code import ClaudeCodeAdapter
from llm_connect.openai import OpenAIAdapter
from llm_connect.gemini import GeminiAdapter
from llm_connect.embedding_adapter import EmbeddingAdapter
from llm_connect.embedding_factory import create_embedding_adapter
from llm_connect.embedding_openai import OpenAICompatibleEmbeddingAdapter
from llm_connect.exceptions import LLMConfigurationError
from llm_connect.factory import create_adapter
from llm_connect.gemini import GeminiAdapter
from llm_connect.openai import OpenAIAdapter
from llm_connect.openrouter import OpenRouterAdapter
class TestCreateAdapter:

View file

@ -2,8 +2,7 @@
Tests for RunConfig and LLMResponse (Core models).
"""
import pytest
from llm_connect.models import RunConfig, LLMResponse
from llm_connect.models import LLMResponse, RunConfig
class TestRunConfig:

View file

@ -1,6 +1,5 @@
from llm_connect._payload import merge_gemini_model_params, merge_openai_chat_model_params
STRUCTURED_SCHEMA = {
"type": "object",
"properties": {

View file

@ -10,7 +10,6 @@ from llm_connect.problem_classes import (
)
from llm_connect.quality import QualityObservation
DIMENSIONS_BY_CLASS = {
"chunk-summarization": [
{"chunk_words": 900, "template_words": 150},

View file

@ -1,6 +1,5 @@
from llm_connect.replay import parse_audit_record
STRUCTURED_SCHEMA = {
"type": "object",
"properties": {

View file

@ -4,8 +4,8 @@ Tests for RoutingPolicy (FR-2).
import pytest
from llm_connect.routing import RoutingPolicy, RoutingRule
from llm_connect.adapter import MockLLMAdapter
from llm_connect.routing import RoutingPolicy, RoutingRule
class TestRoutingPolicy:

View file

@ -2,12 +2,12 @@
Tests for LLMServer HTTP serve mode (FR-1).
"""
import json
import threading
import time
from concurrent.futures import ThreadPoolExecutor
import json
import urllib.error
import urllib.request
from concurrent.futures import ThreadPoolExecutor
import pytest
@ -16,7 +16,7 @@ from llm_connect._diagnostics import (
record_provider_request,
record_provider_response,
)
from llm_connect.adapter import MockLLMAdapter, ErrorLLMAdapter
from llm_connect.adapter import ErrorLLMAdapter, MockLLMAdapter
from llm_connect.exceptions import LLMAPIError, LLMConfigurationError, LLMTimeoutError
from llm_connect.models import LLMResponse, RunConfig
from llm_connect.profiles import CUSTODIAN_TRIAGE_BALANCED, ProfiledLLMAdapter, RuntimeProfile
@ -136,6 +136,7 @@ class TestExecute:
except urllib.error.HTTPError as exc:
status, body = exc.code, json.loads(exc.read())
assert status == 400
assert body == {"error": "invalid JSON body"}
def test_unknown_post_path_returns_404(self, server):
status, body = _post(

View file

@ -5,7 +5,6 @@ from llm_connect.models import RunConfig
from llm_connect.openai import OpenAIAdapter
from llm_connect.openrouter import OpenRouterAdapter
STRUCTURED_SCHEMA = {
"type": "object",
"properties": {