- Upgrade OpenClaw primary model from deepseek-v4.1-flash to deepseek-v4.1-flash-1017 across all interactive agents, heartbeats, compaction, and cron jobs. - Configure hardened OpenRouter provider routing for 1017 (deepinfra, inference-net, parasail, cloudflare) with strict fp8/bf16 quantization and tool_choice verification. - Retain deepseek-v4.1-flash (0910), z-ai/glm-5.3-flash, and qwen3.8-flash in the automated fallback chain. - Update ADR 0002 with 1017 economics (30% price reduction on prompt/cache, +60% intelligence benchmark increase) and a 7-point provider qualification playbook. - Add operational scripts and tooling for session compaction, subagent vector deduplication, gateway preflight, and triage diagnostics in k8s/openclaw. - Update DuckDB backend engine, git-sync logic, and test suites. - Enhance Mila tracking UI components and add container build configuration. - Sync Terraform infrastructure state for Authentik.
37 lines
871 B
Python
37 lines
871 B
Python
import os
|
|
import shutil
|
|
import tempfile
|
|
from pathlib import Path
|
|
import pytest
|
|
from fastapi.testclient import TestClient
|
|
|
|
from app.config import DATA_DIR
|
|
from app.engine import DuckDBEngine
|
|
from app.git_sync import GitSyncManager
|
|
from app.main import app
|
|
|
|
|
|
@pytest.fixture(scope="session")
|
|
def test_data_dir():
|
|
temp_root = Path(tempfile.mkdtemp())
|
|
temp_data = temp_root / "data"
|
|
if DATA_DIR.is_dir():
|
|
shutil.copytree(DATA_DIR, temp_data)
|
|
else:
|
|
temp_data.mkdir(parents=True, exist_ok=True)
|
|
yield temp_data
|
|
shutil.rmtree(temp_root, ignore_errors=True)
|
|
|
|
|
|
@pytest.fixture
|
|
def engine(test_data_dir):
|
|
return DuckDBEngine(data_dir=test_data_dir)
|
|
|
|
|
|
@pytest.fixture
|
|
def client(engine):
|
|
app.state.engine = engine
|
|
app.state.git_sync = GitSyncManager(wiki_dir=engine.data_dir.parent)
|
|
with TestClient(app) as c:
|
|
yield c
|