Add pinned Basalt 0.5.6 and isolated Inkling profile support

This commit is contained in:
Mikei386 committed 2026-11-23 18:59:07 +01:00
1 parent c6dd01764f
commit 509a6c668a
25 files changed
+1097 -20

No files matched your search

+27
View File
@@ -5,6 +5,33 @@ curated project handoff, not imported chat history. Read applicable `AGENTS.md`,
then the current source and relevant linked documentation; verify live state
again before changing anything. Historical notes do not override current facts.
## Basalt 0.5.6 active; Inkling additionally available · 23 November 2026
Explicit user Go covered latest build/replacement, exactly one short Qwen API
sample before/after, then Inkling download/additional endpoint and Hermes
profiles. Live pin `1e205ae87cc8e3c04e96db40fd505a75f44685ec`, final image
`sha256:803aadc28939e5d9598343105ea2c5d715dad5f6c7d27259ebc1e7c0fd494bf9`.
834 root tests,11 drain/reference guards and1300 upstream CPU fixtures (16skips)
passed; actual fatbins and full isolated Server starts checked. Initial CPU
supervisor timeout and stale historical reference-model manifest are documented
with corrected successors, not erased. Normal saved-vault re-login succeeded.
Inkling pack independently hashed, additional enabled Deck API `inkling-2-mini`,
profile `1919906bd7e24d90a5dfe92db7fc9ba5` revision2/65536context/one slot,
text-only/fp8/5080+CPU experts. Hermes `inkling-test` is registered, no tools or
MCPs, own role,0600 config and matching model.context_length; actual German CLI
answer passed. Do not use ollama_num_ctx: its `options` field is invalid here.
Initial32K proposal failed Hermes'64K minimum, not GPU inference.
Qwen is restored/BEREIT/two262144 slots. Original GPU TTS/ASR owners loaded;
healthy app, original profile rows and endpoint settings preserved except new
Inkling row/enable, audio/CPU/reasoning hashes unchanged. Single3227-in/256-out
samples: prefill2642.3→2596.8, decode91.4→72.0tok/s; after wall58.568s includes
cold restoration. No speedup claim or additional benchmark authorized/performed.
Mac-native switching, full-context/quality/vision and fresh-Debian/full restore
remain untested. Preserve previous040/033/030 runtime/toolkit dependencies.
[Exact receipts, code/native recipes and acceptance limits](maintenance/basalt-056-inkling-2026-11-23/README.md).
## Remaining voice data tidied · 23 November 2026
Michael's relayed “Yes, tidy up” authorizes storage-only preservation, not TTS
+29 -1
View File
@@ -1,4 +1,32 @@
## Basalt 0.3.3 active · 13 November 2026, 13:20 UTC
## Basalt 0.5.6 and additional Inkling profile · 23 November 2026
Michael authorized current Basalt replacement, one short prefill/decode sample
before/after, then Inkling download and additional endpoint/Hermes profiles.
Live0.5.6 pin `1e205ae87cc8e3c04e96db40fd505a75f44685ec`; final image
`sha256:803aadc28939e5d9598343105ea2c5d715dad5f6c7d27259ebc1e7c0fd494bf9`.
834 root tests,11 maintenance guards,1300 upstream CPU fixtures (16skips), actual
textSM120/visionSM86+120 fatbins and isolated full Server starts passed.
Original Qwen restored with BEREIT, two262144-context slots; original GPU TTS/ASR
owners loaded. Healthy/OOM=false/restarts0. No broad performance claim: identical
3227-in/256-out single samples gave0.4.0→0.5.6 prefill2642.3→2596.8 and
decode91.4→72.0tok/s; the after call included cold restoration.
Inkling model hash/size independently verified. Additional enabled profile
`1919906bd7e24d90a5dfe92db7fc9ba5`, revision2, API ID `inkling-2-mini`,
65536context/one slot/fp8/text-only/5080+CPU experts. Existing profile rows and
endpoint settings unchanged except that row/enable addition; audio/CPU/reasoning
hashes unchanged. Hermes `inkling-test` has no CLI/API tools or MCPs, managed
Athena credentials and matching model.context_length65536; real German CLI
answer passed. Mac-native profile selection is not separately client-tested.
An obsolete installer `reference_models=true` manifest referred to removed27B
test files: verified unused and retired without changing its source guard or
Docker arguments. The corrected preflight catches this before downtime. An
additional current-image UI overlay correctly recognizes Inkling rather than
only the old Qwen recipe. Preserve previous040/033/030 runtime/toolkit links.
[Receipts, exact short samples, failure/successor history and native/restore limits](maintenance/basalt-056-inkling-2026-11-23/README.md).
## Historical: Basalt 0.3.3 active · 13 November 2026, 13:20 UTC
Explicit activation Go and normal management login, ordinary authenticated drain
with fresh zero active/waiting counters. App image
@@ -0,0 +1,160 @@
# Basalt 0.5.6 and separate Inkling 2 Mini profile
## Authorization and scope
Michael authorized building the latest Basalt, replacing the running release,
one **short** prefill/decode API sample before and after, then downloading
Inkling and publishing it as an additional Deck endpoint profile plus a separate
Hermes evaluation profile. This includes the necessary app/runtime replacement
and temporary model switching, not interruption of existing/queued work, a broad
benchmark, or activation of unrelated TTS candidates. Keep the existing audio
owners and unrelated application changes. Begin with text-only Inkling and no
shell/file-writing tools in the separate Hermes evaluation profile.
## Frozen public sources
- Basalt `v0.5.6`, annotated tag peeled to
`1e205ae87cc8e3c04e96db40fd505a75f44685ec`.
- Existing Qwen pack, expert profile, two slots, 262144 context/slot and int8
settings unchanged. Preserve the existing RAM/disk conversation cache0/16384MiB.
- Inkling `jesdga/Inkling-2-Mini-Basalt`, revision
`6c9fbf0730a6d2e8813a1b262c2ab3548cf0239e`,
`Inkling-2-Mini-NVFP4-MX8.basalt`,19606374189bytes, SHA-256
`28ec70723feaa037942a02f55b9d5e898276f3e62a3b1fa083745f932a041b99`.
- [Pinned runtime guide](https://github.com/jesdga95/basalt/blob/v0.5.6/docs/models/inkling2.md)
and [publisher model card](https://huggingface.co/thinkingmachines/Inkling-2-Mini).
The intervening0.4.1/0.5.0/0.5.5/0.5.6 release notes retain pack/config version2.
The removed diagnostic `--exp concur5_digest=1` is not used by Deck. Driver
615.71.09 was actually observed, matching the upstream fixed-driver note.
No driver change is part of this task.
## Execution boundaries and current preparation
- Own clean checkout `workspace/Athena-Deck-inkling`, from current remote main;
pre-existing dirty source/runtime work in `Athena-Deck` is excluded.
- `build_host.py`: Athena-host Python, an owned CPU1/2560MiB/no-swap/no-GPU
container, unprivileged compiler, existing CUDA13.0 toolkit read-only,
no production state/model mounts. No service/model operation during build.
- `activation.py`: Athena-host only, separate prepare/apply gates. Overlay the
**actual current image**, not an old build image. Source allowlist is only
the recipe and Basalt runtime/worker. Require normal authenticated management
and strict fresh zero active/waiting counters before stopping.
- `short_compare.py`: NAS/Hermes-profile Python; resolve the existing managed
Athena API credential in memory, never persist/log it. One identical synthetic
input, temperature0, no thinking,256 output-token cap per invocation. Actual
timings/usage are evidence; configured context is not tested full context.
At preparation the running base was
`sha256:21414d939a91d0aa997129cf4b30e67b84d95f01f80ee7071a328e074dc8eb72`,
Basalt0.4.0, Qwen ready/two slots, normal audio workers resident. Direct regular
management at `http://192.168.1.212:8108` returned200; the public reverse proxy
returned openresty403. No proxy/network change was attempted.
## Native installation and restore contract
Use the pinned `deploy/install_basalt.py` with an explicitly configured native
state root, service UID, CUDA13.0/compiler and Python environment. The same
allowlisted app modules must ship on native Debian. Download the fixed public
Inkling file through the ordinary catalogue, checking exact size/SHA-256; its
model catalogue identity is SHA-256 of repo+revision+filename. No secret or
weights belong in Git. Restore profiles/endpoint/private API identity through
the existing encrypted configuration backup, not manual backing-JSON edits.
The Hermes evaluation profile is separate private NAS configuration, not a new
service or a native Athena dependency.
On today's host preserve the old runtime's CUDA link target: retained030/033
runtime toolkit assets are dependencies, not disposable rollback clutter. New
runtime symlink must resolve after promotion and within the service namespace.
Rollback pairs the previous actual app image and previous complete runtime;
normal drain/authentication and model restoration are mandatory. A new source
build is neither native fresh-Debian nor full encrypted-restore acceptance.
## Completed live acceptance
Final app image:
`sha256:803aadc28939e5d9598343105ea2c5d715dad5f6c7d27259ebc1e7c0fd494bf9`.
Basalt0.5.6 compiled text/vision hashes and actual fatbins passed; relocated help
and both isolated complete Server constructors passed. Final root regression:
**834 tests passed**, plus11 maintenance drain/reference guards. Upstream's1300
CPU-fixture tests passed (16skips), with the nonfatal router-thread reset/socket
warnings retained in `cpu-checks.json`. First CPU supervisor timed out360s;
corrected successor543.410s passed and both owned sandboxes were absent.
Exactly one short synthetic API sample each, identical payload hash,3227 fresh
input/256 output tokens, zero cached input, original Qwen/two slots/int8:
| Version | Prefill tok/s | Decode tok/s | API wall seconds |
|---|---:|---:|---:|
| 0.4.0 |2642.3|91.4|4.131|
| 0.5.6 |2596.8|72.0|58.568|
The after sample includes cold model restoration; engine decode was also slower
in this one observation. No claim of a speedup or a statistically demonstrated
regression, no additional comparison matrix. A later BEREIT request was solely
restoration after the requested Inkling acceptance, not another benchmark.
The first app launch encountered an obsolete `reference_models=true` installer
manifest after historic27B test models had already been removed. Both exact
references were absent and no surviving profile used them. The stale manifest
flag was retired (the flag changes only the installer prerequisite, not Docker
arguments); the source guard was **not** weakened. Subsequent native activation
preparation checks those references before downtime. The initial failed phase
is retained in the activation receipt; final live acceptance supersedes its
`model_restoration_pending` marker, not its history.
The additional Inkling presentation matcher initially still classified only the
Qwen pin. Its own RED→GREEN regression now checks the pinned Inkling candidate,
correct family and wrong-hash refusal. A one-file current-image overlay was
isolated-started and normally drained/activated; final sandbox hash and all
settings were unchanged by that overlay. Both restarts used normal management;
saved vault-assisted login succeeded without exposing credentials.
Inkling downloaded through the ordinary catalogue and independently rehashed:
19606374189bytes, exact pinned SHA-256. Deck profile
`1919906bd7e24d90a5dfe92db7fc9ba5`, revision2, API ID `inkling-2-mini`,
**65536 context/one slot**, text-only/fp8, additionally enabled at the existing
endpoint; Qwen and every previous endpoint profile remain enabled as before.
The first32768 proposal was raised because Hermes rejects models below64000.
Actual worker config, ready profile identity and one real Hermes CLI answer
proved Inkling execution on the5080 with CPU expert spill.
Separate private Hermes profile `inkling-test`: managed Athena route/key
resolution, `model.default=inkling-2-mini`, `model.context_length=65536`,
CLI/API toolsets empty, no MCPs, max_turns3, smart approvals, secret redaction,
role-specific SOUL, config/SOUL0600 owned99:100. Registered profile list and
actual CLI response verified:
> Arbeitsspeicher ist ein schneller, flüchtiger Zwischenspeicher, während eine SSD dauerhaft Daten speichert, aber langsamer als RAM ist.
Do not set `model.ollama_num_ctx` on this OpenAI-compatible Deck route: it adds
Ollama `options` that Deck correctly refuses. That failed pre-inference attempt
was removed; the supported matching `model.context_length` override works.
The new profile inherits a nonblocking dashboard-basic-auth configuration
warning; no new dashboard was started and no shared authentication changed.
Its CLI test used `--reasoning none --max-turns1 --run-budget90`; arbitrary
long user conversations and looping behavior remain unqualified.
Final normal readback: Qwen ready0.5.6/two slots262144 each, original GPU TTS
profile `5b67537ab825493786861b278ae26cbe` and ASR
`129d5ea93fd34f1a9e5dcca7bcef5761` loaded, not warming; healthy app,
OOM=false/RestartCount0, active/waiting counters0. Original profile JSON is
byte-identical after removing the single new Inkling row; endpoint JSON is
byte-identical after removing only its added enabled ID. Audio/CPU/reasoning
policy hashes remain identical. Existing protected voice artifacts untouched.
## Remaining boundaries
- Native Mac/Desktop profile selection and a conversation in that client were
not exercised; profile registry, effective CLI/API configuration and actual
Hermes CLI inference were exercised.
- No Inkling quality/throughput benchmark, images, full64K input, simultaneous
full-context requests, long-agent run or new audio inference acceptance.
- No fresh-Debian or full encrypted-restore acceptance. The Hermes profile is
private NAS state and needs inclusion in its normal encrypted backup policy;
no off-host backup was performed here.
- Independent reviewer delegation was not available in this tool set. The
actual source diff, targeted/root tests, upstream fixtures, binary checks and
isolated/live acceptance are the evidence, not an independent-review claim.
- Qwen is restored now. A later Inkling request triggers the normal FIFO model
switch; simultaneous Qwen+Inkling GPU residency is neither promised nor tested.
@@ -0,0 +1,32 @@
{
"phase": "activated_model_restoration_pending",
"container_before": "78e4494721fddd1fde2b971de7f17b0f7b5db1b3e90fde045328cf6a7af66436",
"image_before": "sha256:21414d939a91d0aa997129cf4b30e67b84d95f01f80ee7071a328e074dc8eb72",
"tag_before": "athena-deck-standalone:cache-17e7017",
"started_before": "2026-11-23T10:44:10.552750441Z",
"image_after": "sha256:fc3cfb07b2b04fd5334cac67263a79b2dca802022b5b94539b1baaaa7bff516d",
"settings": {
"profiles.json": "9fb1ec281887f59ccd07273db41542a148be2098f7ec29b4b27f04f8c6552e32",
"endpoint.json": "98181e6b1d254f8507aee15e4135ebeaa7c409d6cca2edd030ff25b9f51b1a61",
"audio-policy.json": "54aa6b69e3449cdd0f7049f34d818504455662ebe41da88ed4cd99953db12344",
"cpu-partition.json": "836a97564094f95850c6fa0fd3776e164e7aeff2bf4bb8a61d43ea4182cfaaec",
"reasoning-budget.json": "4884a379adf2f888415041b81ef55a01a2c22ef7a41ca1554460f410bec5cf0c"
},
"autostart": true,
"source_before": {
"basalt_sources.json": "047eaca3d7ee6da08f1414e3f783480ddfe7e3a61ebd466e05c11419dec87f3d",
"basalt_runtime.py": "e3078aa2a7aa2052a9ffcbcab056a4d134ed156e427ee2cef0679a91e935e701",
"basalt_worker.py": "20b1210d23c4ee1ae42870b20b2cce6c2ca353b760cee0ba0016d0e6a30a2bd6"
},
"source_after": {
"basalt_sources.json": "965540ed137c49a96cf2e5cf46d47d6c40d5ff45089e2a6f5141e26b43e7bd0e",
"basalt_runtime.py": "1f03a042df156b23c8a417127f2b47b1392c24fcfad3cb4aa74522d52735d30e",
"basalt_worker.py": "ff11637d0d81b6da3921dd316f42b25f6fb6ccebdd7aca49dec9b505274f4c43"
},
"prepared_at": 1795455235.4386098,
"model_weights_changed": false,
"drain_checked_at": 1795455283.468947,
"container_after": "2ce1468fadb349f7cc821d27947dde52d654855502cd3cd1b2718aa9a370b281",
"activated_at": 1795455329.127601,
"recovery": "Obsolete reference_models installer flag retired; both historic27B references absent and no retained profile uses them. No source guard weakened; generated Docker arguments unchanged by this flag."
}
@@ -0,0 +1,120 @@
#!/usr/bin/env python3
"""ATHENA HOST: explicitly authorized app/runtime promotion, normal drain first.
Public source-only stdin bundle for prepare; fresh authenticated drain for apply.
Never executed merely by importing. Rollback artifacts stay in the same state root.
"""
import argparse
import hashlib
import importlib.util
import json
import os
from pathlib import Path
import shutil
import subprocess
import sys
import time
ROOT=Path('/opt/athena-deck-dev/basalt-056-activation-20261123')
CANDIDATE=Path('/opt/athena-deck-dev/basalt-056-candidate-1e205ae87cc8/runtime')
BASE=Path('/opt/athena-deck-dev/runtime');STATE=BASE/'state';SOURCE=Path('/opt/athena-deck-dev/source')
NEXT=STATE/'basalt-runtime.next-056-20261123';PREVIOUS=STATE/'basalt-runtime.previous-040-20261123'
IMAGE='athena-deck-standalone:basalt-056-20261123'
CODE='1e205ae87cc8e3c04e96db40fd505a75f44685ec'
FILES=('basalt_sources.json','basalt_runtime.py','basalt_worker.py')
SETTINGS=('profiles.json','endpoint.json','audio-policy.json','cpu-partition.json','reasoning-budget.json')
BLOCKED={'vpn','vpn.auth','OpenVPN-KIT','GluetunVPN'}
def run(*args,**kw):return subprocess.run(list(map(str,args)),check=True,**kw)
def info():return json.loads(subprocess.check_output(['docker','inspect','athena-deck-dev']))[0]
def sha(p):
with Path(p).open('rb') as f:return hashlib.file_digest(f,'sha256').hexdigest()
def save(value):
p=ROOT/'activation.json';t=p.with_suffix('.tmp');t.write_text(json.dumps(value,indent=2)+'\n');t.chmod(0o600);t.replace(p)
def load():return json.loads((ROOT/'activation.json').read_text())
def sandbox(d):
config=dict(d['Config']);config.pop('Image',None);config.pop('Hostname',None)
env=config.get('Env') or [];assert len({v.split('=',1)[0] for v in env})==len(env);config['Env']=sorted(env)
return dict(config=config,host=d['HostConfig'])
def ignore(parent,names):return [n for n in names if n in BLOCKED or n.endswith('.ovpn') or n.startswith('.env')]
def owner_tree(path):
for parent,dirs,files in os.walk(path,followlinks=False):
dirs[:]=[n for n in dirs if n not in BLOCKED];os.chown(parent,65534,65534)
for n in dirs+files:
if n not in BLOCKED and not n.endswith('.ovpn'):os.chown(Path(parent)/n,65534,65534,follow_symlinks=False)
def reference_preflight(base,config):
if config.get('reference_models'):
for name in ('Qwen3.8-27B-IQ4-MIX.gguf','Qwen3.8-27B-IQ4_XS-pure.gguf'):
path=base/'state/reference-models'/name
if not path.is_file() or not path.resolve().is_relative_to((base/'state/models').resolve()):
raise RuntimeError('Historisches Referenzmodell fehlt: vor der Wartung Installationsmanifest mit tatsächlich behaltenen Profilen abgleichen; keine Referenzprüfung umgehen.')
def prepare():
bundle=json.load(sys.stdin);assert set(bundle['files'])==set(FILES)
spec=importlib.util.spec_from_file_location('preflight_install',SOURCE/'deploy/install.py');assert spec and spec.loader
installer=importlib.util.module_from_spec(spec);spec.loader.exec_module(installer)
reference_preflight(BASE,installer.load_manifest(BASE))
assert not ROOT.exists() and not NEXT.exists() and not PREVIOUS.exists()
current=info();assert current['State']['Running'] and current['Config']['User']=='65534:65534'
tag=current['Config']['Image'];assert subprocess.check_output(['docker','image','inspect','--format','{{.Id}}',tag],text=True).strip()==current['Image']
marker=json.loads((CANDIDATE/'ready.json').read_text());assert marker['commit']==CODE and marker['version']=='0.5.6'
assert sha(CANDIDATE/'source/bin/basalt')==marker['binary_sha256'] and sha(CANDIDATE/'source/bin/basalt-vision')==marker['vision_binary_sha256']
assert json.loads((STATE/'basalt-runtime/ready.json').read_text())['version']=='0.4.0'
assert shutil.disk_usage(STATE).free>2*1024**3
ROOT.mkdir(mode=0o700);(ROOT/'image/app').mkdir(parents=True);(ROOT/'source-before').mkdir();(ROOT/'tmp').mkdir(mode=0o700);os.chown(ROOT/'tmp',65534,65534)
for n,text in bundle['files'].items():
p=ROOT/'image/app'/n;p.parent.mkdir(parents=True,exist_ok=True);p.write_text(text);p.chmod(0o644)
old=SOURCE/n
if old.is_file():
target=ROOT/'source-before'/n;target.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(old,target)
(ROOT/'image/Dockerfile').write_text('FROM '+tag+'\nUSER root\nCOPY app/ /app/\nUSER 65534:65534\n')
(ROOT/'image/.dockerignore').write_text('*\n!Dockerfile\n!app/\n!app/**\n')
with (ROOT/'image-build.log').open('w') as log:run('docker','build','--network','none','--pull=false','-t',IMAGE,ROOT/'image',stdout=log,stderr=subprocess.STDOUT,timeout=180)
probe="from pathlib import Path\nimport tempfile\nfrom server import Server\nwith tempfile.TemporaryDirectory() as tmp:\n s=Server(0,state_dir=Path(tmp));s.endpoint.close();s.video.close();s.dashboard.close();s.server_close()\nprint('Full isolated Server constructor passed')"
run('docker','run','--rm','--runtime','runc','--network','none','--read-only','--user','65534:65534','--memory','512m','--pids-limit','256','--cap-drop','ALL','-e','NVIDIA_VISIBLE_DEVICES=void','-e','DECK_REQUIRE_SETUP=0','-e','DECK_NETWORK_MODE=disabled','-e','TMPDIR=/test-tmp','--mount','type=bind,src='+str(ROOT/'tmp')+',dst=/test-tmp','--entrypoint','python3',IMAGE,'-B','-c',probe,timeout=45)
NEXT.mkdir(mode=0o700)
for name in ('venv','source','profiles'):shutil.copytree(CANDIDATE/name,NEXT/name,symlinks=True,ignore=ignore)
for name in ('ready.json','python-lock.txt'):shutil.copy2(CANDIDATE/name,NEXT/name)
for name in ('home','tmp','cache'):(NEXT/name).mkdir(mode=0o700)
(NEXT/'cuda').symlink_to('../'+PREVIOUS.name+'/cuda',target_is_directory=True);owner_tree(NEXT)
assert sha(NEXT/'source/bin/basalt')==marker['binary_sha256'] and sha(NEXT/'source/bin/basalt-vision')==marker['vision_binary_sha256']
assert info()['Id']==current['Id'] and info()['State']['StartedAt']==current['State']['StartedAt']
save(dict(phase='prepared',container_before=current['Id'],image_before=current['Image'],tag_before=tag,started_before=current['State']['StartedAt'],image_after=subprocess.check_output(['docker','image','inspect','--format','{{.Id}}',IMAGE],text=True).strip(),settings={n:sha(STATE/n) for n in SETTINGS},autostart=json.loads((STATE/'endpoint.json').read_text())['autostart'],source_before={n:sha(SOURCE/n) if (SOURCE/n).is_file() else None for n in FILES},source_after={n:sha(ROOT/'image/app'/n) for n in FILES},prepared_at=time.time(),model_weights_changed=False))
print(json.dumps({'phase':'prepared','production_unchanged':True,'image':IMAGE,'runtime_staged':str(NEXT)}),flush=True)
def apply():
drain=json.load(sys.stdin);assert drain['authenticated_status']==200 and drain['origin']=='http://192.168.1.212:8108'
assert 0<=time.time()-drain['checked_at']<60 and drain['state']=='stopped'
assert type(drain['active_requests']) is int and drain['active_requests']==0
assert all(type(drain['scheduler'][k]) is int and drain['scheduler'][k]==0 for k in ('active_requests','waiting_requests','tts_waiting_requests','stt_waiting_requests'))
assert drain['scheduler']['switching'] is False
a=load();assert a['phase']=='prepared';current=info();assert current['Id']==a['container_before'] and current['Image']==a['image_before'];original=sandbox(current)
assert all(sha(STATE/n)==a['settings'][n] for n in SETTINGS if n!='endpoint.json')
assert all((sha(SOURCE/n) if (SOURCE/n).is_file() else None)==a['source_before'][n] for n in FILES)
assert all(sha(ROOT/'image/app'/n)==a['source_after'][n] for n in FILES)
assert not PREVIOUS.exists() and NEXT.is_dir() and not (STATE/'basalt-runtime').is_symlink()
save(dict(a,phase='applying',drain_checked_at=drain['checked_at']))
run('docker','stop','--timeout','45','athena-deck-dev',stdout=subprocess.DEVNULL)
(STATE/'basalt-runtime').replace(PREVIOUS);NEXT.replace(STATE/'basalt-runtime')
assert (STATE/'basalt-runtime/cuda/bin/nvcc').is_file()
for n in FILES:shutil.copy2(ROOT/'image/app'/n,SOURCE/n)
endpoint=STATE/'endpoint.json';data=json.loads(endpoint.read_text());data['autostart']=a['autostart'];tmp=endpoint.with_suffix('.activation-tmp');tmp.write_text(json.dumps(data));tmp.chmod(0o600);os.chown(tmp,65534,65534);tmp.replace(endpoint)
assert sha(endpoint)==a['settings']['endpoint.json'],'Autostart restoration must be byte-exact'
spec=importlib.util.spec_from_file_location('deck_install',SOURCE/'deploy/install.py');assert spec and spec.loader;installer=importlib.util.module_from_spec(spec);spec.loader.exec_module(installer)
config=installer.load_manifest(BASE);assert config['image']==a['tag_before'];config.update(image=IMAGE,previous_image=a['tag_before'])
run('docker','rm','athena-deck-dev',stdout=subprocess.DEVNULL);installer.launch(config);installer.ready(config);installer.write_manifest(BASE,config)
deadline=time.monotonic()+100
while info()['State'].get('Health',{}).get('Status')=='starting' and time.monotonic()<deadline:time.sleep(1)
live=info();assert live['State']['Health']['Status']=='healthy' and live['Image']==a['image_after']
assert sandbox(live)==original,'Container sandbox differs; no automatic second restart'
assert all(sha(SOURCE/n)==a['source_after'][n] for n in FILES) and all(sha(STATE/n)==a['settings'][n] for n in SETTINGS)
save(dict(a,phase='activated_model_restoration_pending',activated_at=time.time(),container_after=live['Id'],settings_unchanged=True,model_weights_changed=False))
print(json.dumps({'phase':'activated_model_restoration_pending','healthy':True,'version':'0.5.6','settings_unchanged':True,'image':live['Image']}),flush=True)
if __name__=='__main__':
p=argparse.ArgumentParser();p.add_argument('phase',choices=('prepare','apply'));p.add_argument('--go',action='store_true');args=p.parse_args();assert args.go,'Explicit activation Go required';globals()[args.phase]()
@@ -0,0 +1,37 @@
{
"phase": "after",
"version": "0.5.6",
"payload_sha256": "9808beeb493fffacd8c4b4fd01111b84d499fbc60de39a6092cc7fdd95006589",
"started_at": 1795455338.2862728,
"requests": 1,
"scope": "single_short_prefill_decode_not_a_benchmark_suite",
"success": true,
"elapsed_s": 58.56831966701429,
"usage": {
"prompt_tokens": 3227,
"completion_tokens": 256,
"total_tokens": 3483,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3227,
"prompt_ms": 1242.7,
"prompt_per_token_ms": 0.385,
"prompt_per_second": 2596.8,
"predicted_n": 256,
"predicted_ms": 3555.1,
"predicted_per_token_ms": 13.887,
"predicted_per_second": 72.0,
"draft_n": 188,
"draft_n_accepted": 114
},
"finish_reason": "length",
"answer": "Die Vorstellung, dass ein Backup allein durch seine Existenz oder die bloße Bestätigung des Schreibvorgangs verlässlich ist, stellt eine der gefährlichsten Illusionen in der IT-Sicherheit und Datenverwaltung dar. Ein Backup ist erst dann als verlässlich zu betrachten, wenn es erfolgreich auf einem leeren Zielsystem wiederhergestellt wurde, da dieser Prozess die eigentliche Validierung der Datenintegrität, der Systemrechte und der komplexen Abhängigkeiten darstellt. Der Grund für diese strenge Anforderung liegt darin, dass das Erstellen eines Backups und das Wiederherstellen desselben zwei fundamental unterschiedliche technische Vorgänge sind, die unterschiedliche Fehlerquellen und Komplexitätsgrade aufweisen. Während das Backup-Verfahren oft darauf ausgelegt ist, Daten schnell und effizient zu kopieren, muss die Wiederherstellung sicherstellen, dass diese Daten in einer funktionierenden, konsistenten und nutzbaren Umgebung existieren.\n\nEin zentraler Aspekt dieser Verlässlichkeit ist die Kontrolle der Dateiintegrität. Ein Backup kann physisch vorhanden sein, aber die darin enthaltenen Daten können durch Bit-Rot, Speicherfehler, fehlerhafte Übertragungsprotokolle oder logische Fehler im Backup-System selbst",
"loaded_version": "0.5.6",
"slots": 2,
"context_per_slot": 262144,
"finished_at": 1795455396.9165685
}
@@ -0,0 +1,25 @@
{
"success": true,
"commit": "1e205ae87cc8e3c04e96db40fd505a75f44685ec",
"version": "0.5.6",
"artifacts": {
"basalt": {
"sha256": "b5cb4773899ac1a4ffae155609628b0e0b51a769cacb81c1f9b8a4a351bda70e",
"bytes": 170970736,
"actual_elf_architectures": [
120
]
},
"basalt-vision": {
"sha256": "583e10a0b082253a1fb8b3cfa024108e5dc1c2a69d0196b42d3dae716772085c",
"bytes": 1397512,
"actual_elf_architectures": [
86,
120
]
}
},
"cuobjdump_sha256": "bce9e37cc2b344a62f1c43b678f8aab0780b2a5807f69fdd699d7bd440d5c8c6",
"real_model_inference": false,
"gpu_access": false
}
@@ -0,0 +1,37 @@
{
"phase": "before",
"version": "0.4.0",
"payload_sha256": "9808beeb493fffacd8c4b4fd01111b84d499fbc60de39a6092cc7fdd95006589",
"started_at": 1795455252.4631355,
"requests": 1,
"scope": "single_short_prefill_decode_not_a_benchmark_suite",
"success": true,
"elapsed_s": 4.130839810997713,
"usage": {
"prompt_tokens": 3227,
"completion_tokens": 256,
"total_tokens": 3483,
"prompt_tokens_details": {
"cached_tokens": 0
}
},
"timings": {
"cache_n": 0,
"prompt_n": 3227,
"prompt_ms": 1221.3,
"prompt_per_token_ms": 0.378,
"prompt_per_second": 2642.3,
"predicted_n": 256,
"predicted_ms": 2801.1,
"predicted_per_token_ms": 10.942,
"predicted_per_second": 91.4,
"draft_n": 159,
"draft_n_accepted": 110
},
"finish_reason": "length",
"answer": "Die Vorstellung, dass ein Backup allein durch seine Existenz oder die bloße Bestätigung des Schreibvorgangs verlässlich ist, stellt eine der gefährlichsten Illusionen in der IT-Sicherheit und Datenverwaltung dar. Ein Backup ist erst dann als verlässlich einzustufen, wenn es nachweislich in der Lage ist, den ursprünglichen Zustand eines Systems exakt wiederherzustellen. Dieser Grundsatz beruht auf der Erkenntnis, dass die Erstellung einer Kopie und die funktionale Wiederherstellung zwei völlig unterschiedliche technische Prozesse sind, die unterschiedliche Fehlerquellen und Abhängigkeiten aufweisen. Die bloße Existenz einer Datei auf einem Speichermedium garantiert nicht, dass diese Datei lesbar, vollständig oder in einem Zustand ist, der eine funktionale Rückkehr zum Normalbetrieb ermöglicht. Daher ist der eigentliche Beweis für die Integrität eines Backups nicht das Sichern, sondern das Wiederherstellen.\n\nUm diese These fundiert zu untermauern, muss man die komplexen Schichten betrachten, die bei einer Wiederherstellung auf einem leeren Zielsystem kontrolliert werden müssen. Ein leeres Zielsystem ist der ideale Testfall, da es keine Altlasten, keine versteckten Konfigurationsreste und keine bereits vorhandenen",
"loaded_version": "0.4.0",
"slots": 2,
"context_per_slot": 262144,
"finished_at": 1795455256.6534073
}
@@ -0,0 +1,67 @@
{
"owner": "athena-deck",
"commit": "1e205ae87cc8e3c04e96db40fd505a75f44685ec",
"image": "sha256:21414d939a91d0aa997129cf4b30e67b84d95f01f80ee7071a328e074dc8eb72",
"phase": "built_no_model_test",
"started_at": 1795452869.0182848,
"cpu_quota": 1,
"memory_mib": 2560,
"swap_allowed": false,
"nice": 15,
"gpu_access": false,
"production_state_mount": false,
"borrowed_cuda_read_only": "/opt/athena-deck-dev/runtime/state/basalt-runtime/cuda",
"source_hashes": {
"basalt_sources.json": "63cc8d07d4db638553c509c8e01f79c9d02ed39ebb00874777435f3054b19ec0",
"basalt_tuning.py": "f2585dab9581ce8c8b3712c4ee9f9a98d5b58d41ce11f9f8ab5b17f429e0dfdf",
"deploy/install_basalt.py": "7e81efe44224707c5b3b5417382381113b263bf6532060f8c80b4e1eed4748e5"
},
"container_id": "a3f1fa3a5132ed764ea63471f1986d574c2dc76616e0f7cb1baa9590e28c62ac",
"client_exit": 0,
"container_exit": 0,
"oom_killed": false,
"ready": {
"commit": "1e205ae87cc8e3c04e96db40fd505a75f44685ec",
"version": "0.5.6",
"cuda": "13.0",
"architectures": [
120
],
"vision_architectures": [
86,
120
],
"python": "3.12.3",
"binary_sha256": "b5cb4773899ac1a4ffae155609628b0e0b51a769cacb81c1f9b8a4a351bda70e",
"vision_binary_sha256": "583e10a0b082253a1fb8b3cfa024108e5dc1c2a69d0196b42d3dae716772085c",
"pdf_version": "7.0.1",
"video": {
"available": true,
"ffmpeg_major": 6,
"libraries": {
"avcodec": "libavcodec.so.60",
"avformat": "libavformat.so.60",
"avutil": "libavutil.so.58",
"swscale": "libswscale.so.7"
},
"abi_only": true
},
"origin": "native-build",
"inference_performed": false
},
"owned_container_final_state": {
"Status": "exited",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 0,
"Error": "",
"StartedAt": "2026-11-23T16:54:29.184242624Z",
"FinishedAt": "2026-11-23T17:33:26.712712355Z"
},
"owned_container_removed": true,
"finished_at": 1795455209.3112464
}
@@ -0,0 +1,81 @@
#!/usr/bin/env python3
"""Athena host only: owned, resource-limited Basalt 0.5.6 build, no GPU access.
Source-only JSON stdin; --go is required. Never mount production model/state data.
The existing CUDA toolkit is borrowed read-only. No service or model operations.
"""
import argparse
import hashlib
import json
import os
from pathlib import Path
import shutil
import subprocess
import sys
import time
ROOT=Path('/opt/athena-deck-dev/basalt-056-candidate-1e205ae87cc8')
NAME='athena-basalt056-build-20261123'
LABEL='basalt056-20261123'
COMMIT='1e205ae87cc8e3c04e96db40fd505a75f44685ec'
CUDA=Path('/opt/athena-deck-dev/runtime/state/basalt-runtime/cuda')
FILES=('basalt_sources.json','basalt_tuning.py','deploy/install_basalt.py')
def main():
parser=argparse.ArgumentParser();parser.add_argument('--go',action='store_true');args=parser.parse_args()
assert args.go,'Explicit build authorization required'
bundle=json.load(sys.stdin);assert set(bundle['files'])==set(FILES)
recipe=json.loads(bundle['files']['basalt_sources.json'])
assert recipe['code']==COMMIT and recipe['version']=='0.5.6'
assert not ROOT.exists() and not ROOT.is_symlink() and CUDA.is_dir()
mem=dict(x.split(':',1) for x in Path('/proc/meminfo').read_text().splitlines())
assert int(mem['MemAvailable'].split()[0])>=3500*1024,'Insufficient live headroom; do not unload Qwen'
assert shutil.disk_usage(ROOT.parent).free>=12*1024**3
live=json.loads(subprocess.check_output(['docker','inspect','athena-deck-dev']))[0]
before=bundle['before']
assert live['Image']==before['image'] and live['Id']==before['container_id'] and live['State']['StartedAt']==before['started']
ROOT.mkdir(mode=0o700);os.chown(ROOT,65534,65534)
for folder in ('recipe','recipe/deploy','runtime','tmp'):
p=ROOT/folder;p.mkdir(mode=0o700);os.chown(p,65534,65534)
for name,text in bundle['files'].items():
p=ROOT/'recipe'/name;p.write_text(text);p.chmod(0o600);os.chown(p,65534,65534)
marker=dict(owner='athena-deck',commit=COMMIT,image=before['image'],phase='prepared',started_at=time.time(),cpu_quota=1,memory_mib=2560,swap_allowed=False,nice=15,gpu_access=False,production_state_mount=False,borrowed_cuda_read_only=str(CUDA),source_hashes={n:hashlib.sha256(t.encode()).hexdigest() for n,t in bundle['files'].items()})
def save():
p=ROOT/'build-status.json';pending=p.with_suffix('.tmp');pending.write_text(json.dumps(marker,indent=2)+'\n');pending.replace(p)
cid=None;save()
try:
command=['docker','create','--pull=never','--name',NAME,'--label','athena-deck.build='+LABEL,'--runtime=runc','--network=bridge','--read-only','--user=65534:65534','--cpus=1','--memory=2560m','--memory-swap=2560m','--pids-limit=1024','--cap-drop=ALL','--security-opt=no-new-privileges',
'--mount',f'type=bind,src={ROOT}/recipe,dst=/recipe,readonly','--mount',f'type=bind,src={ROOT}/runtime,dst=/var/lib/deck/basalt-runtime','--mount',f'type=bind,src={ROOT}/tmp,dst=/tmp','--mount',f'type=bind,src={CUDA},dst=/toolchain,readonly',
'-e','HOME=/var/lib/deck/basalt-runtime/home','-e','TMPDIR=/tmp','-e','NVIDIA_VISIBLE_DEVICES=void','-e','CUDA_VISIBLE_DEVICES=','-e','OPENBLAS_NUM_THREADS=1','-e','OMP_NUM_THREADS=1','-e','PYTHONDONTWRITEBYTECODE=1','--entrypoint','nice',before['image'],'-n','15','python3','/recipe/deploy/install_basalt.py','--destination','/var/lib/deck/basalt-runtime','--nvcc','/toolchain/bin/nvcc']
cid=subprocess.check_output(command,text=True).strip();marker.update(container_id=cid,phase='building');save();print(json.dumps(marker),flush=True)
with (ROOT/'build.log').open('w') as log:
client=subprocess.Popen(['docker','start','--attach',cid],stdout=log,stderr=subprocess.STDOUT)
while client.poll() is None:
time.sleep(10)
available=int(next(l.split()[1] for l in Path('/proc/meminfo').read_text().splitlines() if l.startswith('MemAvailable:')))
if available<768*1024:
owned=json.loads(subprocess.check_output(['docker','inspect',cid]))[0]
assert owned['Config']['Labels'].get('athena-deck.build')==LABEL
subprocess.run(['docker','stop','--timeout','20',cid],check=True,stdout=subprocess.DEVNULL)
client.wait(timeout=30);raise RuntimeError('Owned builder stopped to protect production RAM headroom')
info=json.loads(subprocess.check_output(['docker','inspect',cid]))[0]
marker.update(client_exit=client.returncode,container_exit=info['State']['ExitCode'],oom_killed=info['State']['OOMKilled'])
assert client.returncode==0 and info['State']['ExitCode']==0,'Build failed; preserved build.log and status'
ready=json.loads((ROOT/'runtime/ready.json').read_text())
assert ready['commit']==COMMIT and ready['version']=='0.5.6' and ready['inference_performed'] is False
assert ready['video']['available'] is True and ready['pdf_version']=='7.0.1'
marker.update(phase='built_no_model_test',ready=ready)
except BaseException as exc:
marker.update(phase='failed',error=type(exc).__name__+': '+str(exc));raise
finally:
if cid:
info=json.loads(subprocess.check_output(['docker','inspect',cid]))[0]
assert info['Config']['Labels'].get('athena-deck.build')==LABEL
if info['State']['Running']:subprocess.run(['docker','stop','--timeout','20',cid],check=True,stdout=subprocess.DEVNULL)
marker['owned_container_final_state']=json.loads(subprocess.check_output(['docker','inspect',cid]))[0]['State']
subprocess.run(['docker','rm',cid],check=True,stdout=subprocess.DEVNULL);marker['owned_container_removed']=True
marker['finished_at']=time.time();save();print(json.dumps(marker),flush=True)
if __name__=='__main__':main()
@@ -0,0 +1,43 @@
#!/usr/bin/env python3
"""ATHENA HOST: verify candidate bytes/fatbins and loader/help, never inference."""
import hashlib
import json
import os
from pathlib import Path
import re
import subprocess
ROOT=Path('/opt/athena-deck-dev/basalt-056-candidate-1e205ae87cc8')
COMMIT='1e205ae87cc8e3c04e96db40fd505a75f44685ec'
def main():
build=json.loads((ROOT/'build-status.json').read_text());assert build['phase']=='built_no_model_test' and build['owned_container_removed'] is True
runtime=ROOT/'runtime';ready=json.loads((runtime/'ready.json').read_text());assert ready['commit']==COMMIT and ready['version']=='0.5.6'
source=runtime/'source';sha=lambda p:hashlib.file_digest(Path(p).open('rb'),'sha256').hexdigest()
actual=subprocess.check_output(['git','-c','safe.directory='+str(source),'-C',str(source),'rev-parse','HEAD'],text=True).strip();assert actual==COMMIT
assert not subprocess.check_output(['git','-c','safe.directory='+str(source),'-C',str(source),'status','--porcelain','--untracked-files=no'],text=True).strip()
obj=ROOT/'inspection-tools/cuobjdump'
if not obj.exists():
import io,tarfile,urllib.request
url='https://developer.download.nvidia.com/compute/cuda/redist/cuda_cuobjdump/linux-x86_64/cuda_cuobjdump-linux-x86_64-13.0.39-archive.tar.xz'
with urllib.request.urlopen(url,timeout=30) as response:archive=response.read(244841)
assert len(archive)==244840 and hashlib.sha256(archive).hexdigest()=='2385804b0a628b98b3ed96a19c803143d5c2e2fcc5139f633450862cf7755d65'
with tarfile.open(fileobj=io.BytesIO(archive),mode='r:xz') as tar:
member=tar.getmember('cuda_cuobjdump-linux-x86_64-13.0.39-archive/bin/cuobjdump');assert member.isfile()
stream=tar.extractfile(member);assert stream is not None
with stream:binary=stream.read()
obj.parent.mkdir(mode=0o700);obj.write_bytes(binary);obj.chmod(0o700)
assert obj.is_file()
artifacts={}
for name,key,expected in [('basalt','binary_sha256',[120]),('basalt-vision','vision_binary_sha256',[86,120])]:
binary=source/'bin'/name;digest=sha(binary);assert digest==ready[key]
out=subprocess.check_output([obj,'--list-elf',binary],text=True)
arches=sorted({int(x) for x in re.findall(r'\.sm_(\d+)',out)});assert arches==expected,(name,arches)
artifacts[name]=dict(sha256=digest,bytes=binary.stat().st_size,actual_elf_architectures=arches)
cuda=Path(build['borrowed_cuda_read_only']);env=dict(os.environ,LD_LIBRARY_PATH=str(cuda/'lib64')+':'+str(cuda/'lib'),CUDA_VISIBLE_DEVICES='')
help_command=['docker','run','--rm','--pull=never','--runtime','runc','--network','none','--read-only','--user','65534:65534','--cap-drop','ALL','-e','NVIDIA_VISIBLE_DEVICES=void','-e','CUDA_VISIBLE_DEVICES=','-e','LD_LIBRARY_PATH=/toolchain/lib64:/toolchain/lib','--mount',f'type=bind,src={runtime},dst=/candidate,readonly','--mount',f'type=bind,src={cuda},dst=/toolchain,readonly','--entrypoint','/candidate/source/bin/basalt',build['image'],'--help']
help_=subprocess.run(help_command,capture_output=True,text=True,timeout=30,check=True);assert 'basalt serve' in help_.stdout+help_.stderr
value=dict(success=True,commit=actual,version='0.5.6',artifacts=artifacts,cuobjdump_sha256=sha(obj),real_model_inference=False,gpu_access=False)
(ROOT/'artifact-check-result.json').write_text(json.dumps(value,indent=2)+'\n');print(json.dumps(value))
if __name__=='__main__':main()
@@ -0,0 +1,33 @@
#!/usr/bin/env python3
"""ATHENA HOST: CPU-only interop and upstream fixtures, no model/GPU access."""
import json
import os
from pathlib import Path
import subprocess
import sys
ROOT=Path('/opt/athena-deck-dev/basalt-056-candidate-1e205ae87cc8')
def main():
bundle=json.load(sys.stdin);assert set(bundle)=={'files','image'}
check=ROOT/'cpu-check-2';assert not check.exists();check.mkdir(mode=0o700);os.chown(check,65534,65534)
for name,text in bundle['files'].items():
assert name in ('basalt_serve.py','basalt_telemetry.py','check_telemetry_mock.py')
p=check/name;p.write_text(text);p.chmod(0o600);os.chown(p,65534,65534)
runtime='/var/lib/deck/basalt-runtime';python=runtime+'/venv/bin/python';source=runtime+'/source'
cmd=['docker','run','--rm','--name','athena-basalt056-cpu-check-2','--label','athena-deck.check=basalt056','--pull=never','--runtime','runc','--network','none','--read-only','--user','65534:65534','--cpus','1','--memory','768m','--memory-swap','768m','--pids-limit','256','--cap-drop','ALL','--security-opt','no-new-privileges','--mount',f'type=bind,src={ROOT}/runtime,dst={runtime},readonly','--mount',f'type=bind,src={check},dst=/check','-e','NVIDIA_VISIBLE_DEVICES=void','-e','CUDA_VISIBLE_DEVICES=','-e','PYTHONDONTWRITEBYTECODE=1','-e','PYTHONPATH=/check:/app','-e','TMPDIR=/check','--workdir',source,'--entrypoint',python,bundle['image']]
script="import subprocess,sys; subprocess.run([sys.executable,'/check/check_telemetry_mock.py','--python',sys.executable,'--source',"+repr(source)+",'--launcher','/check/basalt_serve.py'],check=True); subprocess.run([sys.executable,'-m','unittest','discover','-s','serve/tests','-p','test_*.py','-t','.'],check=True)"
try:
with (check/'stdout.log').open('w') as out,(check/'stderr.log').open('w') as err:
p=subprocess.run(cmd+['-B','-u','-c',script],stdout=out,stderr=err,text=True,timeout=1200)
except subprocess.TimeoutExpired:
leftover=subprocess.run(['docker','inspect','athena-basalt056-cpu-check-2'],capture_output=True,text=True)
if leftover.returncode==0:
owned=json.loads(leftover.stdout)[0];assert owned['Config']['Labels'].get('athena-deck.check')=='basalt056'
if owned['State']['Running']:subprocess.run(['docker','stop','--timeout','15','athena-basalt056-cpu-check-2'],check=True,capture_output=True)
raise
stdout=(check/'stdout.log').read_text();stderr=(check/'stderr.log').read_text()
result=dict(scope='candidate_python_real_upstream_cpu_fixtures',exit_code=p.returncode,real_model_inference=False,gpu_access=False,success=p.returncode==0)
(ROOT/'cpu-check-result.json').write_text(json.dumps(result,indent=2)+'\n');print(json.dumps(result));print(stdout[-2000:]);print(stderr[-2500:]);return p.returncode
if __name__=='__main__':raise SystemExit(main())
@@ -0,0 +1,21 @@
{
"scope": "candidate_python_real_upstream_cpu_fixtures",
"exit_code": 0,
"success": true,
"tests": 1300,
"skipped": 16,
"seconds": 543.410,
"real_model_inference": false,
"gpu_access": false,
"sandbox_removed": true,
"prior_attempt": "Supervisor timeout360s; exact owned sandbox absence verified. Corrected successor used1200s budget and realtime log files.",
"nonfatal_fixture_warnings": ["ConnectionResetError in router traffic thread", "ResourceWarning for unclosed socket"],
"telemetry": {
"real_upstream_mock": true,
"auth_401": true,
"existing_chat_route": true,
"numeric_counters": true,
"content_free": true,
"slots": 1
}
}
@@ -0,0 +1,58 @@
{
"success": true,
"final_image": "sha256:803aadc28939e5d9598343105ea2c5d715dad5f6c7d27259ebc1e7c0fd494bf9",
"basalt_version": "0.5.6",
"original_qwen_restored": true,
"restore_only_answer": "BEREIT",
"qwen_slots": 2,
"qwen_context_per_slot": 262144,
"root_tests": {"tests":834,"success":true,"seconds":113.482},
"maintenance_guard_tests": {"tests":11,"success":true},
"inkling": {
"profile_id": "1919906bd7e24d90a5dfe92db7fc9ba5",
"revision": 2,
"api_id": "inkling-2-mini",
"enabled_at_endpoint": true,
"runnable": true,
"context_per_slot": 65536,
"slots": 1,
"vision": false,
"kv": "fp8",
"actual_ready_worker_observed": true,
"file_bytes": 19606374189,
"independently_rehashed_sha256": "28ec70723feaa037942a02f55b9d5e898276f3e62a3b1fa083745f932a041b99"
},
"hermes": {
"profile": "inkling-test",
"registered": true,
"managed_credential_resolution": true,
"provider": "Athena",
"model": "inkling-2-mini",
"context_length": 65536,
"cli_toolsets": [],
"api_toolsets": [],
"mcp_count": 0,
"max_turns": 3,
"smart_approvals": true,
"secret_redaction": true,
"config_mode": "0600",
"soul_mode": "0600",
"owner": "99:100",
"real_cli_answer": "Arbeitsspeicher ist ein schneller, flüchtiger Zwischenspeicher, während eine SSD dauerhaft Daten speichert, aber langsamer als RAM ist.",
"test_flags": "--oneshot -Q --reasoning none --max-turns 1 --run-budget 90",
"native_mac_client_tested": false
},
"protected_state": {
"original_profile_rows_unchanged": true,
"original_endpoint_settings_unchanged_except_additional_enabled_id": true,
"audio_cpu_reasoning_policy_hashes_unchanged": true,
"tts_profile_id": "5b67537ab825493786861b278ae26cbe",
"tts_loaded": true,
"stt_profile_id": "129d5ea93fd34f1a9e5dcca7bcef5761",
"stt_loaded": true,
"healthy": true,
"oom_killed": false,
"restart_count": 0
},
"not_tested": ["Inkling quality or speed benchmark", "full-context input", "images", "new audio inference", "fresh Debian full restore", "Mac native profile switch"]
}
@@ -0,0 +1,38 @@
#!/usr/bin/env python3
"""NAS profile: exactly one authorized short API sample per invocation."""
import argparse
import hashlib
import importlib.util
import json
from pathlib import Path
import time
import urllib.request
BASE='http://192.168.1.212:8120'
def main():
p=argparse.ArgumentParser();p.add_argument('--go',action='store_true');p.add_argument('--phase',required=True);p.add_argument('--expected-version',required=True);p.add_argument('--output',type=Path,required=True);a=p.parse_args()
if not a.go:p.error('Explicit short-test Go required')
if a.output.exists():p.error('Use a new output path; do not overwrite evidence')
transport=Path('/opt/data/profiles/athena-deck/workspace/Athena-Deck/docs/maintenance/basalt-candidate-2026-11-01/paired_transport.py')
spec=importlib.util.spec_from_file_location('athena_transport',transport);assert spec and spec.loader
m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m);credential=m.key()
def req(path,body=None):
q=urllib.request.Request(BASE+path,data=json.dumps(body).encode() if body is not None else None,headers={'Authorization':'Bearer '+credential,'Content-Type':'application/json'})
with urllib.request.urlopen(q,timeout=90) as r:return json.load(r)
props=req('/props?model=flash-next-basalt');assert props['basalt']['version']==a.expected_version
# Identical synthetic fresh input and fixed output cap, no production conversation.
text='Erkläre ausführlich auf Deutsch, warum ein Backup erst nach einer erfolgreichen Wiederherstellung verlässlich ist. Nutze die folgenden synthetischen Prüfpunkte als Kontext, nicht als wörtliche Ausgabe. Schreibe einen zusammenhängenden langen Text, keine Liste.\n'
text+='\n'.join(f'Prüfpunkt {i}: Dateiintegrität, Rechte, Abhängigkeiten und Wiederherstellung auf einem leeren Zielsystem kontrollieren.' for i in range(1,97))
body=dict(model='flash-next-basalt',messages=[dict(role='user',content=text)],temperature=0,reasoning_effort='none',max_tokens=256,stream=False)
result=dict(phase=a.phase,version=a.expected_version,payload_sha256=hashlib.sha256(json.dumps(body,sort_keys=True).encode()).hexdigest(),started_at=time.time(),requests=1,scope='single_short_prefill_decode_not_a_benchmark_suite',success=False)
try:
start=time.monotonic();reply=req('/v1/chat/completions',body);result['elapsed_s']=time.monotonic()-start
result.update(usage=reply.get('usage'),timings=reply.get('timings'),finish_reason=reply['choices'][0].get('finish_reason'),answer=reply['choices'][0]['message'].get('content'))
assert isinstance(result['answer'],str) and result['answer'].strip()
after=req('/props?model=flash-next-basalt');assert after['basalt']['loaded'] is True and after['basalt']['version']==a.expected_version
result.update(success=True,loaded_version=after['basalt']['version'],slots=after['total_slots'],context_per_slot=after['default_generation_settings']['n_ctx'])
finally:
result['finished_at']=time.time();a.output.write_text(json.dumps(result,ensure_ascii=False,indent=2)+'\n');print(json.dumps(result,ensure_ascii=False))
if __name__=='__main__':main()
@@ -0,0 +1,68 @@
#!/usr/bin/env python3
"""NAS-only synthetic activation guard tests: no SSH, Docker or production reads."""
import copy
import importlib.util
from pathlib import Path
from typing import Any
import unittest
from unittest.mock import patch
SPEC=importlib.util.spec_from_file_location('basalt056_activation',Path(__file__).with_name('activation.py'))
assert SPEC and SPEC.loader
activation=importlib.util.module_from_spec(SPEC)
SPEC.loader.exec_module(activation)
class ReferencePreflight(unittest.TestCase):
def test_missing_reference_fails_before_activation(self):
import tempfile
with tempfile.TemporaryDirectory() as tmp:
with self.assertRaisesRegex(RuntimeError,'Referenzmodell'):
activation.reference_preflight(Path(tmp),{'reference_models':True})
activation.reference_preflight(Path(tmp),{'reference_models':False})
class DrainGuards(unittest.TestCase):
def setUp(self):
self.drain:dict[str,Any]=dict(authenticated_status=200,origin='http://192.168.1.212:8108',checked_at=95,state='stopped',active_requests=0,scheduler=dict(active_requests=0,waiting_requests=0,tts_waiting_requests=0,stt_waiting_requests=0,switching=False))
def reject(self,drain):
with patch.object(activation.json,'load',return_value=drain),patch.object(activation.time,'time',return_value=100),patch.object(activation,'load') as load,patch.object(activation,'info') as info,patch.object(activation,'run') as run:
with self.assertRaises((AssertionError,KeyError)):activation.apply()
load.assert_not_called();info.assert_not_called();run.assert_not_called()
def test_unauthenticated(self):
self.drain['authenticated_status']=401;self.reject(self.drain)
def test_wrong_origin(self):
self.drain['origin']='https://example.invalid';self.reject(self.drain)
def test_stale_receipt(self):
self.drain['checked_at']=1;self.reject(self.drain)
def test_not_stopped(self):
self.drain['state']='running';self.reject(self.drain)
def test_active_http(self):
self.drain['active_requests']=1;self.reject(self.drain)
def test_boolean_is_not_integer_zero(self):
self.drain['active_requests']=False;self.reject(self.drain)
def test_each_active_or_waiting_counter(self):
for key in ('active_requests','waiting_requests','tts_waiting_requests','stt_waiting_requests'):
with self.subTest(key=key):
drain=copy.deepcopy(self.drain);drain['scheduler'][key]=1;self.reject(drain)
def test_missing_counter_is_not_idle(self):
del self.drain['scheduler']['stt_waiting_requests'];self.reject(self.drain)
def test_switching(self):
self.drain['scheduler']['switching']=True;self.reject(self.drain)
def test_valid_receipt_only_reaches_next_precondition(self):
with patch.object(activation.json,'load',return_value=self.drain),patch.object(activation.time,'time',return_value=100),patch.object(activation,'load',side_effect=RuntimeError('synthetic next gate')),patch.object(activation,'run') as run:
with self.assertRaisesRegex(RuntimeError,'synthetic next gate'):activation.apply()
run.assert_not_called()
if __name__=='__main__':unittest.main()
@@ -0,0 +1,20 @@
{
"phase": "activated",
"image_before": "sha256:fc3cfb07b2b04fd5334cac67263a79b2dca802022b5b94539b1baaaa7bff516d",
"tag_before": "athena-deck-standalone:basalt-056-20261123",
"container_before": "2ce1468fadb349f7cc821d27947dde52d654855502cd3cd1b2718aa9a370b281",
"sandbox": "c43eb3e62fbef5a45f0831b93501a4862d1f4dcf5fb063f92f0f3f7d10e01c30",
"source_before": "35c84e690001bbf977c9d83ac2a6e8e96e0d6e72dceee2e420f5d391b91a86d1",
"source_after": "4cabc400b70fb6a95fa8b7f32c71c33e8253891851b449994d759627988b3a69",
"settings": {
"profiles.json": "c1ca85c8bbeda92c321ad335771818889f0c28374f902b687fd9db0a26f2f4a7",
"endpoint.json": "98181e6b1d254f8507aee15e4135ebeaa7c409d6cca2edd030ff25b9f51b1a61",
"audio-policy.json": "54aa6b69e3449cdd0f7049f34d818504455662ebe41da88ed4cd99953db12344",
"cpu-partition.json": "836a97564094f95850c6fa0fd3776e164e7aeff2bf4bb8a61d43ea4182cfaaec",
"reasoning-budget.json": "4884a379adf2f888415041b81ef55a01a2c22ef7a41ca1554460f410bec5cf0c"
},
"autostart": true,
"image_after": "sha256:803aadc28939e5d9598343105ea2c5d715dad5f6c7d27259ebc1e7c0fd494bf9",
"settings_unchanged": true,
"runtime_changed": false
}
@@ -0,0 +1,50 @@
#!/usr/bin/env python3
"""ATHENA HOST: same-task Inkling presentation overlay, no runtime replacement."""
import hashlib
import importlib.util
import json
import os
from pathlib import Path
import shutil
import subprocess
import sys
import time
ROOT=Path('/opt/athena-deck-dev/inkling-ui-20261123')
BASE=Path('/opt/athena-deck-dev/runtime');SOURCE=Path('/opt/athena-deck-dev/source')
IMAGE='athena-deck-standalone:basalt-056-inkling-20261123'
SETTINGS=('profiles.json','endpoint.json','audio-policy.json','cpu-partition.json','reasoning-budget.json')
def sha(path):
with Path(path).open('rb') as f:return hashlib.file_digest(f,'sha256').hexdigest()
def info():return json.loads(subprocess.check_output(['docker','inspect','athena-deck-dev']))[0]
def sandbox(d):
c=dict(d['Config']);c.pop('Image',None);c.pop('Hostname',None);c['Env']=sorted(c.get('Env') or [])
return hashlib.sha256(json.dumps({'config':c,'host':d['HostConfig']},sort_keys=True).encode()).hexdigest()
def run(*args,**kw):return subprocess.run(list(map(str,args)),check=True,**kw)
def main():
b=json.load(sys.stdin);assert b['go'] is True
spec=importlib.util.spec_from_file_location('installer',SOURCE/'deploy/install.py');assert spec and spec.loader
installer=importlib.util.module_from_spec(spec);spec.loader.exec_module(installer)
cfg=installer.load_manifest(BASE);assert cfg.get('reference_models') is False
if b['phase']=='prepare':
assert set(b['files'])=={'execution_setup.py'} and not ROOT.exists()
d=info();assert d['State']['Running'];tag=d['Config']['Image'];assert subprocess.check_output(['docker','image','inspect','--format','{{.Id}}',tag],text=True).strip()==d['Image']
ROOT.mkdir(mode=0o700);(ROOT/'image/app').mkdir(parents=True);(ROOT/'tmp').mkdir(mode=0o700);os.chown(ROOT/'tmp',65534,65534)
for n,t in b['files'].items():(ROOT/'image/app'/n).write_text(t);(ROOT/'image/app'/n).chmod(0o644)
(ROOT/'image/Dockerfile').write_text('FROM '+tag+'\nUSER root\nCOPY app/ /app/\nUSER 65534:65534\n')
run('docker','build','--network','none','--pull=false','-t',IMAGE,ROOT/'image',stdout=subprocess.DEVNULL)
probe="from pathlib import Path;import tempfile;from server import Server\nwith tempfile.TemporaryDirectory() as tmp:\n s=Server(0,state_dir=Path(tmp));s.endpoint.close();s.video.close();s.dashboard.close();s.server_close()\nprint('Isolated Server passed')"
run('docker','run','--rm','--runtime','runc','--network','none','--read-only','--user','65534:65534','--cap-drop','ALL','-e','NVIDIA_VISIBLE_DEVICES=void','-e','DECK_REQUIRE_SETUP=0','-e','DECK_NETWORK_MODE=disabled','-e','TMPDIR=/test-tmp','--mount',f'type=bind,src={ROOT}/tmp,dst=/test-tmp','--entrypoint','python3',IMAGE,'-B','-c',probe,timeout=45)
a=dict(phase='prepared',image_before=d['Image'],tag_before=tag,container_before=d['Id'],sandbox=sandbox(d),source_before=sha(SOURCE/'execution_setup.py'),source_after=sha(ROOT/'image/app/execution_setup.py'),settings={n:sha(BASE/'state'/n) for n in SETTINGS},autostart=json.loads((BASE/'state/endpoint.json').read_text())['autostart'])
(ROOT/'receipt.json').write_text(json.dumps(a,indent=2));print(json.dumps({'phase':'prepared','image':IMAGE,'runtime_changed':False}));return
assert b['phase']=='apply';d=b['drain'];assert d['authenticated_status']==200 and d['origin']=='http://192.168.1.212:8108' and 0<=time.time()-d['checked_at']<60 and d['state']=='stopped'
assert type(d['active_requests']) is int and d['active_requests']==0 and d['scheduler']['switching'] is False
assert all(type(d['scheduler'][k]) is int and d['scheduler'][k]==0 for k in ('active_requests','waiting_requests','tts_waiting_requests','stt_waiting_requests'))
a=json.loads((ROOT/'receipt.json').read_text());live=info();assert a['phase']=='prepared' and live['Id']==a['container_before'] and live['Image']==a['image_before']
assert sha(SOURCE/'execution_setup.py')==a['source_before'] and all(sha(BASE/'state'/n)==v for n,v in a['settings'].items() if n!='endpoint.json')
run('docker','stop','--timeout','45','athena-deck-dev',stdout=subprocess.DEVNULL)
shutil.copy2(ROOT/'image/app/execution_setup.py',SOURCE/'execution_setup.py')
ep=BASE/'state/endpoint.json';data=json.loads(ep.read_text());data['autostart']=a['autostart'];tmp=ep.with_suffix('.ui-tmp');tmp.write_text(json.dumps(data));tmp.chmod(0o600);os.chown(tmp,65534,65534);tmp.replace(ep);assert sha(ep)==a['settings']['endpoint.json']
cfg.update(image=IMAGE,previous_image=a['tag_before']);run('docker','rm','athena-deck-dev',stdout=subprocess.DEVNULL);installer.launch(cfg);installer.ready(cfg);installer.write_manifest(BASE,cfg)
new=info();assert sandbox(new)==a['sandbox'] and all(sha(BASE/'state'/n)==v for n,v in a['settings'].items())
a.update(phase='activated',image_after=new['Image'],settings_unchanged=True,runtime_changed=False);(ROOT/'receipt.json').write_text(json.dumps(a,indent=2));print(json.dumps(a))
if __name__=='__main__':main()