Commit 274d961
blox-ai: force-update BLOX_AI_MODEL_PATH on OTA + fix chunk cleanup
Two production-rollout fixes caught during lab end-to-end test.
1. install.sh — force-update BLOX_AI_MODEL_PATH:
Existing fleet devices currently preserve their .env across OTAs
except for keys listed in FORCE_UPDATE_KEYS (previously empty). On
the Qwen 2.5 1.5B -> Qwen 3 1.7B model swap, the lab device kept
its old BLOX_AI_MODEL_PATH=qwen2.5-1.5b-instruct-rk3588-w8a8.rkllm
even though download_model.sh fetched the new qwen3-1.7b file. The
container then failed find_model_path() check against the stale
env var, fell back to MockBackend, and the device silently lost
real AI capability.
BLOX_AI_MODEL_PATH must follow the shipped value because the
filename is dictated by what download_model.sh produces. Trade-off:
admin overrides to BLOX_AI_MODEL_PATH are wiped on every OTA. That
is acceptable — model swaps are rare (3 swaps in 6 months) and
silent breakage is the worse failure mode.
2. download_model.sh — chunk cleanup pattern:
The cleanup rms used to be `rm -f $MODEL_DIR/chunk-*` which only
matched the legacy `chunk-aa` naming. The Qwen 3 1.7B model is
2.21 GB and exceeds GitHub's 2 GiB per-asset cap, so it's split
into `qwen3-1.7b-rk3588-w8a8.rkllm.part-aa` and `.part-ab`. After
assembly + SHA verification, the part-* files leaked on disk
(lab observed +2.3 GB unused). Cleanup pattern now matches both:
- chunk-* (legacy)
- <MODEL_BASENAME>.part-* (current)
Phase 8 model-swap tests still pass (18/18).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 861cf91 commit 274d961
2 files changed
Lines changed: 18 additions & 4 deletions
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
320 | 324 | | |
321 | 325 | | |
322 | 326 | | |
| |||
359 | 363 | | |
360 | 364 | | |
361 | 365 | | |
362 | | - | |
| 366 | + | |
| 367 | + | |
363 | 368 | | |
364 | 369 | | |
365 | 370 | | |
| |||
377 | 382 | | |
378 | 383 | | |
379 | 384 | | |
380 | | - | |
| 385 | + | |
381 | 386 | | |
382 | 387 | | |
383 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| |||
0 commit comments