Skip to content

Edge Runtime Readiness

build_edge_runtime_readiness() records the current edge/mobile deployment state for browser, Worker, embedded, and local low-latency paths. It checks the tracked WASM release plan, Rust kernel sources, ONNX and quantisation contracts, local build artefacts, and smoke-test evidence without running external builds.

Use it when preparing a release packet or deciding whether the edge path is only ready for local trial or ready for release:

from director_ai.core.edge import build_edge_runtime_readiness

profile = build_edge_runtime_readiness(
    ".",
    target_id="browser-worker",
    quantised_model_path="MODELS/lite-scorer-v2/onnx/model_quantized.onnx",
    browser_smoke_evidence="benchmarks/results/browser-worker-smoke.json",
    mobile_smoke_evidence="benchmarks/results/mobile-smoke.json",
)

assert profile.ready_for_local_trial

ready_for_local_trial means the tracked source contracts, target matrix, deployment docs, and latency-benchmark surfaces exist. ready_for_release is stricter: it also requires local WASM build artefacts, a quantised model artefact, Rust Python accelerator import evidence, and browser/mobile smoke evidence.

Generate the local R14 evidence packet with:

PYTHONPATH=src python -m benchmarks.edge_mobile_evidence

The packet is tenant-safe. Paths outside the repository are recorded as an external path marker instead of serialising absolute local paths.

Full API

director_ai.core.edge.runtime_profile.EdgeRuntimeCheck dataclass

EdgeRuntimeCheck(name: str, status: CheckStatus, summary: str, evidence: tuple[str, ...] = ())

One auditable readiness check for an edge runtime surface.

passed property

passed: bool

Return whether this check is satisfied.

to_dict

to_dict() -> dict[str, Any]

Serialise the check to stable JSON-safe data.

director_ai.core.edge.runtime_profile.EdgeRuntimeReadiness dataclass

EdgeRuntimeReadiness(schema_version: str, target_id: str, runtime: str, wasm_target: str, ready_for_local_trial: bool, ready_for_release: bool, checks: tuple[EdgeRuntimeCheck, ...], findings: tuple[str, ...], limits: dict[str, bool])

Readiness report for one tracked edge/mobile runtime target.

to_dict

to_dict() -> dict[str, Any]

Serialise the readiness report to stable JSON-safe data.

check_map

check_map() -> dict[str, EdgeRuntimeCheck]

Return checks keyed by stable check name.

director_ai.core.edge.runtime_profile.build_edge_runtime_readiness

build_edge_runtime_readiness(repo_root: str | Path, *, target_id: str = 'browser-worker', quantised_model_path: str | Path | None = None, browser_smoke_evidence: str | Path | None = None, mobile_smoke_evidence: str | Path | None = None, import_probe: bool = True) -> EdgeRuntimeReadiness

Build a deterministic readiness profile for one edge runtime target.