Fix clean-checkout package assets and pinned test harnesses

Track the reviewed Arcade baseline artwork and verify both baseline files
are included in Git. Keep its independently reviewed source provenance
separate from the metadata dependency pin.

Resolve current Kryon widgets through the locked project graph, link the
selected compiler runtime and actual native dependencies, and provide
asset-free image callbacks for behavior fixtures. Optimize large test
state initializers as native builds do. Include recovery in the extracted
meditation fixture and keep Unreleased notes within the Lumi limit.

Local tests: clean asset-only archive reproduction and candidate repair;
apps, node-apps, build-laws, package versions/workflows/manifests/uploads;
workout, sun pose/artwork/voice, Telegram SVG, achievements, habit form,
habit sessions, Lists, session results, Lumi updates, package release and
bundled-artwork tests. All ran through build-queue.
This commit is contained in:
waozi committed 2026-11-16 23:51:19 -03:00
1 parent ca99ca92ef
commit a3a37e3883
15 files changed
+70 -77

No files matched your search

+1
View File
@@ -12,5 +12,6 @@ design/tai-chi/narration-male-receipt.json
design/astral-projection/bruce-narration-receipt.json
# Exact digest-bound Arcade library artwork shipped for offline browsing.
apps/bundled/arcade.games/3db3d137e3e15f7bada0cab75751f33d92005e3bc28dded7a1419b1f06e6a1e0.zx
apps/bundled/arcade.games/83471e1e310ffbac2972bf5d85e7072da2812c6a3d7efb9d8beff7873ca973e1.zx
# The Radio page's three.js runtime on the website.
site/static/assets/radio/three.core.js
+2 -2
View File
@@ -2,9 +2,9 @@
## [Unreleased]
- Recover unfinished practices, restore a last good data copy and reset break timers after time away; adding a photo during practice keeps the app stable.
- Recover unfinished practices and data backups; add photos reliably and reset break timers after time away.
- Switch practices smoothly, choose an astral exercise, and claim daily coins beside the Habits balance.
- Read Tao Te Ching art on its own page; find Photos and Radio in Apps, with clearer lists, feedback and appearance controls.
- Read Tao Te Ching art on its own page; find Photos and Radio in Apps, with clearer feedback and appearance controls.
## [2.1.63] - 2026-11-05
+1 -1
View File
@@ -165,7 +165,7 @@ modal-rules-test: build-laws $(ZI2C_BIN)
@sh tests/modal_rules_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
.PHONY: elist-screen-test
elist-screen-test: apps $(ZI2C_BIN) $(ZIRAN_BUILD_DIR)/libziran.a
elist-screen-test: apps $(ZI2C_BIN) $(ZIRAN_BUILD_DIR)/libziran.a $(RAYLIB_A)
@sh tests/elist_screen_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
.PHONY: app-click-block-zi-test
+4 -11
View File
@@ -1,7 +1,8 @@
#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
ziran=${1:-"$root/build/ziran-toolchain/bin/ziran"}
ziran=${1:-"$root/build/packages/ziran/build/bin/ziran"}
runtime_library=$(dirname "$ziran")/../libziran.a
liboqs=${2:-"$root/vendor-builds/linux/x86_64/inbe-liboqs/lib/liboqs.a"}
work=$root/build/achievements-test
exec 9>"$work.lock"
@@ -20,15 +21,7 @@ for fixture in valid invalid empty; do
"$root/tests/achievement_package_fixture.zi"
fi
done
"$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--module-path "$root/src" \
$(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
--module-path "$root/build/packages/kryon/src/ui" \
--module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/css/src" \
--module-path "$root/build/packages/game2d/src" \
--module-path "$root/build/packages/ziran/std" \
--module-path "$root/build/packages/daochi-client" \
"$ziran" build --project --locked --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--entry achievements_behavior:Check -o "$work/generated" \
"$root/tests/achievements_behavior.zi" "$root/tests/sync_test_host.zi"
cat > "$work/generated/main.c" <<'C'
@@ -45,7 +38,7 @@ C
-I"$root/vendor-builds/sqlite" \
-I"$root/vendor-builds/linux/x86_64/inbe-liboqs/include" \
"$work/generated"/*.c "$root/vendor-builds/sqlite/sqlite3.c" "$liboqs" \
"$root/build/ziran-toolchain/libziran.a" \
"$runtime_library" \
-Wl,--gc-sections -ldl -lpthread -lz -lm -o "$work/test"
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
APP_DATA_ROOT=/tmp/inbe-achievements-test/data "$work/test"
+13
View File
@@ -2,6 +2,19 @@
// them do not need their effects. Built as a separate root so no generated
// header declares them twice.
// These behavior tests install no image assets.
#program_export "ImageWidth"
host_image_width :: (path: string) -> s32 {
unused path
return 0
}
#program_export "ImageHeight"
host_image_height :: (path: string) -> s32 {
unused path
return 0
}
#program_export "app_leave_practice_config"
host_leave_practice_config :: (app: *void) {
unused app
+1 -1
View File
@@ -1,4 +1,4 @@
#include "screens/elist_screen.h"
#include "elist_screen.h"
#include "zir_string.h"
#include "module_host.h"
#include "lists_visibility.h"
+10 -15
View File
@@ -2,7 +2,7 @@
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
bin=${1:-"$root/build/ziran-toolchain/bin"}
bin=${1:-"$root/build/packages/ziran/build/bin"}
work=$root/build/elist-screen-zi-test
mkdir -p "$work/c"
@@ -10,23 +10,15 @@ mkdir -p "$work/c"
exec 9>"$work.lock"
flock 9
"$bin/zi2zir" --check-only --root "$root/src" \
--module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/css/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
--module-path "$root/build/packages/ziran/std" \
--module-path "$root/build/packages/daochi-client" \
"$bin/ziran" check --project --locked --root "$root/src" \
"$root/src/screens/elist_screen.zi"
"$bin/zi2c" --no-main --prune-stale --root "$root/src" \
--module-path "$root/build/packages/kryon/src/ui" --module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/css/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
--module-path "$root/build/packages/ziran/std" \
--module-path "$root/build/packages/daochi-client" \
"$bin/ziran" build --project --locked --target=c --no-main --prune-stale --root "$root/src" \
-o "$work/c" "$root/src/screens/elist_screen.zi"
includes="-I$root/build/packages/ziran/include -I$work/c -I$work/c/screens"
includes="-I$root/build/packages/ziran/include -I$work/c"
# The test host and the screen under test compile warning-free.
for source in "$root/tests/elist_screen_link_test.c" "$work/c/screens/elist_screen.c"; do
for source in "$root/tests/elist_screen_link_test.c" "$work/c/elist_screen.c"; do
"${CC:-cc}" -std=c11 -Wall -Wextra -Werror \
-Wno-unused-function -Wno-unused-variable \
-ffunction-sections -fdata-sections $includes \
@@ -40,11 +32,14 @@ done
# boundary through a linker wrapper, leaving its production export intact.
"${CC:-cc}" -std=c11 -w -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,--wrap=app_auto_sync \
$includes "$work/elist_screen_link_test.o" "$work/elist_screen.o" \
$(find "$work/c" -name '*.c' | grep -v -e '/screens/elist_screen\.c$' \
$(find "$work/c" -name '*.c' | grep -v -e '/elist_screen\.c$' \
-e '/db\.c$' -e '/storage_elist\.c$' -e '/lists_network\.c$' \
-e '/diary_store\.c$' -e '/node_apps\.c$' -e '/media_store\.c$' \
-e '/metrics\.c$') \
"$root/build/ziran-toolchain/libziran.a" -lm -lpthread \
"$bin/../libziran.a" \
"$root/vendor-builds/linux/x86_64/raylib/libraylib.a" \
$(pkg-config --libs sdl2 gl libwebp libwebpdemux) \
-l:libopus.so.0 -l:libcurl.so.4 -lm -lpthread -ldl -lz -latomic \
-o "$work/test"
env -u DISPLAY -u WAYLAND_DISPLAY "$work/test" "$root/build/inbe.zx"
echo "Inbe elist screen Ziran/native test passed"
+6 -11
View File
@@ -4,21 +4,15 @@ set -eu
# Storage import/export and migration behaviour, run against a real
# SQLite database in a temporary directory.
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
ziran=${1:-"$root/build/ziran-toolchain/bin/ziran"}
ziran=${1:-"$root/build/packages/ziran/build/bin/ziran"}
runtime_library=$(dirname "$ziran")/../libziran.a
liboqs=${2:-"$root/vendor-builds/linux/x86_64/inbe-liboqs/lib/liboqs.a"}
work=$root/build/habit-form-zi-test
include=$root/build/packages/ziran/include
rm -rf "$work"
mkdir -p "$work/generated"
"$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--module-path "$root/src" \
--module-path "$root/build/packages/kryon/src/ui" \
--module-path "$root/build/packages/css/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
--module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/game2d/src" \
--module-path "$root/build/packages/ziran/std" \
--module-path "$root/build/packages/daochi-client" \
"$ziran" build --project --locked --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--entry habit_form_behavior:Check \
-o "$work/generated" "$root/tests/habit_form_behavior.zi" \
"$root/tests/sync_test_host.zi" "$root/tests/app_hooks_host.zi" "$root/tests/leaderboard_hooks_host.zi"
@@ -32,14 +26,15 @@ int main(void)
return result == 0 ? 0 : 1;
}
C
"${CC:-cc}" -std=c11 -O0 -ffunction-sections -fdata-sections \
# Optimize the full application-state initializer, as the native app build does.
"${CC:-cc}" -std=c11 -O1 -ffunction-sections -fdata-sections \
-I"$include" -I"$work/generated" -I"$root/vendor-builds/sqlite" \
-I"$root/vendor-builds/linux/x86_64/inbe-liboqs/include" \
-I"$root/build/packages/monocypher/src" -I"$root/build/packages/monocypher/src/optional" \
"$work/generated"/*.c "$root/vendor-builds/sqlite/sqlite3.c" "$liboqs" \
"$root/build/packages/monocypher/src/monocypher.c" \
"$root/build/packages/monocypher/src/optional/monocypher-ed25519.c" \
"$root/build/ziran-toolchain/libziran.a" \
"$runtime_library" \
-Wl,--gc-sections -l:libcurl.so.4 -ldl -lpthread -lz -lm -o "$work/test"
# Storage must never open the real data directory.
APP_DATA_ROOT=/tmp/inbe-habit-form-zi-test/data
+6 -11
View File
@@ -4,21 +4,15 @@ set -eu
# Storage import/export and migration behaviour, run against a real
# SQLite database in a temporary directory.
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
ziran=${1:-"$root/build/ziran-toolchain/bin/ziran"}
ziran=${1:-"$root/build/packages/ziran/build/bin/ziran"}
runtime_library=$(dirname "$ziran")/../libziran.a
liboqs=${2:-"$root/vendor-builds/linux/x86_64/inbe-liboqs/lib/liboqs.a"}
work=$root/build/habit-sessions-zi-test
include=$root/build/packages/ziran/include
rm -rf "$work"
mkdir -p "$work/generated"
"$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--module-path "$root/src" \
--module-path "$root/build/packages/kryon/src/ui" \
--module-path "$root/build/packages/css/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
--module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/game2d/src" \
--module-path "$root/build/packages/ziran/std" \
--module-path "$root/build/packages/daochi-client" \
"$ziran" build --project --locked --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--entry habit_sessions_behavior:Check \
-o "$work/generated" "$root/tests/habit_sessions_behavior.zi" \
"$root/tests/sync_test_host.zi" \
@@ -33,11 +27,12 @@ int main(void)
return result == 0 ? 0 : 1;
}
C
"${CC:-cc}" -std=c11 -O0 -ffunction-sections -fdata-sections \
# Optimize the full application-state initializers, as the native app build does.
"${CC:-cc}" -std=c11 -O1 -ffunction-sections -fdata-sections \
-I"$include" -I"$work/generated" -I"$root/vendor-builds/sqlite" \
-I"$root/vendor-builds/linux/x86_64/inbe-liboqs/include" \
"$work/generated"/*.c "$root/vendor-builds/sqlite/sqlite3.c" "$liboqs" \
"$root/build/ziran-toolchain/libziran.a" \
"$runtime_library" \
-Wl,--gc-sections -ldl -lpthread -lz -lm -o "$work/test"
# Storage must never open the real data directory.
APP_DATA_ROOT=/tmp/inbe-habit-sessions-zi-test/data
+2 -9
View File
@@ -1,7 +1,7 @@
#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
compiler=${1:-"$root/build/ziran-toolchain/bin/ziran"}
compiler=${1:-"$root/build/packages/ziran/build/bin/ziran"}
liboqs=${2:-"$root/vendor-builds/linux/x86_64/inbe-liboqs/lib/liboqs.a"}
work="$root/build/lumi-updates-test"
mkdir -p "$work"
@@ -10,14 +10,7 @@ flock 9
unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
export YUE_DESKTOP_RECOVERY=0
mkdir -p "$work/generated"
"$compiler" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--module-path "$root/src" --module-path "$root/build/packages/kryon/src/ui" \
--module-path "$root/build/packages/css/src" \
$(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
--module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/game2d/src" \
--module-path "$root/build/packages/ziran/std" \
--module-path "$root/build/packages/daochi-client" \
"$compiler" build --project --locked --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--entry lumi_updates_behavior:Check -o "$work/generated" \
"$root/tests/lumi_updates_behavior.zi" "$root/tests/sync_test_host.zi"
cat > "$work/generated/main.c" <<'C'
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
bin=${1:-"$root/build/ziran-toolchain/bin"}
bin=${1:-"$root/build/packages/ziran/build/bin"}
source=${2:?practice behavior source required}
name=$(basename "$source" .zi)
case "$name" in
@@ -27,6 +27,6 @@ int main(void) {
}
C
"${CC:-cc}" -std=c11 -I"$root/build/packages/ziran/include" -I"$work/c" \
"$work/c"/*.c "$root/build/ziran-toolchain/libziran.a" -lm -lz -o "$work/test"
"$work/c"/*.c "$bin/../libziran.a" -lm -lz -o "$work/test"
(cd "$root/tests" && env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS "$work/test")
echo "$name: practice behavior and figure passed"
+7 -11
View File
@@ -4,7 +4,8 @@ set -eu
# Storage import/export and migration behaviour, run against a real
# SQLite database in a temporary directory.
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
ziran=${1:-"$root/build/ziran-toolchain/bin/ziran"}
ziran=${1:-"$root/build/packages/ziran/build/bin/ziran"}
runtime_library=$(dirname "$ziran")/../libziran.a
liboqs=${2:-"$root/vendor-builds/linux/x86_64/inbe-liboqs/lib/liboqs.a"}
work=$root/build/session-results-zi-test
include=$root/build/packages/ziran/include
@@ -33,6 +34,7 @@ imports = ['apps/shared_state', 'apps/module_host', 'apps/practice_types',
'app/exercise_types', 'storage/data', 'practices/session_results']
header = ''.join('#import, file "' + os.path.relpath(root / 'src' / (name + '.zi'), work) + '";\n'
for name in imports)
header += '#import, file "' + os.path.relpath(root / 'apps/practice/recovery.zi', work) + '";\n'
header += '''#import "byte_text_linux"
c3 :: #system_library "c";
using ExerciseType;
@@ -47,15 +49,8 @@ app_play_bell_cue :: (app: *InnerBreeze, volume: float32) #foreign c3;
'''
(work / 'meditation_session_behavior.zi').write_text(header + body)
PY
"$ziran" build --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
"$ziran" build --project --locked --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
--module-path "$work" \
--module-path "$root/src" \
--module-path "$root/build/packages/kryon/src/ui" \
--module-path "$root/build/packages/css/src" $(sh "$root/scripts/package-paths.sh" "$root/build/packages") \
--module-path "$root/build/packages/kryon/src/backend" \
--module-path "$root/build/packages/game2d/src" \
--module-path "$root/build/packages/ziran/std" \
--module-path "$root/build/packages/daochi-client" \
--entry session_results_behavior:Check \
-o "$work/generated" "$root/tests/session_results_behavior.zi" \
"$work/meditation_session_behavior.zi" \
@@ -72,14 +67,15 @@ int main(void)
return result == 0 ? 0 : 1;
}
C
"${CC:-cc}" -std=c11 -O0 -ffunction-sections -fdata-sections \
# Optimize the full application-state initializer, as the native app build does.
"${CC:-cc}" -std=c11 -O1 -ffunction-sections -fdata-sections \
-I"$include" -iquote"$work/generated" -I"$root/vendor-builds/sqlite" \
-I"$root/vendor-builds/linux/x86_64/inbe-liboqs/include" \
-I"$root/build/packages/monocypher/src" -I"$root/build/packages/monocypher/src/optional" \
"$work/generated"/*.c "$root/vendor-builds/sqlite/sqlite3.c" "$liboqs" \
"$root/build/packages/monocypher/src/monocypher.c" \
"$root/build/packages/monocypher/src/optional/monocypher-ed25519.c" \
"$root/build/ziran-toolchain/libziran.a" \
"$runtime_library" \
"$root/vendor-builds/linux/x86_64/raylib/libraylib.a" \
-Wl,--wrap=meditation_music_stop -Wl,--gc-sections -l:libcurl.so.4 \
$(pkg-config --libs sdl2 gl libwebp libwebpdemux) -ldl -lpthread -lz -lm -latomic -o "$work/test"
+13 -1
View File
@@ -2,12 +2,14 @@
from hashlib import sha256
import json
from pathlib import Path
import subprocess
import sys
import tempfile
import unittest
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
from small_app_bundling import inspect_bundle, stage, MANDATORY, LIMIT_BYTES
from practice_content import bundle_assets
from node_app_games_test import fixture_bundle
ROOT = Path(__file__).resolve().parents[1]
@@ -102,8 +104,18 @@ class BundlingTests(unittest.TestCase):
source = next(p for p in lock['packages']
if p['id'] == lock['root']['dependencies']['arcade'])
self.assertTrue(source['source'])
self.assertEqual(source['commit'], item['source_commit'])
# The baseline retains its independently reviewed source revision.
# Updating a source-only metadata dependency does not rebuild it.
self.assertRegex(item['source_commit'], r'^[0-9a-f]{40}$')
self.assertEqual(source['url'].removesuffix('.git'), item['source'])
catalog = json.loads(bundle_assets(path.read_bytes())['assets/apps/catalog.json'])
artwork = path.parent / (path.stem + '.games') / (catalog['art']['sha256'] + '.zx')
required = {item['path'], str(artwork.relative_to(ROOT))}
tracked = subprocess.check_output(
['git', '-C', str(ROOT), 'ls-files', '-z', '--', *sorted(required)]
).decode().split('\0')
self.assertEqual(set(filter(None, tracked)), required,
'reviewed baseline and artwork must be included in the commit')
info = stage({}, declarations, self.bundles, self.optional, self.mandatory)['optional']['arcade']
self.assertTrue(info['included'])
self.assertEqual(len(list((self.optional / 'arcade').glob('*.zx'))), 1)
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
bin=${1:-"$root/build/ziran-toolchain/bin"}
bin=${1:-"$root/build/packages/ziran/build/bin"}
work="$root/build/telegram-svg-test"
mkdir -p "$work/c"
"$bin/zi2c" --no-main --root "$root/tests" \
@@ -36,5 +36,5 @@ int main(void) {
}
C
"${CC:-cc}" -std=c11 -I"$root/build/packages/ziran/include" -I"$work/c" \
"$work/main.c" "$work/c"/*.c "$root/build/ziran-toolchain/libziran.a" -lm -lz -o "$work/test"
"$work/main.c" "$work/c"/*.c "$bin/../libziran.a" -lm -lz -o "$work/test"
(cd "$work" && env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS "$work/test")