diff --git a/deploy/STRATA_NATIVE.md b/deploy/STRATA_NATIVE.md index 9482c36..fa3d1d4 100644 --- a/deploy/STRATA_NATIVE.md +++ b/deploy/STRATA_NATIVE.md @@ -1,6 +1,6 @@ # Strata in Athena Deck -Strata Engine 0.1.47 (Release v0.2.2), Commit `011c9e600a93bbc9fd451c563501b5831c32bbca`, ist eine +Strata Engine 0.1.48 (Release v0.2.3), Commit `5c8dd322528cc84f68f461ad54a506b9da8fa8d4`, ist eine zweite Chat-Laufzeit. Deck startet das unveränderte `serve/server.py` und dessen Engine als eigene Prozessgruppe auf einem zufälligen Loopback-Port mit einem zufälligen, nur lokal gespeicherten Token. Clients verwenden weiterhin den @@ -251,3 +251,22 @@ Kontextfenster oder Tuningmatrix. Tatsächliche Messwerte und Einschränkungen: `docs/maintenance/strata-022-2026-10-21/README.md`. + +## Vorbereitetes Update vom 23. Oktober 2026 + +Offizielles v0.2.3 / Engine0.1.48, Commit +`5c8dd322528cc84f68f461ad54a506b9da8fa8d4`: zunächst separat mit CUDA13 und +SM86/120 gebaut, dann erst nach Michaels Go im Leerlauf direkt übernommen. +Kein erneuter Gewichtsdownload, keine Sicherung und keine zweite dauerhafte +Laufzeit. Produktions-Quellstand auf den festen Commit umgestellt, fertige +Engine, Begleitbibliothek, CPU-Vision und Python-Umgebung übernommen; +Paketmarker/Restore-Pin angepasst. Profile und Audio-/CPU-/Endpunktregeln bleiben +unverändert. Das heutige kleine Image-Layer ändert nur Rezept und nativen +Vision-Installer, nicht die Docker-Basis. Keine DFlash2- oder Tuningumstellung. + +Der native Vision-Installer fragt nun wie upstream `ensure_build_tools()` ab, +statt CMake zwingend unter `.venv/bin` vorauszusetzen; System-CMake kann gültig +sein, Ninja wird explizit als CMAKE_MAKE_PROGRAM gesetzt. Native Neuinstallation +benutzt denselben gepinnten Installer und bestehenden CUDA13-Weg. Die vollständige +Fresh-Debian-/Restore-Abnahme bleibt offen. Details und Abnahme: +`docs/maintenance/strata-023-staged-2026-10-23/README.md`. diff --git a/deploy/install_strata_vision.py b/deploy/install_strata_vision.py index a02123e..268f620 100644 --- a/deploy/install_strata_vision.py +++ b/deploy/install_strata_vision.py @@ -34,11 +34,16 @@ def install(runtime, storage): partial.unlink(missing_ok=True) raise ValueError('Projector size or checksum differs from original source') os.replace(partial, target) - cmake = source / '.venv/bin/cmake' + # Upstream may reuse system CMake instead of installing it into the venv. + python = source / '.venv/bin/python' + env = dict(os.environ, PATH=str(python.parent) + os.pathsep + os.environ.get('PATH', '')) + tools = subprocess.check_output([str(python), '-c', + 'import setup,json; print(json.dumps(list(map(str,setup.ensure_build_tools()))))'], + cwd=source, env=env, text=True) + cmake, ninja = map(Path, json.loads(tools.strip().splitlines()[-1])) build = source / 'build-vision-cpu' - env = dict(os.environ, PATH=str(cmake.parent) + os.pathsep + os.environ.get('PATH', '')) subprocess.run([str(cmake), '-S', str(source / 'tools/vision'), '-B', str(build), - '-G', 'Ninja', '-DCMAKE_BUILD_TYPE=Release', + '-G', 'Ninja', '-DCMAKE_MAKE_PROGRAM=' + str(ninja), '-DCMAKE_BUILD_TYPE=Release', '-DLLAMA_DIR=' + str(source / 'third_party/llama.cpp'), '-DSTRATA_VISION_CUDA=OFF', '-DSTRATA_PORTABLE=ON'], check=True, env=env) subprocess.run([str(cmake), '--build', str(build), '--target', 'strata-vision', '-j', '2'], check=True, env=env) diff --git a/docs/maintenance/strata-023-staged-2026-10-23/README.md b/docs/maintenance/strata-023-staged-2026-10-23/README.md new file mode 100644 index 0000000..42e6eea --- /dev/null +++ b/docs/maintenance/strata-023-staged-2026-10-23/README.md @@ -0,0 +1,93 @@ +# Strata v0.2.3 staged build · 23 October 2026 + +Initial authorization: background build only. **Michael subsequently authorized activation with “autauschen”; activation completed.** +No production runtime/source/recipe/profile change, no inference or benchmark. +The original v0.2.2 / Engine0.1.47 stays active. Do not interpret a successful +candidate build as model-serving acceptance or authorization to activate. + +Official tag v0.2.3: annotated tag cad69daf8cbde12ef1fafd891ad69288e0ed2501, +peeled commit 5c8dd322528cc84f68f461ad54a506b9da8fa8d4, Engine0.1.48. + +Persistent candidate stage on Athena: +`/opt/athena-deck-dev/runtime/state/strata-candidate-v0.2.3`. +`runtime/candidate-status.json` records building/built/failed and always +`activated:false`; `runtime/candidate-build.log` records compiler output. +The separate `recipe` contains a copy of the existing native installer and a +candidate-only updated strata_sources.json. Production pins are unchanged. + +Temporary compiler container `athena-strata-build-023`, existing image +`athena-deck-standalone:8cf88a02e30444e8`, auto-removes on exit. CPU quota2, +RAM/swap6GiB (no additional swap), nice15, no GPU devices/ports, capabilities +dropped, no new privileges. Only writable candidate runtime is mounted; +production CUDA13 toolkit is mounted read-only. No model directory or private +Deck state is mounted. CMake Ninja compile pool2/link pool1 bounds upstream's +explicit -j6 without editing upstream program sources. + +Uses unchanged native deploy/install_strata.py, private CUDA13.0.48, +architectures86;120. CPU vision encoder is compiled from the same candidate +source using the existing native CMake recipe; projector weights are not read +or downloaded. Version/BUILD.json and binary hashes are recorded after success. +No model-start acceptance until authorized activation at idle. + +The build script has **no activation path**. Build completion never replaces +production. Production engine/server/ready marker and profiles/endpoint/audio/ +CPU files are checked by hashes in `production-before.json` without copying +private configuration contents into this documentation. + +After a future Go: first check build success, production active/waiting requests, +current layout and matching native CUDA/vision dependencies. Finish any failed +build before considering replacement. Apply the same fixed source/recipe to +persistent native integration and production Deck recipe, preserve current +weights/packs/MTP/vision/profile settings, and make only the required idle +activation. Validate version, health and one authorized synthetic request. +Do not reintroduce deleted IQ3_S weights or enable DFlash2/tuning without scope. +Remove the temporary candidate once promotion is complete; no permanent second +runtime is intended. + +Native Debian: run the same installer as the service account into a separate +candidate directory, explicit existing CUDA13 compiler and both architectures; +standard CMake job pools/resource limits bound compilation. Docker supplies only +today's compiler environment. Full fresh-Debian restore qualification remains +open as documented in deploy/STRATA_NATIVE.md; a staged build does not close it. + +## Build completion observed + +Engine and CPU vision encoder are built; actual executable reports +`strata 0.1.48`, official BUILD.json archs86/120 verified. Companion +libstrata_kq.so built. Hashes in build-result.json. Temporary compiler container +auto-removed; production binary/server/ready/config hashes match pre-build. +No model inference/activation test performed. Still awaiting Michael's Go. + +First pass compiled the engine but the wrapper assumed `.venv/bin/cmake` for +vision; upstream reused `/usr/bin/cmake`, so vision failed before execution. +Wrapper corrected to use upstream ensure_build_tools() paths for both CMake +and Ninja. Second pass reused the finished engine and completed CPU vision. +Upstream sources and production remained untouched by this wrapper repair. + +## Authorized activation completed + +After Michael's explicit Go, the exact official release was promoted at idle. +Image `athena-deck-standalone:strata-0.1.48-20261023`, actual `strata 0.1.48`, +endpoint running and container healthy. Original `flash-next-strata-iq3-dual` +profile loaded; GPU order, split and parallel capacity unchanged. Profiles, +endpoint, reasoning-budget, audio-policy and cpu-partition hashes identical. +TTS and STT loaded. Temporary candidate/runtime deleted after verifying promoted +engine/library/vision/BUILD.json hashes against build-result.json. No backup, +new weights, DFlash2, host/Hermes restart or permanent parallel runtime. + +One synthetic endpoint request:34 input /128 output tokens, decode49.3tok/s, +prompt634.5ms, whole request50.94s including model loading. Cold first request, +not a speed comparison or evidence of a regression/improvement. No answer text +saved. See activation-result.json for metrics. + +19 focused Strata/reasoning tests pass. Two additional encrypted-backup tests +could not execute locally because the Mac Python lacks cryptography; they are +not reported as passed, and no production backup was created. A local Git-fetch +from the candidate was refused due to repository ownership before any stop; +fetching the same fixed commit from official GitHub resolved this safely. +The production source checkout preserves unrelated untracked source-side files. +The native vision installer was updated to use upstream tool discovery, matching +the successful candidate build. No full native fresh-host restore qualification. + +Earlier staged-build/no-activation paragraphs describe the state before Go. +Current source/recipe pins and actual runtime are v0.2.3/0.1.48. diff --git a/docs/maintenance/strata-023-staged-2026-10-23/activation-result.json b/docs/maintenance/strata-023-staged-2026-10-23/activation-result.json new file mode 100644 index 0000000..8eea2a1 --- /dev/null +++ b/docs/maintenance/strata-023-staged-2026-10-23/activation-result.json @@ -0,0 +1,87 @@ +{ + "release": "v0.2.3", + "version": "0.1.48", + "commit": "5c8dd322528cc84f68f461ad54a506b9da8fa8d4", + "previous_profile": "flash-next-strata-iq3-dual", + "backup_created": false, + "settings_before": { + "profiles.json": "e56a9cab15bed73d6bdd95dec0fe03c1eec636b8a3130e070e06b8b475210f3e", + "endpoint.json": "1777010839b4cf905d1d52a76aaec55cc0d2e72fd8634a98dfecf1cc705f9d18", + "reasoning-budget.json": "4884a379adf2f888415041b81ef55a01a2c22ef7a41ca1554460f410bec5cf0c", + "audio-policy.json": "f48dedea718968c00c0647ca90c1402bdabac9ce600dbeddc495817680527a3f", + "cpu-partition.json": "078d9215c41d7beafe42391a6a25c9aa34ad7f5b88ebbf40e2c178123e6611c1" + }, + "phase": "complete", + "actual_version": "strata 0.1.48", + "request_test": { + "usage": { + "prompt_tokens": 34, + "completion_tokens": 128, + "total_tokens": 162, + "prompt_tokens_details": { + "cached_tokens": 0 + } + }, + "timings": { + "cache_n": 0, + "prompt_n": 34, + "prompt_ms": 634.5, + "prompt_per_token_ms": 18.662, + "prompt_per_second": 53.6, + "predicted_n": 128, + "predicted_ms": 2597.3, + "predicted_per_token_ms": 20.291, + "predicted_per_second": 49.3, + "draft_n": 76, + "draft_n_accepted": 44 + }, + "wall_seconds_including_load": 50.939893201051746, + "complete": true + }, + "settings_unchanged": true, + "endpoint": { + "state": "running", + "port": 8120, + "counts": { + "llm": { + "enabled": 12, + "available": 12, + "loaded": true, + "supported": true + }, + "image": { + "enabled": 1, + "available": 1, + "loaded": false, + "supported": true + }, + "tts": { + "enabled": 1, + "available": 1, + "loaded": true, + "supported": true + }, + "stt": { + "enabled": 1, + "available": 1, + "loaded": true, + "supported": true + }, + "music": { + "enabled": 2, + "available": 2, + "loaded": false, + "supported": true + }, + "voice": { + "enabled": 1, + "available": 1, + "loaded": false, + "supported": true + } + }, + "active_requests": 0 + }, + "image": "athena-deck-standalone:strata-0.1.48-20261023", + "container_health": "healthy" +} \ No newline at end of file diff --git a/docs/maintenance/strata-023-staged-2026-10-23/build-result.json b/docs/maintenance/strata-023-staged-2026-10-23/build-result.json new file mode 100644 index 0000000..9f50544 --- /dev/null +++ b/docs/maintenance/strata-023-staged-2026-10-23/build-result.json @@ -0,0 +1,19 @@ +{ + "state": "built", + "activated": false, + "version": "strata 0.1.48", + "commit": "5c8dd322528cc84f68f461ad54a506b9da8fa8d4", + "architectures": [ + 86, + 120 + ], + "cuda": "13.0", + "cpu_vision_built": true, + "hashes": { + "BUILD.json": "f066d48e33f9936cd103499569361001eede646cf1346950c28a5d1126d0fe28", + "strata": "7cc72eb6b910dde73a360fe005c25a56c044818b28f1b03c6801200559554648", + "strata-vision": "dc574415301b7ac11aa8767c1c467604a4c14cf3b5c48155f6f1cb900864fcd2", + "libstrata_kq.so": "4db85d5b2527a9af38fe56faf551a7f1dd2f622dd4ee07913b1998e453f4cf48" + }, + "finished": 1792769826.9582257 +} \ No newline at end of file diff --git a/docs/maintenance/strata-023-staged-2026-10-23/build.py b/docs/maintenance/strata-023-staged-2026-10-23/build.py new file mode 100644 index 0000000..90ed66c --- /dev/null +++ b/docs/maintenance/strata-023-staged-2026-10-23/build.py @@ -0,0 +1,21 @@ +import json,os,subprocess,time,shutil,hashlib +from pathlib import Path +root=Path('/var/lib/deck/strata-runtime');source=root/'source';status=root/'candidate-status.json';log=root/'candidate-build.log' +def run(phase,cmd,env=None): + status.write_text(json.dumps(dict(state='building',phase=phase,updated=time.time(),activated=False))) + print(phase,flush=True) + with log.open('a') as f:subprocess.run(list(map(str,cmd)),env=env,stdout=f,stderr=subprocess.STDOUT,check=True) +try: + root.joinpath('home').mkdir(exist_ok=True) + env=dict(os.environ,CMAKE_TOOLCHAIN_FILE=str(root/'compile-pools.cmake')) + run('Native engine 0.1.48, CUDA13, SM86/120',['python3','/build/deploy/install_strata.py','--destination',root,'--nvcc',root/'cuda/bin/nvcc'],env) + env.update(PATH=str(source/'.venv/bin')+os.pathsep+env.get('PATH','')) + tools=json.loads(subprocess.check_output([str(source/'.venv/bin/python'),'-c','import setup,json; print(json.dumps(list(map(str,setup.ensure_build_tools()))))'],cwd=source,env=env,text=True).strip().splitlines()[-1]);cmake=Path(tools[0]);ninja=tools[1] + run('CPU vision configure',[cmake,'-S',source/'tools/vision','-B',source/'build-vision-cpu','-G','Ninja','-DCMAKE_MAKE_PROGRAM='+ninja,'-DCMAKE_BUILD_TYPE=Release','-DLLAMA_DIR='+str(source/'third_party/llama.cpp'),'-DSTRATA_VISION_CUDA=OFF','-DSTRATA_PORTABLE=ON'],env) + run('CPU vision build',[cmake,'--build',source/'build-vision-cpu','--target','strata-vision','-j','2'],env) + shutil.copy2(source/'build-vision-cpu/bin/strata-vision',source/'engine/strata-vision') + version=subprocess.check_output([str(source/'engine/strata'),'--version'],text=True,stderr=subprocess.STDOUT).strip();assert '0.1.48' in version + hashes={p.name:hashlib.file_digest(p.open('rb'),'sha256').hexdigest() for p in (source/'engine').iterdir() if p.is_file()} + status.write_text(json.dumps(dict(state='built',activated=False,version=version,commit='5c8dd322528cc84f68f461ad54a506b9da8fa8d4',architectures=[86,120],cuda='13.0',cpu_vision_built=True,hashes=hashes,finished=time.time()),indent=2));print('Candidate built; production not changed; awaiting Michael Go.',flush=True) +except BaseException as e: + status.write_text(json.dumps(dict(state='failed',error=type(e).__name__+': '+str(e),activated=False,updated=time.time()),indent=2));raise diff --git a/docs/maintenance/strata-023-staged-2026-10-23/compile-pools.cmake b/docs/maintenance/strata-023-staged-2026-10-23/compile-pools.cmake new file mode 100644 index 0000000..6b329a4 --- /dev/null +++ b/docs/maintenance/strata-023-staged-2026-10-23/compile-pools.cmake @@ -0,0 +1,3 @@ +set(CMAKE_JOB_POOLS "strata_compile=2;strata_link=1" CACHE STRING "Bound background compilation") +set(CMAKE_JOB_POOL_COMPILE strata_compile CACHE STRING "Compile pool") +set(CMAKE_JOB_POOL_LINK strata_link CACHE STRING "Link pool") diff --git a/docs/maintenance/strata-023-staged-2026-10-23/promote.py b/docs/maintenance/strata-023-staged-2026-10-23/promote.py new file mode 100644 index 0000000..0137bd6 --- /dev/null +++ b/docs/maintenance/strata-023-staged-2026-10-23/promote.py @@ -0,0 +1,66 @@ +import json,subprocess,sys,time,urllib.request,importlib.util,hashlib,shutil,os +from pathlib import Path +base=Path('/opt/athena-deck-dev/runtime');state=base/'state';stage=state/'strata-candidate-v0.2.3';prod=state/'strata-runtime';candidate=stage/'runtime';source=prod/'source';key=json.load(sys.stdin)['key'];recipe=json.loads((stage/'app/strata_sources.json').read_text());built=json.loads((candidate/'candidate-status.json').read_text()) +assert built['state']=='built' and built['commit']==recipe['code'] and built['version']=='strata 0.1.48' +for name,digest in built['hashes'].items():assert hashlib.file_digest((candidate/'source/engine'/name).open('rb'),'sha256').hexdigest()==digest +spec=importlib.util.spec_from_file_location('deck_install','/opt/athena-deck-dev/source/deploy/install.py');m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m);c=m.load_manifest(base);assert m.owned(c['name'],base)['State']['Running'];worker=json.loads((state/'strata-worker/worker.json').read_text());previous=worker['model_name'];oldimage=c['image'] +def request(path,port=8108,body=None,timeout=15): + r=urllib.request.Request('http://127.0.0.1:'+str(port)+path,data=None if body is None else json.dumps(body).encode(),headers={'Authorization':'Bearer '+key,'Content-Type':'application/json'}) + with urllib.request.urlopen(r,timeout=timeout) as f:return json.load(f) +def idle(): + until=time.monotonic()+1800 + while time.monotonic()0 + result['request_test']=dict(usage=usage,timings=timings,wall_seconds_including_load=time.monotonic()-start,complete=True) + after=json.loads((state/'strata-worker/worker.json').read_text());assert after['model_name']==previous and after['gpu']==worker['gpu'] and after['layer_split']==worker['layer_split'] and after['parallel']==worker['parallel'];result['settings_unchanged']=before==hashes();assert result['settings_unchanged'];result['endpoint']=request('/api/v1/status')['endpoint'];result['image']=image + health=json.loads(subprocess.check_output(['docker','inspect','--format','{{json .State.Health}}',c['name']],text=True));result['container_health']=health['Status'];save('complete') +except BaseException: + save('failed; activation requires inspection; no backup or unverified fallback');raise diff --git a/strata_sources.json b/strata_sources.json index b7a7c60..2c6868d 100644 --- a/strata_sources.json +++ b/strata_sources.json @@ -1,6 +1,6 @@ { - "code": "011c9e600a93bbc9fd451c563501b5831c32bbca", - "version": "0.1.47", + "code": "5c8dd322528cc84f68f461ad54a506b9da8fa8d4", + "version": "0.1.48", "reasoning_loop_recovery": "stop", "repo": "ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF", "revision": "ed59f92082b1e93c0e96d60a8b11aab089b52f09",