Skip to content

Architecture drift: where the running system differs from the one you agreed.

Every team has an architecture it agreed on, in a diagram, an ADR or a Structurizr workspace. The running system diverges from it one pull request at a time: a service that reads another's database, a call that skips the gateway. Drift detection turns those into findings instead of surprises in review.

Updated

Two models: intended and observed

The observed model is the map drawn from traces. The intended model is what you meant: the components and the calls between them that are supposed to exist. Drift is the difference, computed again as the system changes.

Recording what you intended

There are two ways in. Accept the current map as intended, which records what runs today as the baseline you mean to keep. Or import a model you already have: Ritele reads a subset of Structurizr DSL (systems, containers and relationships), Mermaid flowcharts (A --> B, labelled edges and subgraph), and CSV rows of from,to,protocol.

What counts as drift

Six kinds of finding are reported. Five are judged against the intended model; a layer violation needs only a layer order. Layers come from ritele.layer on the resource, in an order you set from outermost inward, so a call back outward becomes something the tool finds rather than something a reviewer has to notice.

  • Unexpected edge: a call the intended model does not have, made by a component the model describes
  • Missing edge: a call the model has that has not been seen in the last week
  • New component: one the model does not have, first seen in the last week
  • Disappeared component: one the model has that has not been seen for a week
  • Protocol change: a call made over a different protocol than the model says
  • Layer violation: a call from a deeper layer back out to an outer one, directly or through components with no layer

Working through findings

Each finding can be accepted, marked as a bug, snoozed, or left open until it resolves. Accepting a finding updates the intended model to match what runs: an unexpected call or new component is added, a missing call or disappeared component is removed, and a changed protocol is updated. Removing a component that other intended dependencies rely on asks first and names them, and a dependency a service declares is never removed. A layer violation is accepted as an exception. Reopening an accepted finding puts the model back as it was, unless the model has been imported again since. On a plan without the intended model, accepting only closes the finding. A snooze from the Drift page lasts seven days; the drift check runs every 15 minutes, and the first run after the snooze ends reopens the finding if the difference still holds.

The map can be exported back out as Mermaid or Structurizr DSL, so the diagram in your repository can be regenerated from what runs.

Recording an intended model and triaging findings each need a licence whose plan grants them, and plans differ in which they include; the pricing page lists what each grants. The free plan covers the map, Health, traces and logs.