0.3.1-0-pre.4
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# file: scripts/audit_distribution_layout.py
|
||||
# version: 12
|
||||
# version: 13
|
||||
|
||||
"""Audit the static distribution layout expected by supported POCs."""
|
||||
|
||||
@@ -44,6 +44,7 @@ REQUIRED_PATHS = (
|
||||
"crates/apps/game-snake-poc-tauri/frontend/ts/assets.ts",
|
||||
"crates/apps/game-snake-poc-tauri/frontend/ts/game.ts",
|
||||
"crates/apps/game-snake-poc-tauri/frontend/ts/input.ts",
|
||||
"crates/apps/game-snake-poc-tauri/frontend/ts/lifecycle.ts",
|
||||
"crates/apps/game-snake-poc-tauri/frontend/ts/main.ts",
|
||||
"crates/apps/game-snake-poc-tauri/frontend/ts/provenance.ts",
|
||||
"Web/game-snake-poc/package.json",
|
||||
@@ -168,6 +169,7 @@ def audit_snake_tauri_android_integration(root: pathlib.Path) -> list[str]:
|
||||
game_path = app_root / "frontend/ts/game.ts"
|
||||
input_path = app_root / "frontend/ts/input.ts"
|
||||
provenance_path = app_root / "frontend/ts/provenance.ts"
|
||||
lifecycle_path = app_root / "frontend/ts/lifecycle.ts"
|
||||
logging_path = app_root / "frontend/ts/logging.ts"
|
||||
vite_path = app_root / "vite.config.ts"
|
||||
wasm_runtime_path = root / "crates/apps/game-snake-poc-wasm/src/runtime.rs"
|
||||
@@ -183,6 +185,7 @@ def audit_snake_tauri_android_integration(root: pathlib.Path) -> list[str]:
|
||||
game_path,
|
||||
input_path,
|
||||
provenance_path,
|
||||
lifecycle_path,
|
||||
logging_path,
|
||||
vite_path,
|
||||
wasm_runtime_path,
|
||||
@@ -201,6 +204,7 @@ def audit_snake_tauri_android_integration(root: pathlib.Path) -> list[str]:
|
||||
game = game_path.read_text(encoding="utf-8")
|
||||
input_module = input_path.read_text(encoding="utf-8")
|
||||
provenance = provenance_path.read_text(encoding="utf-8")
|
||||
lifecycle = lifecycle_path.read_text(encoding="utf-8")
|
||||
logging = logging_path.read_text(encoding="utf-8")
|
||||
vite = vite_path.read_text(encoding="utf-8")
|
||||
wasm_runtime = wasm_runtime_path.read_text(encoding="utf-8")
|
||||
@@ -222,6 +226,7 @@ def audit_snake_tauri_android_integration(root: pathlib.Path) -> list[str]:
|
||||
(main, 'loadSnakeTauriAssets()', "DIST-LAYOUT-046: Snake Tauri startup must load canonical runtime assets"),
|
||||
(main, 'startGame(canvas, score, length, provenance, descriptor)', "DIST-LAYOUT-047: Snake Tauri startup must run the shared WASM game through Canvas"),
|
||||
(main, 'bindInputs(session, buttons)', "DIST-LAYOUT-048: Snake Tauri startup must bind host inputs"),
|
||||
(main, 'bindTauriLifecycle(session, stage)', "DIST-LAYOUT-059: Snake Tauri startup must bind WebView lifecycle"),
|
||||
(assets, './common/data/runtime.json', "DIST-LAYOUT-049: Snake Tauri asset probe must load common runtime metadata"),
|
||||
(assets, './game/data/game.json', "DIST-LAYOUT-050: Snake Tauri asset probe must load Snake metadata"),
|
||||
(game, 'window.requestAnimationFrame(frame)', "DIST-LAYOUT-051: Snake Tauri Canvas host must schedule its fixed-step session"),
|
||||
@@ -230,6 +235,13 @@ def audit_snake_tauri_android_integration(root: pathlib.Path) -> list[str]:
|
||||
(input_module, '"keydown"', "DIST-LAYOUT-054: Snake Tauri input must retain keyboard controls when available"),
|
||||
(provenance, '"touch"', "DIST-LAYOUT-055: Snake Tauri provenance must observe touch input"),
|
||||
(provenance, '"keyboard-mouse"', "DIST-LAYOUT-056: Snake Tauri provenance must observe keyboard/mouse input"),
|
||||
(lifecycle, '"visibilitychange"', "DIST-LAYOUT-060: Snake Tauri lifecycle must observe visibility changes"),
|
||||
(lifecycle, '"pagehide"', "DIST-LAYOUT-061: Snake Tauri lifecycle must observe pagehide"),
|
||||
(lifecycle, '"pageshow"', "DIST-LAYOUT-062: Snake Tauri lifecycle must observe pageshow"),
|
||||
(lifecycle, "ResizeObserver", "DIST-LAYOUT-063: Snake Tauri lifecycle must observe stage resize/orientation"),
|
||||
(game, "pause(): void;", "DIST-LAYOUT-064: Snake Tauri session must expose pause semantics"),
|
||||
(game, "resume(): void;", "DIST-LAYOUT-065: Snake Tauri session must expose resume semantics"),
|
||||
(game, "accumulator = 0;", "DIST-LAYOUT-066: Snake Tauri resume/pause must reset accumulated elapsed time"),
|
||||
(vite, 'dest: "common/data", rename: { stripBase: true }', "DIST-LAYOUT-057: Snake Tauri common assets must retain the common/data namespace"),
|
||||
(vite, 'dest: "game/data", rename: { stripBase: true }', "DIST-LAYOUT-058: Snake Tauri game assets must retain the game/data namespace"),
|
||||
(logging, '@fltsci/tauri-plugin-tracing', "DIST-LAYOUT-030: Snake Tauri frontend logs must use the tracing bridge"),
|
||||
@@ -245,6 +257,8 @@ def audit_snake_tauri_android_integration(root: pathlib.Path) -> list[str]:
|
||||
(build_script, "gen/android", "DIST-LAYOUT-040: Snake Tauri build script must not mutate generated Android Gradle files"),
|
||||
(tauri, "python", "DIST-LAYOUT-034: Snake Tauri configuration must not use Python build orchestration"),
|
||||
(main, "console.", "DIST-LAYOUT-035: Snake Tauri application frontend must not log directly through console.*"),
|
||||
(main, "onbackbuttonpress", "DIST-LAYOUT-067: Snake Tauri reference POC must leave Android Back to the system while Snake quit policy is Exit"),
|
||||
(lifecycle, "onbackbuttonpress", "DIST-LAYOUT-067: Snake Tauri reference POC must leave Android Back to the system while Snake quit policy is Exit"),
|
||||
)
|
||||
for content, fragment, message in forbidden_fragments:
|
||||
if fragment in content.lower():
|
||||
|
||||
Reference in New Issue
Block a user