0.3.5-alpha.7.fix.2

This commit is contained in:
2026-09-22 06:52:32 +02:00
parent dfb41a79b6
commit 401f00de13
7 changed files with 139 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# file: scripts/audit_distribution_layout.py
# version: 20
# version: 21
"""Audit the static distribution layout expected by supported POCs."""
@@ -326,13 +326,15 @@ def audit_webtransport_browser_smoke(root: pathlib.Path) -> list[str]:
violations: list[str] = []
package_path = root / "Web/game-realtime-webtransport-browser-smoke/package.json"
tsconfig_path = root / "Web/game-realtime-webtransport-browser-smoke/tsconfig.json"
vite_path = root / "Web/game-realtime-webtransport-browser-smoke/vite.config.ts"
main_path = root / "Web/game-realtime-webtransport-browser-smoke/frontend/ts/main.ts"
rust_manifest_path = root / "crates/apps/game-realtime-webtransport-browser-smoke/Cargo.toml"
rust_main_path = root / "crates/apps/game-realtime-webtransport-browser-smoke/src/main.rs"
if not all(path.exists() for path in (package_path, vite_path, main_path, rust_manifest_path, rust_main_path)):
if not all(path.exists() for path in (package_path, tsconfig_path, vite_path, main_path, rust_manifest_path, rust_main_path)):
return violations
package = package_path.read_text(encoding="utf-8")
tsconfig = tsconfig_path.read_text(encoding="utf-8")
vite = vite_path.read_text(encoding="utf-8")
main = main_path.read_text(encoding="utf-8")
rust_manifest = rust_manifest_path.read_text(encoding="utf-8")
@@ -340,6 +342,7 @@ def audit_webtransport_browser_smoke(root: pathlib.Path) -> list[str]:
required_fragments = (
(package, 'cargo build -p game-realtime-webtransport-browser-smoke --lib --target wasm32-unknown-unknown', "DIST-LAYOUT-077: browser WebTransport smoke must build its Rust WASM adapter"),
(package, 'wasm-bindgen ../../../builds/sasedev-games/', "DIST-LAYOUT-078: browser WebTransport smoke bindings must be generated outside the repository"),
(tsconfig, '../../../builds/sasedev-games/game-realtime-webtransport-browser-smoke/wasm/game_realtime_webtransport_browser_smoke.d.ts', "DIST-LAYOUT-086: browser WebTransport smoke TypeScript declarations must resolve from the external build root"),
(vite, 'host: "127.0.0.1"', "DIST-LAYOUT-079: browser WebTransport smoke Vite host must stay on loopback"),
(vite, 'port: 1435,', "DIST-LAYOUT-080: browser WebTransport smoke Vite port must stay deterministic"),
(main, 'window.isSecureContext', "DIST-LAYOUT-081: browser WebTransport smoke must verify secure-context availability"),