0.3.5-beta.1.fix.1

This commit is contained in:
2026-09-22 09:17:10 +02:00
parent 687b746381
commit 48444dce7f
6 changed files with 98 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# file: scripts/audit_distribution_layout.py
# version: 24
# version: 25
"""Audit the static distribution layout expected by supported POCs."""
@@ -342,6 +342,10 @@ def audit_webtransport_browser_smoke(root: pathlib.Path) -> list[str]:
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")
workspace_manifest = (root / "Cargo.toml").read_text(encoding="utf-8")
workspace_section = workspace_manifest.split("[workspace.package]", maxsplit=1)[1].split("[", maxsplit=1)[0]
workspace_version_line = next((line.strip() for line in workspace_section.splitlines() if line.strip().startswith("version = ")), "")
workspace_version = workspace_version_line.removeprefix("version = ").strip().strip('"')
tsconfig = tsconfig_path.read_text(encoding="utf-8")
vite = vite_path.read_text(encoding="utf-8")
main = main_path.read_text(encoding="utf-8")
@@ -362,6 +366,11 @@ def audit_webtransport_browser_smoke(root: pathlib.Path) -> list[str]:
for content, fragment, message in required_fragments:
if fragment not in content:
violations.append(message)
expected_package_version = f'"version": "{workspace_version}"'
if expected_package_version not in package:
violations.append(
f"DIST-LAYOUT-114: browser WebTransport smoke frontend version must match workspace version {workspace_version}"
)
return violations