personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

formatting cleanup: test baselines and agents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+20 -22
+3 -1
apps/health/tests/test_routes.py
··· 34 34 35 35 def test_missing_file_returns_404(self, health_env): 36 36 env = health_env() 37 - resp = env.client.get("/app/health/api/log?path=20260322/health/nonexistent.log") 37 + resp = env.client.get( 38 + "/app/health/api/log?path=20260322/health/nonexistent.log" 39 + ) 38 40 assert resp.status_code == 404 39 41 40 42 def test_missing_path_param_returns_400(self, health_env):
+2 -6
tests/test_agents_check.py
··· 324 324 "usage": {"input_tokens": 5, "output_tokens": 2}, 325 325 } 326 326 327 - monkeypatch.setattr( 328 - "think.providers.get_provider_module", lambda _: fake_module 329 - ) 327 + monkeypatch.setattr("think.providers.get_provider_module", lambda _: fake_module) 330 328 monkeypatch.setattr( 331 329 "think.providers.PROVIDER_METADATA", 332 330 {"fake": {"env_key": "FAKE_API_KEY"}}, 333 331 ) 334 - monkeypatch.setattr( 335 - "think.models.PROVIDER_DEFAULTS", {"fake": {2: "fake-flash"}} 336 - ) 332 + monkeypatch.setattr("think.models.PROVIDER_DEFAULTS", {"fake": {2: "fake-flash"}}) 337 333 monkeypatch.setenv("FAKE_API_KEY", "test-key") 338 334 339 335 log_mock = MagicMock()
+11 -14
tests/test_cogitate_coder.py
··· 5 5 6 6 import asyncio 7 7 import importlib 8 - import io 9 - import sys 10 8 from unittest.mock import AsyncMock, patch 11 9 12 - import pytest 13 - import typer 14 10 from typer.testing import CliRunner 15 11 16 12 from think.call import call_app ··· 211 207 result = runner.invoke(call_app, ["handoff", "coder"], input="") 212 208 213 209 assert result.exit_code == 1 214 - assert "no prompt" in result.output.lower() or "no prompt" in ( 215 - result.stderr or "" 216 - ).lower() 210 + assert ( 211 + "no prompt" in result.output.lower() 212 + or "no prompt" in (result.stderr or "").lower() 213 + ) 217 214 218 215 def test_handoff_whitespace_only_stdin(self): 219 216 """Whitespace-only stdin produces error.""" ··· 224 221 @patch("think.cortex_client.cortex_request", return_value=None) 225 222 def test_handoff_cortex_failure(self, mock_cortex): 226 223 """When cortex_request returns None, handoff reports error.""" 227 - result = runner.invoke( 228 - call_app, ["handoff", "coder"], input="Fix the bug\n" 229 - ) 224 + result = runner.invoke(call_app, ["handoff", "coder"], input="Fix the bug\n") 230 225 231 226 assert result.exit_code == 1 232 - assert "failed" in result.output.lower() or "failed" in ( 233 - result.stderr or "" 234 - ).lower() 227 + assert ( 228 + "failed" in result.output.lower() 229 + or "failed" in (result.stderr or "").lower() 230 + ) 235 231 236 232 237 233 # --------------------------------------------------------------------------- ··· 251 247 252 248 def test_coder_frontmatter(self): 253 249 """coder.md must have write: true and type: cogitate.""" 250 + from pathlib import Path 251 + 254 252 import frontmatter 255 - from pathlib import Path 256 253 257 254 coder_path = Path(__file__).parent.parent / "muse" / "coder.md" 258 255 post = frontmatter.load(coder_path)
+4 -1
think/agents.py
··· 1319 1319 1320 1320 for provider_name in providers: 1321 1321 for tier in tiers: 1322 - if targeted_pairs is not None and (provider_name, tier) not in targeted_pairs: 1322 + if ( 1323 + targeted_pairs is not None 1324 + and (provider_name, tier) not in targeted_pairs 1325 + ): 1323 1326 continue 1324 1327 model = PROVIDER_DEFAULTS[provider_name][tier] 1325 1328 for interface_name in interfaces: