diff --git a/tests/test_docs.py b/tests/test_docs.py deleted file mode 100644 index 9d2518af6..000000000 --- a/tests/test_docs.py +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-only -# Copyright (c) 2026 sol pbc - -from __future__ import annotations - -import subprocess -from pathlib import Path - - -def test_install_md_has_no_ollama_references() -> None: - # Negative invariant: the ollama -> "local provider" sweep stays done. - # Asserting on retired terminology is a rule that must always hold, not a - # prose snapshot. We deliberately do NOT pin the verbatim wording of the - # install copy (that's a checklist concern, not a test, and breaks on every - # legitimate copy edit) -- we assert only the load-bearing concepts survive. - text = Path("INSTALL.md").read_text(encoding="utf-8").lower() - - assert "ollama" not in text - assert "cogitate" in text - assert "no extra install step" in text - assert "local provider" in text - - -def test_ollama_grep_returns_zero_lines() -> None: - result = subprocess.run( - [ - "git", - "grep", - "-i", - "ollama", - "--", - # tests/ and docs/design/ legitimately retain the term: test - # fixtures simulate old log lines, and design records document the - # ollama -> local migration as history. CHANGELOG history likewise - # keeps the old term. Everywhere else, ollama must be fully gone. - ":!tests/", - ":!docs/design/", - ":!CHANGELOG.md", - ], - check=False, - capture_output=True, - text=True, - ) - - assert result.returncode == 1 - assert result.stdout == "" diff --git a/tests/test_local.py b/tests/test_local.py index 049ff81a1..1f591d9b5 100644 --- a/tests/test_local.py +++ b/tests/test_local.py @@ -55,9 +55,7 @@ def test_local_provider_defaults_and_registry(): assert PROVIDER_DEFAULTS["local"][TIER_PRO] == LOCAL_MODEL assert PROVIDER_DEFAULTS["local"][TIER_FLASH] == LOCAL_MODEL assert PROVIDER_DEFAULTS["local"][TIER_LITE] == LOCAL_MODEL - assert "ollama" not in PROVIDER_DEFAULTS assert PROVIDER_REGISTRY["local"] == "solstone.think.providers.local" - assert "ollama" not in PROVIDER_REGISTRY assert PROVIDER_METADATA["local"] == { "label": "Local (on-device)", "env_key": "", diff --git a/tests/test_voice_brain.py b/tests/test_voice_brain.py index 204805dab..697d82801 100644 --- a/tests/test_voice_brain.py +++ b/tests/test_voice_brain.py @@ -4,6 +4,7 @@ from __future__ import annotations import asyncio +import time from flask import Flask @@ -106,6 +107,16 @@ def test_schedule_refresh_updates_instruction(monkeypatch, journal_copy): try: future = brain.schedule_refresh(app, force=True) assert future.result(timeout=1.0) == ("session-3", "New voice") + # The app-state update runs in the future's done-callback. A + # concurrent.futures.Future notifies result() waiters *before* it + # invokes done-callbacks, so the callback may not have applied the + # instruction yet when result() returns -- poll for the side effect + # rather than racing it (this was an xdist-only flake under load). + deadline = time.monotonic() + 1.0 + while ( + app.voice_brain_instruction != "New voice" and time.monotonic() < deadline + ): + time.sleep(0.01) assert app.voice_brain_instruction == "New voice" finally: stop_voice_runtime(app)