Policy Engine

Choose how Kanvas evaluates relationships in your designs, understand the relationship indicator states, and diagnose failing or unexpected relationship results.

As you build a design, Kanvas continuously evaluates the relationships between your components β€” to identify connections, validate them, and keep related configuration in sync. This page explains how you can choose which engine performs that evaluation, how to read the relationship indicator, and how to diagnose results that look wrong.

Kanvas can run relationship evaluation using one of two interchangeable engines:

  • Server-side β€” the policy engine running inside your Meshery server. It is always available and is the default.
  • Client-side β€” the same policy engine, compiled to WebAssembly and run inside a background worker in your browser. Because it runs locally, there are no round-trips to the server, so evaluation is typically faster. It is available only when your Meshery server provides the WebAssembly artifact.

Both engines produce the same relationship results. The choice affects performance, and where toil (evaluation) is done, not correctness.

The engine is controlled by the Relationship Evaluation Engine preference.

  1. In Kanvas Designer, open Settings.
  2. Find the Relationship Evaluation Engine preference.
  3. Choose one of the following values:
ValueWhat it does
Automatic (recommended)Runs a one-time health check at the start of the session. If the client-side (WASM) engine passes a self-test, it is used for the rest of the session; otherwise the Meshery server is used.
Meshery serverAlways uses the Meshery server’s policy engine.
Client-side (WASM)Uses the in-browser WebAssembly engine.

The engine is selected once per session. Changing the preference takes full effect on the next session (for example, after reloading Kanvas).

The relationship indicator tells you the state of the most recent evaluation:

  • Evaluating β€” evaluation is in progress. This is normal after you add, remove, or reconfigure components.
  • Evaluated β€” evaluation completed successfully and the relationships shown on the canvas are up to date.
  • Error β€” the most recent evaluation failed. This is a distinct state from “no relationships evaluated yet”. When evaluation fails:
    • The last successful relationship results stay on screen so your design remains readable.
    • A one-time, non-blocking notification appears to let you know.
    • You can continue editing and saving the design without interruption.

If the client-side (WASM) engine was active and faults during the session, it automatically self-heals: Kanvas falls back to the Meshery server engine for the remainder of the session, without requiring any action from you.

When evaluation first fails, or when Kanvas falls back from the client-side engine to the server engine, a single non-blocking notification is shown. It is informational β€” it does not require a response, and it will not repeat for every subsequent evaluation in that session. Its purpose is to let you know that relationship results may be stale or that the active engine changed.

If relationships are missing, look wrong, or the indicator shows an error, use the Relationship Evaluation Diagnostics view to investigate.

The Diagnostics view is exposed under the Designer debugger preference.

  1. In Kanvas Designer, open Settings.
  2. Enable the debugger preference.
  3. Open the Relationship Evaluation Diagnostics view.

The Diagnostics view reports the current state of relationship evaluation:

  • Active engine and why β€” which engine is in use (Meshery server or client-side WASM) and the reason it was selected (for example, the result of the Automatic health check, an explicit preference, or a runtime fallback).
  • Contract / version β€” the evaluation contract and engine version, used to confirm the client and server are compatible.
  • Last error β€” the most recent evaluation error, if any.
  • Fallback count β€” how many times Kanvas has fallen back from the client-side engine to the server engine this session.
  • Latency β€” how long recent evaluations took.

If you suspect the client-side engine is producing incorrect results:

  1. Open Settings.
  2. Set Relationship Evaluation Engine to Meshery server.
  3. Reload Kanvas so the new engine is used for the session.
  4. Re-check the design’s relationships.

If the relationships are correct with the server engine but wrong with the client-side engine, that points to a client engine issue worth reporting (see below).

Evaluation re-runs automatically whenever you change the design β€” for example, by adding, removing, or reconfiguring a component, or by toggling a relationship kind on or off from the Relationships section of the Designer. Making any such change re-triggers evaluation with the active engine. If the indicator was in the error state, a successful re-evaluation clears it.

If relationship results are still wrong or evaluation keeps failing after the steps above β€” especially if the Meshery server engine also produces incorrect or failing results β€” file a bug. Include the following from the Relationship Evaluation Diagnostics view so the issue can be reproduced:

  • The active engine and the reason it was selected.
  • The contract / version shown in the Diagnostics view.
  • The last error text.
  • The fallback count, if relevant.
  • A description of the expected relationships versus what Kanvas showed, and the design (or a minimal reproduction) if you can share it.

Related Reading

Last modified June 7, 2026: Restructure the docs (3b14dee42b3)