imsys

Build and troubleshoot

Diagnose fixture, handshake, and bridge errors. Build and preview the guide and all seven Rust API references locally.

Diagnose a failure

SymptomWhat to check
Fixture directory already existsRun the simulator against the existing directory, or generate a fresh directory to renew all identities together.
Certificate verification failedCheck the validity period and the expected peer fingerprint in the same fixture manifest. The HAN, WAN proxy and management sessions have independent trust anchors.
Blocking meter read exceeds its response allowanceReconnect and narrow the clock range or raise the per-GET allowance to include every response APDU header. For an encoded-value capacity error, check both scratch length and client response capacity, and follow the error’s reconnect flag.
Unknown CLS proxy routeCompare SNI with the provisioned proxy ID. An unknown route is rejected before any WAN connection opens.
No shared cipher or groupCheck the OpenSSL library and provider linked by Rust. Run cargo test --locked -p xtask --test transport to exercise real handshakes.
Wake-up freshness or replay rejectionUse the trusted time of receipt for the recording and inspect packet ordering within the batch. For persistent verification, check the recipient’s history in the selected replay database.
Bridge reports an unavailable peerCheck the mapped device, direction and bindings. For LPP, confirm the peer advertises one matching writable production limit in watts.

Check the workspace

just doctor lists the tools each command needs. From the workspace root:

just db-up    # optional: a loopback PostgreSQL the GWA tests reuse
just lint     # formatting, bare-metal builds, clippy, event and OpenAPI contracts, cargo deny, desk check
just test     # workspace tests, doctests, wake-up replay and the three-process run
just ci       # lint, test, the examples and the site

Without just db-up or GWAD_TEST_DATABASE_URL, each GWA test starts its own disposable PostgreSQL.

just packages exercises the extracted release archives. The package examples require Python 3.11.4 or later, Mosquitto 2 with its clients and OpenSSL with Brainpool support. Check the embedded libraries with the bare-metal target.

rustup target add thumbv7em-none-eabihf
cargo check --locked -p mme -p smgw-core -p smgw-sec -p smgw-lmn -p smgw-cls --target thumbv7em-none-eabihf

Check fleet dispatch

python3 xtask/run-consoles.py --fleet -- python3 xtask/check-fleet.py

The lab withholds one callback, measures 20 dispatch acknowledgments, and checks that another recipient can finish. It exercises receipt replay, retry exhaustion, revision changes and scoped access. Run python3 xtask/check-services.py to exercise daemon crashes and the four-exchange limit.

Check the browser workflows

With Playwright installed for Node and its Chromium browser available, run the browser check against disposable services and PostgreSQL. Set CHROME_PATH to use a locally installed Chrome executable.

python3 xtask/run-consoles.py --fleet -- node xtask/check-consoles.cjs

Put playwright and @axe-core/playwright on NODE_PATH. The check covers the three roles, keyboard and phone layouts, and an axe scan of every desk view in light and dark. For organization sign-in, use the Dex and HTTPS acceptance lab.

Work on the desk

The desk is a React and TypeScript application in web/desk/, typed by the published OpenAPI document. Node builds it; cargo build never does.

just dev                        # seeded estate, desk with hot reload on :5173
just desk-check                 # generated types, tsc, Biome, Vitest, build
just screenshots                # refresh site/static/img/desk-*.webp

After changing the OpenAPI document, run npm run gen in web/desk/ and commit src/api/schema.d.ts; just lint fails while it is stale. The simulators keep a dependency-free page of their own in tools/sim-console. Desk rules

Build the documentation

With Zola 0.23.6 installed, preview the guide and all seven Rust API references from the workspace root.

just serve        # or: just serve 8001

Open http://127.0.0.1:8000/. Zola reloads the browser when you edit a guide, template or stylesheet. After a Rust API change, press Ctrl-C and restart the preview to rebuild rustdoc.

just site builds and checks the publishable site in target/site/, including every schema URL the events and the OpenAPI document name. Core API · Security API · LMN API · Gateway API · CLS API · GWA API