0.3.5-alpha.10

This commit is contained in:
2026-09-22 08:49:40 +02:00
parent c5806e4f78
commit 3f8693c929
11 changed files with 1046 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# file: scripts/audit_distribution_layout.py
# version: 23
# version: 24
"""Audit the static distribution layout expected by supported POCs."""
@@ -27,6 +27,8 @@ REQUIRED_PATHS = (
"crates/apps/game-realtime-transport-fallback-smoke/Cargo.toml",
"crates/apps/game-realtime-transport-fallback-smoke/src/main.rs",
"crates/apps/game-realtime-transport-fallback-smoke/unit_tests/fallback.rs",
"crates/apps/game-realtime-transport-measure/Cargo.toml",
"crates/apps/game-realtime-transport-measure/src/main.rs",
"crates/apps/game-realtime-websocket-smoke/Cargo.toml",
"crates/apps/game-realtime-webtransport-browser-smoke/Cargo.toml",
"crates/apps/game-realtime-webtransport-datagram-smoke/Cargo.toml",
@@ -396,6 +398,42 @@ def audit_realtime_fallback_smoke(root: pathlib.Path) -> list[str]:
return violations
def audit_realtime_transport_measure(root: pathlib.Path) -> list[str]:
"""Validate the bounded realtime transport characterization boundary."""
violations: list[str] = []
manifest_path = root / "crates/apps/game-realtime-transport-measure/Cargo.toml"
main_path = root / "crates/apps/game-realtime-transport-measure/src/main.rs"
study_path = root / "docs/studies/027-V0_3_5_REALTIME_TRANSPORT_MEASUREMENT.md"
required = (manifest_path, main_path, study_path)
if not all(path.exists() for path in required):
return violations
manifest = manifest_path.read_text(encoding="utf-8")
main = main_path.read_text(encoding="utf-8")
study = study_path.read_text(encoding="utf-8")
required_fragments = (
(manifest, 'game-realtime-transport-lib = { path = "../../common/game-realtime-transport-lib" }', "DIST-LAYOUT-102: measurement tool must use the transport-neutral contract"),
(manifest, 'game-realtime-websocket-lib = { path = "../../common/game-realtime-websocket-lib" }', "DIST-LAYOUT-103: measurement tool must consume the WebSocket backend directly"),
(manifest, 'game-realtime-webtransport-lib = { path = "../../common/game-realtime-webtransport-lib" }', "DIST-LAYOUT-104: measurement tool must consume the WebTransport backend directly"),
(main, 'const ESTABLISHMENT_SAMPLES: usize = 8;', "DIST-LAYOUT-105: measurement tool must keep establishment samples bounded"),
(main, 'const RTT_SAMPLES: usize = 128;', "DIST-LAYOUT-106: measurement tool must keep RTT samples bounded"),
(main, 'const THROUGHPUT_MESSAGES: usize = 128;', "DIST-LAYOUT-107: measurement tool must keep throughput messages bounded"),
(main, 'const IN_FLIGHT_MESSAGES: usize = 64;', "DIST-LAYOUT-108: measurement tool must keep the application in-flight window bounded"),
(main, 'MEASURE transport=webtransport-datagram metric=bounded_burst', "DIST-LAYOUT-109: measurement tool must report datagrams separately from the reliable contract"),
(main, 'CONCLUSION webtransport=retain scope=second-backend', "DIST-LAYOUT-110: measurement tool must expose the provisional retain conclusion without declaring a speed winner"),
(main, 'game-realtime-transport-measure: PASS', "DIST-LAYOUT-111: measurement tool must expose a deterministic PASS verdict"),
(study, 'Cette conclusion **ne signifie pas** que WebTransport est déclaré plus rapide que WebSocket.', "DIST-LAYOUT-112: measurement study must forbid interpreting retain as a performance winner"),
)
for content, fragment, message in required_fragments:
if fragment not in content:
violations.append(message)
for fragment in ("engine-v1-", "game-reflex-poc", "game-snake-poc"):
if fragment in manifest:
violations.append(f"DIST-LAYOUT-113: measurement tool must not depend on engine/gameplay package: {fragment}")
return violations
def audit_webtransport_datagram_smoke(root: pathlib.Path) -> list[str]:
"""Validate the isolated backend-specific WebTransport datagram proof."""
@@ -524,6 +562,7 @@ def main() -> int:
contract_violations.extend(audit_snake_tauri_generated_android(root))
contract_violations.extend(audit_android_native_gradle(root))
contract_violations.extend(audit_realtime_fallback_smoke(root))
contract_violations.extend(audit_realtime_transport_measure(root))
contract_violations.extend(audit_webtransport_browser_smoke(root))
contract_violations.extend(audit_webtransport_datagram_smoke(root))
if missing: