Skip to content
Konjure / spatial intelligence

Testing & replay

Test semantics once, then test each platform boundary in its real environment.

Core and bindings

Sourcesh
cargo nextest run --workspace
cargo test --workspace --doc
cargo check -p konjure-sdk --no-default-features
bash scripts/generate-sdk-contracts.sh --check
bash scripts/build-sdk-native.sh
uv run scripts/verify_sdk_ffi.py

Core tests cover parser diagnostics, truncated input, duplicate properties, geometry normals/winding, typed bounds, hierarchy, action transactions and deterministic samples. The FFI suite exercises real native library calls, capacity checks, Unicode, stale handles, disposal and mutation-safe retries.

Unity native interop

On macOS, run the native Unity smoke in a disposable project after building the library. Supply your editor executable; the test never opens an existing project:

Sourcesh
uv run scripts/verify_sdk_unity.py --editor "$KONJURE_UNITY_EDITOR" --output-dir "$HOME/.local/share/konjure/unity-checks"

It executes compile, sample, declared action dispatch and disposal through the C# facade and native plugin. The retained log must contain the success marker after disposal. This checks interop, not a rendered scene or physical XR session.

Browser and website

Sourcesh
npm ci
npm run sdk:wasm
npm run test:web
npm run verify
npm run dev -- --host 127.0.0.1

Exercise valid and invalid edits, scene preservation after errors, entity actions, replay, mobile layout, keyboard focus and reduced motion. Check actual canvas submissions and console/network errors. Comparing Rust and WASM frames is a semantic check; it does not prove rendering quality or hardware tracking.

Device acceptance

Track camera capture rate, inference update rate, render submissions, live latency and optical alignment independently. Keep source, firmware/model versions and failed configurations with local evidence. A renderer that submits frames at 60 Hz may still receive stale observations.

Room anchoring requires physical evidence during head motion, interruptions and relocalization. Unity/native compilation and synthetic side-by-side rendering cannot establish it.

Stable contracts

Recordings contain ordered decisions and explicit scene times. A timeline seek may move scene time backwards; replay follows the recorded decision order without sorting it. The CLI validates the complete recording envelope before replay. Each action is atomic, but a replay is a sequence of actions, not one transaction. Effect proposals remain proposals and do not call tools or hardware.

Sourcesh
cargo run -p konjure-tools --bin kj -- replay examples/sdk/orbital-lab.kj /tmp/recording.json

Generated JSON Schema and TypeScript files live in generated/contracts. Regenerate them from Rust and review the diff whenever a public field changes. Document wire-format version changes separately from crate and DSL versions. Preserve unknown/uncertain deployment outcomes rather than silently turning them into a definite rejection.