Skip to main content
simile-server is intentionally thin. It translates HTTP into a protocol-neutral operation call, then translates the runtime result back into HTTP. It does not parse OpenAPI, compile schemas, synthesize values, or execute a provider’s private infrastructure.

Route table

At startup, the server builds a route table from validated artifact operations. Literal paths are registered before parameter templates so a concrete route cannot be shadowed by a placeholder. The table points to stable artifact operation keys; route handlers do not carry source-language state.

Transport normalization

The adapter captures template path values, repeated query values, case-insensitive headers, and cookie pairs, then validates them through their compiled parameter schemas. It enforces an 8 MiB request-body limit, reads the declared content type, and passes the decoded media choice to the runtime. It also normalizes replay identity:
  • an Idempotency-Key identifies repeated mutation attempts;
  • a GET request’s full URI identifies repeat retrievals, including its query string.
Those identities allow deterministic replay without pretending that every operation is globally stateful.

Fault delivery

The runtime returns a protocol-neutral transport plan after completing the service outcome. The server implements the current plans by delaying before response delivery or by ending the response stream after commit. It does not select faults or convert them into service error bodies. This order matters for retries. The runtime records a replayable outcome before a disconnect-after-commit reaches the adapter. Repeating the request with the same idempotency key therefore returns the committed response rather than repeating the first attempt’s connection failure. See Fault injection for activation and profile controls.

Errors belong to the public contract

When request validation fails, the adapter first asks the runtime to synthesize the operation’s declared protocol error response. That keeps an emulator’s error envelope faithful to the service. Simile’s own structured diagnostic—with JSON Pointer paths and named rules—is only the fallback when the contract has no usable error response.

Observability and lifecycle

Each completed exchange emits a concise access line containing method, path, status, origin IP, user agent, request and response sizes, request and response media types, and elapsed time. The listener supports graceful Ctrl-C shutdown. When the runtime returns an internal emulator failure, the adapter can emit a sanitized incident to a bounded reporting channel. It removes recognized secrets from body and parameter fields and skips opaque bodies. The application reporting worker owns consent lookup, reproduction, storage, upgrade preflight, deduplication, and submission. This keeps report-network activity outside the request path and leaves the HTTP server unaware of contacts or provider policy. The server does not own source resolution, registry paths, terminal rendering, or process policy. Those belong to the application layer. The request itself is coordinated by operation execution.