Wanderland

Wanderland Core: Engine

Pure Rack HTTP engine with Mustermann routing. No framework — just pattern matching and boundary chain dispatch.

How It Works

The engine is three operations:

The engine doesn't know what boundaries do. It routes, chains, and serializes.

Core Routes

Three routes are always mounted. Sites can override the handler but cannot remove the route.

Route Boundary Purpose
/health :health Load balancer ping
/status :status Monitoring — boundary count, route count
/healthcheck :healthcheck Deep inspection — full manifest

Parameterized Chains

Chain entries can be a string (boundary name) or a hash with args:

/repos:
  method: get
  chain:
    - boundary: auth_gate
      args: { required_scopes: [read] }
    - repo_list

Args are available to the boundary via input["args"] for that step only.

Gate Protocol

If a boundary result contains "_halt" => true, the chain stops. The result's "status" becomes the HTTP status code (default 200). This is how auth_gate and require_gate short-circuit.

Source File

wanderland-core/lib/wanderland/engine.rb