personal memory agent
0

Configure Feed

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

Repin local llama runtime to b10068

Repin bundled llama.cpp from b9291 to b10068 for macos-arm64, ubuntu-vulkan-x64, and ubuntu-vulkan-arm64 with the verified artifact digests.

Rebase floor-tier Qwen residency from 4541 to 4137 MiB (measured 4130 MiB + 7 MiB cushion). This drops the Parakeet co-location requirement from 8512 to 8108 MiB, so 8 GiB cards (8192 MiB) now flip from CPU transcription to GPU transcription. The requirement still emerges from the tier constant; parakeet_placement.py arithmetic is unchanged.

Consolidate pin assertions into one version-neutral test covering all three complete tag/filename/digest triples; the aarch64-linux digest was previously asserted nowhere. Add a fail-closed installer test proving sha256 mismatch aborts before extraction, and cover the capable-tier Vulkan launch argument vector in addition to the floor tier.

Repair tests/eval_schemas.py by dropping the removed provider= kwarg and gating on the active-brain resolver. Serving topology, context tiers, request params, Flash Attention, and F16 KV remain unchanged.

+224 -78
+9 -9
solstone/think/providers/local_install.py
··· 97 97 98 98 LLAMA_SERVER_PINS: dict[str, dict[str, str]] = { 99 99 "aarch64-apple-darwin": { 100 - "release_tag": "b9291", 101 - "filename": "llama-b9291-bin-macos-arm64.tar.gz", 102 - "sha256": "0e985f87dd71f96a9cb9ebc3ad26f8388030342d000e7e82d4a38d14913373ff", 100 + "release_tag": "b10068", 101 + "filename": "llama-b10068-bin-macos-arm64.tar.gz", 102 + "sha256": "13aa2d40c76ad1dcb8ebeec5f0d2814bf3b2f84a66935c7d4dc6f7cca8e38d68", 103 103 "binary_name": "llama-server", 104 104 }, 105 105 "x86_64-unknown-linux-gnu": { 106 - "release_tag": "b9291", 107 - "filename": "llama-b9291-bin-ubuntu-vulkan-x64.tar.gz", 108 - "sha256": "7e3bf4202bedc71c2c9fbfbe02d10075b8d596bb963e7ab006663582dc2e92c2", 106 + "release_tag": "b10068", 107 + "filename": "llama-b10068-bin-ubuntu-vulkan-x64.tar.gz", 108 + "sha256": "713641920dce6c8efb953ebc9ffa309977e200cec5e182e6ad0e8b086203cdc3", 109 109 "binary_name": "llama-server", 110 110 }, 111 111 "aarch64-unknown-linux-gnu": { 112 - "release_tag": "b9291", 113 - "filename": "llama-b9291-bin-ubuntu-vulkan-arm64.tar.gz", 114 - "sha256": "c88f06cc72f746d7cbbd69b705f0788488d8b9fe9051995a5e59b3b8b1e8fe61", 112 + "release_tag": "b10068", 113 + "filename": "llama-b10068-bin-ubuntu-vulkan-arm64.tar.gz", 114 + "sha256": "c3c49e6e124a574165ca28317be021b1a12a2ea06977e3eb7daee3eb443eb186", 115 115 "binary_name": "llama-server", 116 116 }, 117 117 }
+1 -1
solstone/think/providers/local_server.py
··· 59 59 context_tokens=LOCAL_MIN_CONTEXT_TOKENS, 60 60 parallel_slots=1, 61 61 prompt_cache_mib=0, 62 - resident_mib=4541, 62 + resident_mib=4137, 63 63 ) 64 64 65 65 # COPY REVIEW: placeholder owner-facing copy; founder-gated before ship.
+6 -3
tests/eval_schemas.py
··· 17 17 if str(ROOT) not in sys.path: 18 18 sys.path.insert(0, str(ROOT)) 19 19 20 - from solstone.think.models import generate_with_result # noqa: E402 20 + from solstone.think import models # noqa: E402 21 21 from solstone.think.providers.local import LocalProviderError # noqa: E402 22 22 from solstone.think.schema_eval import ( # noqa: E402 23 23 content_preservation, ··· 58 58 59 59 60 60 def run_case(case: dict[str, Any]) -> dict[str, Any]: 61 - result = generate_with_result( 61 + result = models.generate_with_result( 62 62 contents=case["input"], 63 63 context="schema.eval", 64 - provider="local", 65 64 temperature=0.0, 66 65 max_output_tokens=int(case.get("max_output_tokens", 512)), 67 66 system_instruction=case["system_instruction"], ··· 113 112 parser.add_argument("--cases", type=Path, default=DEFAULT_CASES) 114 113 parser.add_argument("--out", type=Path, default=DEFAULT_OUT) 115 114 args = parser.parse_args(argv) 115 + 116 + if not models.type_default_is_local("generate"): 117 + print(LOCAL_NOT_READY, file=sys.stderr) 118 + return 2 116 119 117 120 cases = load_cases(_resolve_path(args.cases)) 118 121 results: list[dict[str, Any]] = []
+3 -22
tests/test_local.py
··· 2338 2338 context_tokens=16384, 2339 2339 parallel_slots=1, 2340 2340 prompt_cache_mib=0, 2341 - resident_mib=4541, 2341 + resident_mib=4137, 2342 2342 ), 2343 2343 ), 2344 2344 ( ··· 2348 2348 context_tokens=16384, 2349 2349 parallel_slots=1, 2350 2350 prompt_cache_mib=0, 2351 - resident_mib=4541, 2351 + resident_mib=4137, 2352 2352 ), 2353 2353 ), 2354 2354 ( ··· 2378 2378 assert tier == expected 2379 2379 assert tier.context_tokens >= 16384 2380 2380 assert tier.context_tokens > 0 2381 - assert local_server._FLOOR_TIER.resident_mib == 4541 2381 + assert local_server._FLOOR_TIER.resident_mib == 4137 2382 2382 assert local_server._CAPABLE_TIER.resident_mib is None 2383 2383 2384 2384 ··· 2463 2463 monkeypatch.setattr(utils, "read_service_port", lambda service: None) 2464 2464 monkeypatch.setattr(local_server, "read_local_context_window", lambda: None) 2465 2465 assert local_budget.context_window_tokens() == local_server.LOCAL_MIN_CONTEXT_TOKENS 2466 - 2467 - 2468 - def test_llama_server_pins_are_real_b9291_digests(): 2469 - from solstone.think.providers.local_install import LLAMA_SERVER_PINS 2470 - 2471 - mac = LLAMA_SERVER_PINS["aarch64-apple-darwin"] 2472 - linux = LLAMA_SERVER_PINS["x86_64-unknown-linux-gnu"] 2473 - assert mac["release_tag"] == "b9291" 2474 - assert mac["filename"] == "llama-b9291-bin-macos-arm64.tar.gz" 2475 - assert ( 2476 - mac["sha256"] 2477 - == "0e985f87dd71f96a9cb9ebc3ad26f8388030342d000e7e82d4a38d14913373ff" 2478 - ) 2479 - assert linux["release_tag"] == "b9291" 2480 - assert linux["filename"] == "llama-b9291-bin-ubuntu-vulkan-x64.tar.gz" 2481 - assert ( 2482 - linux["sha256"] 2483 - == "7e3bf4202bedc71c2c9fbfbe02d10075b8d596bb963e7ab006663582dc2e92c2" 2484 - ) 2485 2466 2486 2467 2487 2468 def _select_local_provider(monkeypatch) -> None:
+86 -26
tests/test_local_install.py
··· 275 275 assert exc_info.value.reason_code == "unsupported_platform" 276 276 277 277 278 - def test_llama_server_pins_cover_expected_platforms() -> None: 278 + def test_llama_server_pins_are_complete_immutable_artifacts() -> None: 279 + expected = { 280 + "aarch64-apple-darwin": { 281 + "release_tag": "b10068", 282 + "filename": "llama-b10068-bin-macos-arm64.tar.gz", 283 + "sha256": "13aa2d40c76ad1dcb8ebeec5f0d2814bf3b2f84a66935c7d4dc6f7cca8e38d68", 284 + "binary_name": "llama-server", 285 + }, 286 + "x86_64-unknown-linux-gnu": { 287 + "release_tag": "b10068", 288 + "filename": "llama-b10068-bin-ubuntu-vulkan-x64.tar.gz", 289 + "sha256": "713641920dce6c8efb953ebc9ffa309977e200cec5e182e6ad0e8b086203cdc3", 290 + "binary_name": "llama-server", 291 + }, 292 + "aarch64-unknown-linux-gnu": { 293 + "release_tag": "b10068", 294 + "filename": "llama-b10068-bin-ubuntu-vulkan-arm64.tar.gz", 295 + "sha256": "c3c49e6e124a574165ca28317be021b1a12a2ea06977e3eb7daee3eb443eb186", 296 + "binary_name": "llama-server", 297 + }, 298 + } 279 299 pins = local_install.LLAMA_SERVER_PINS 280 - # macOS arm64 (Metal) + both Linux arches on the cross-vendor Vulkan build. 281 - assert { 282 - "aarch64-apple-darwin", 283 - "x86_64-unknown-linux-gnu", 284 - "aarch64-unknown-linux-gnu", 285 - } <= set(pins) 286 - for key, pin in pins.items(): 287 - assert pin["release_tag"] == "b9291" 288 - assert pin["binary_name"] == "llama-server" 289 - # sha256 is a 64-char hex digest. 290 - assert len(pin["sha256"]) == 64 291 - int(pin["sha256"], 16) 292 - # Linux GPU acceleration rides the cross-vendor Vulkan prebuilt on both 293 - # arches (NVIDIA + AMD + Intel from one binary). 294 - if key.endswith("-unknown-linux-gnu"): 295 - assert "vulkan" in pin["filename"] 296 - assert ( 297 - pins["aarch64-unknown-linux-gnu"]["filename"] 298 - == "llama-b9291-bin-ubuntu-vulkan-arm64.tar.gz" 299 - ) 300 + 301 + assert set(pins) == set(expected) 302 + for key, expected_pin in expected.items(): 303 + assert pins[key] == expected_pin 300 304 301 305 302 306 def test_install_llama_server_relocates_binary_and_libraries(tmp_path, monkeypatch): 303 307 _init_journal(tmp_path, monkeypatch) 304 308 pin = local_install.pin_for_current_platform() 305 309 if local_install.llama_server_artifact_key() == "x86_64-unknown-linux-gnu": 306 - assert pin["filename"] == "llama-b9291-bin-ubuntu-vulkan-x64.tar.gz" 310 + assert pin["filename"] == "llama-b10068-bin-ubuntu-vulkan-x64.tar.gz" 307 311 assert ( 308 312 pin["sha256"] 309 - == "7e3bf4202bedc71c2c9fbfbe02d10075b8d596bb963e7ab006663582dc2e92c2" 313 + == "713641920dce6c8efb953ebc9ffa309977e200cec5e182e6ad0e8b086203cdc3" 310 314 ) 311 315 artifact_key = local_install.llama_server_artifact_key() 312 316 install_dir = local_install.binary_install_dir(artifact_key, pin) 313 317 binary_path = local_install.binary_path_for_pin(artifact_key, pin) 314 - inner_name = "llama-b9291" 318 + inner_name = "llama-b10068" 315 319 lib_names = ["libllama.so", "libggml.so", "libfoo.dylib"] 316 320 fixture_root = tmp_path / "fixture" / inner_name 317 321 fixture_root.mkdir(parents=True) ··· 355 359 assert result["install_state"] == "installed" 356 360 assert_flat_layout() 357 361 assert quarantine_calls == [install_dir, install_dir] 362 + 363 + 364 + def test_install_llama_server_sha256_mismatch_fails_closed_before_extract( 365 + tmp_path, monkeypatch 366 + ): 367 + _init_journal(tmp_path, monkeypatch) 368 + expected_urls = { 369 + "aarch64-apple-darwin": ( 370 + "https://github.com/ggml-org/llama.cpp/releases/download/b10068/" 371 + "llama-b10068-bin-macos-arm64.tar.gz" 372 + ), 373 + "x86_64-unknown-linux-gnu": ( 374 + "https://github.com/ggml-org/llama.cpp/releases/download/b10068/" 375 + "llama-b10068-bin-ubuntu-vulkan-x64.tar.gz" 376 + ), 377 + "aarch64-unknown-linux-gnu": ( 378 + "https://github.com/ggml-org/llama.cpp/releases/download/b10068/" 379 + "llama-b10068-bin-ubuntu-vulkan-arm64.tar.gz" 380 + ), 381 + } 382 + artifact_key = local_install.llama_server_artifact_key() 383 + pin = local_install.pin_for_current_platform() 384 + install_dir = local_install.binary_install_dir(artifact_key, pin) 385 + binary_path = local_install.binary_path_for_pin(artifact_key, pin) 386 + inner_name = "llama-b10068" 387 + fixture_root = tmp_path / "fixture" / inner_name 388 + fixture_root.mkdir(parents=True) 389 + (fixture_root / pin["binary_name"]).write_bytes(b"not the pinned server") 390 + fixture_tarball = tmp_path / pin["filename"] 391 + with tarfile.open(fixture_tarball, "w:gz") as archive: 392 + archive.add(fixture_root, arcname=inner_name) 393 + download_urls: list[str] = [] 394 + 395 + def fake_download(url, dest, **_kwargs): 396 + download_urls.append(url) 397 + dest.parent.mkdir(parents=True, exist_ok=True) 398 + shutil.copy2(fixture_tarball, dest) 399 + 400 + monkeypatch.setattr(local_install, "_download_file", fake_download) 401 + 402 + with pytest.raises(local_install.LocalProviderError) as exc_info: 403 + local_install.install_llama_server() 404 + 405 + assert exc_info.value.reason_code == "sha256_mismatch" 406 + assert download_urls == [expected_urls[artifact_key]] 407 + status = _local_status() 408 + assert status["install_state"] == "failed" 409 + assert status["install_error"] is not None 410 + assert "sha256 mismatch" in status["install_error"] 411 + slot = _local_slot() 412 + assert slot["binary_artifact"] == pin["filename"] 413 + assert "binary_sha256" not in slot 414 + assert "binary_path" not in slot 415 + assert not binary_path.exists() 416 + assert not (install_dir / inner_name).exists() 417 + assert sorted(child.name for child in install_dir.iterdir()) == [pin["filename"]] 358 418 359 419 360 420 def test_install_llama_server_writes_canonical_sequence(tmp_path, monkeypatch): ··· 775 835 canonical.chmod(0o755) 776 836 local_install._write_local_metadata( 777 837 { 778 - "binary_artifact": "llama-b9291-bin-ubuntu-x64.tar.gz", 838 + "binary_artifact": "llama-stale-bin-ubuntu-x64.tar.gz", 779 839 "binary_sha256": "deadbeef" * 8, 780 840 "binary_path": str(canonical), 781 841 } ··· 1053 1113 canonical.chmod(0o755) 1054 1114 local_install._write_local_metadata( 1055 1115 { 1056 - "binary_artifact": "llama-b9291-bin-ubuntu-x64.tar.gz", 1116 + "binary_artifact": "llama-stale-bin-ubuntu-x64.tar.gz", 1057 1117 "binary_sha256": "deadbeef" * 8, 1058 1118 "binary_path": str(canonical), 1059 1119 }
+12 -7
tests/test_parakeet_placement.py
··· 58 58 assert decision.force_cpu is True 59 59 assert decision.reason_code == "co_location_requires_cpu" 60 60 assert decision.tier_name == "floor" 61 - assert decision.tier_resident_mib == 4541 61 + assert decision.tier_resident_mib == 4137 62 62 assert decision.parakeet_worst_case_mib == PARAKEET_WORST_CASE_MIB 63 63 assert decision.margin_mib == CO_FIT_MARGIN_MIB 64 - assert decision.required_mib == 8512 64 + assert decision.required_mib == 8108 65 65 assert decision.vram_mib == 6144 66 66 67 67 68 68 @pytest.mark.parametrize( 69 69 ("vram_mib", "force_cpu"), 70 70 [ 71 - (8511, True), 72 - (8512, False), 73 - (8192, True), 74 - (10240, False), 71 + (6144, True), 72 + (8107, True), 73 + (8108, False), 74 + (8192, False), 75 75 ], 76 76 ) 77 77 def test_floor_tier_placement_boundary(vram_mib: int, force_cpu: bool) -> None: 78 78 decision = _decision(vram_mib) 79 79 80 - assert decision.required_mib == 8512 80 + assert decision.tier_name == "floor" 81 + assert decision.tier_resident_mib == 4137 82 + assert decision.parakeet_worst_case_mib == PARAKEET_WORST_CASE_MIB 83 + assert decision.margin_mib == CO_FIT_MARGIN_MIB 84 + assert decision.required_mib == 8108 85 + assert decision.vram_mib == vram_mib 81 86 assert decision.force_cpu is force_cpu 82 87 83 88
+80 -1
tests/test_schema_prep.py
··· 4 4 from __future__ import annotations 5 5 6 6 import copy 7 + import inspect 7 8 import json 8 9 from pathlib import Path 9 10 from types import SimpleNamespace ··· 12 13 13 14 import pytest 14 15 16 + import tests.eval_schemas as eval_schemas 15 17 from solstone.apps.timeline.rollup import build_rollup_schema 16 18 from solstone.think.models import SchemaValidationError, generate 17 19 from solstone.think.schema_prep import prepare_provider_schema, unsupported_keyword_hits 18 20 from solstone.think.talent import RUNTIME_FACETS_SENTINEL 19 - from tests.eval_schemas import DEFAULT_CASES, DEFAULT_OUT, load_cases 21 + from tests.eval_schemas import DEFAULT_CASES, DEFAULT_OUT, load_cases, run_case 20 22 21 23 REPO_ROOT = Path(__file__).resolve().parents[1] 22 24 ··· 132 134 133 135 assert rel.parts[:3] == ("tests", "fixtures", "schema_eval") 134 136 assert "tmp" not in rel.parts 137 + 138 + 139 + def test_schema_eval_run_case_uses_generate_signature_without_provider( 140 + monkeypatch: pytest.MonkeyPatch, 141 + ) -> None: 142 + signature = inspect.signature(eval_schemas.models.generate_with_result) 143 + assert "provider" not in signature.parameters 144 + with pytest.raises(TypeError): 145 + signature.bind(contents="hello", context="schema.eval", provider="local") 146 + 147 + calls: list[dict[str, Any]] = [] 148 + 149 + def fake_generate_with_result(*args: Any, **kwargs: Any) -> dict[str, Any]: 150 + signature.bind(*args, **kwargs) 151 + calls.append(kwargs) 152 + return { 153 + "text": '{"status":"ok"}', 154 + "finish_reason": "stop", 155 + "model": "test-model", 156 + "usage": {"input_tokens": 1, "output_tokens": 1}, 157 + } 158 + 159 + monkeypatch.setattr( 160 + eval_schemas.models, 161 + "generate_with_result", 162 + fake_generate_with_result, 163 + ) 164 + 165 + result = run_case( 166 + { 167 + "name": "strict_signature", 168 + "input": "hello", 169 + "system_instruction": "Return JSON.", 170 + "schema": { 171 + "type": "object", 172 + "properties": {"status": {"type": "string"}}, 173 + "required": ["status"], 174 + "additionalProperties": False, 175 + }, 176 + "expect_contains": ["ok"], 177 + } 178 + ) 179 + 180 + assert result["schema_validity"]["valid"] is True 181 + assert calls 182 + assert "provider" not in calls[0] 183 + 184 + 185 + def test_schema_eval_main_requires_active_local_provider( 186 + tmp_path: Path, 187 + monkeypatch: pytest.MonkeyPatch, 188 + capsys: pytest.CaptureFixture[str], 189 + ) -> None: 190 + monkeypatch.setattr( 191 + eval_schemas.models, 192 + "type_default_is_local", 193 + lambda agent_type: False, 194 + ) 195 + monkeypatch.setattr( 196 + eval_schemas, 197 + "load_cases", 198 + lambda _path: pytest.fail("cases should not be loaded"), 199 + ) 200 + 201 + exit_code = eval_schemas.main( 202 + [ 203 + "--cases", 204 + str(tmp_path / "missing.jsonl"), 205 + "--out", 206 + str(tmp_path / "out"), 207 + ] 208 + ) 209 + 210 + captured = capsys.readouterr() 211 + assert exit_code == 2 212 + assert eval_schemas.LOCAL_NOT_READY in captured.err 213 + assert captured.out == "" 135 214 136 215 137 216 @pytest.mark.parametrize("provider", ["local", "openai", "google", "anthropic", "fake"])
+25 -7
tests/test_supervisor.py
··· 3237 3237 launch.assert_not_called() 3238 3238 3239 3239 3240 + @pytest.mark.parametrize( 3241 + ("vram_mib", "expected_context_tokens", "expected_parallel", "expected_cache_ram"), 3242 + [ 3243 + (6390, None, "1", "0"), 3244 + (16000, 32768, "2", "2048"), 3245 + ], 3246 + ) 3240 3247 def test_start_local_server_launches_llama_server_key_and_cmd( 3241 - tmp_path, monkeypatch, capsys 3248 + tmp_path, 3249 + monkeypatch, 3250 + capsys, 3251 + vram_mib: int, 3252 + expected_context_tokens: int | None, 3253 + expected_parallel: str, 3254 + expected_cache_ram: str, 3242 3255 ): 3243 3256 mod = importlib.import_module("solstone.think.supervisor") 3244 3257 from solstone.think.providers import local_install, local_server, local_vulkan 3245 3258 3259 + expected_context_tokens = ( 3260 + local_server.LOCAL_MIN_CONTEXT_TOKENS 3261 + if expected_context_tokens is None 3262 + else expected_context_tokens 3263 + ) 3246 3264 mod._SERVICE_STATE.clear() 3247 3265 binary = tmp_path / "llama-server" 3248 3266 # ensure_artifacts_installed always resolves artifacts under the selected ··· 3275 3293 1, 3276 3294 "NVIDIA GeForce GTX 1660 Ti", 3277 3295 local_vulkan.VK_TYPE_DISCRETE, 3278 - 6390, 3296 + vram_mib, 3279 3297 ) 3280 3298 ], 3281 3299 ) ··· 3307 3325 3308 3326 assert result is managed 3309 3327 assert written_ports == [("local", 2468)] 3310 - assert written_context_windows == [local_server.LOCAL_MIN_CONTEXT_TOKENS] 3328 + assert written_context_windows == [expected_context_tokens] 3311 3329 assert spawned == [ 3312 3330 [ 3313 3331 str(binary), ··· 3323 3341 "--n-gpu-layers", 3324 3342 "999", 3325 3343 "-c", 3326 - str(local_server.LOCAL_MIN_CONTEXT_TOKENS), 3344 + str(expected_context_tokens), 3327 3345 "--parallel", 3328 - "1", 3346 + expected_parallel, 3329 3347 "--kv-unified", 3330 3348 "--cache-ram", 3331 - "0", 3349 + expected_cache_ram, 3332 3350 "--no-context-shift", 3333 3351 "--device", 3334 3352 "Vulkan0", ··· 3351 3369 context_tokens=16384, 3352 3370 parallel_slots=1, 3353 3371 prompt_cache_mib=0, 3354 - resident_mib=4541, 3372 + resident_mib=4137, 3355 3373 ) 3356 3374 capable = local_server.ServerTier( 3357 3375 name="capable",
+2 -2
tests/test_supervisor_parakeet.py
··· 375 375 assert parakeet_server.read_parakeet_placement() == "cpu" 376 376 assert ( 377 377 "parakeet-server auto placement resolved to CPU: tier=floor " 378 - "tier_resident_mib=4541 parakeet_worst_case_mib=2947 margin_mib=1024 " 379 - "required_mib=8512 gpu_vram_mib=6144 placement=cpu" 378 + "tier_resident_mib=4137 parakeet_worst_case_mib=2947 margin_mib=1024 " 379 + "required_mib=8108 gpu_vram_mib=6144 placement=cpu" 380 380 ) in caplog.text 381 381 assert _launch_log("cpu") in caplog.text 382 382