Architecture

Application, environment, deployment.

Presolve keeps these as separate concepts so changing where an application runs does not silently turn it into a different application build.

Docs / Architecture

The central Presolve question is not “which cloud are we deploying to?” It is “what does this application require, what can this environment provide, and can the two be matched without changing the application release?”

Canonical flow

Application needs and environment supply meet at compatibility.

Application sideApplication definitionpresolve.tomlworkloads · capabilities · resources · network policy
→
Built release.presolvedsha256:…application semantics + workload identity
+
Environment sideEnvironment definitionpresolve.env.tomlexecution support · providers · capacity
Normalized inputsRequirements + inventoryvalidated semantic model
→
Deterministic decisionResolvercompatibility · provider selection · feature negotiation
→
Inspect before executionDeployment planworkloads · provider IDs · versions · negotiated features

The plan is symbolic. Compatibility and provider selection do not require concrete Redis clients, database connections, cloud credentials, or runtime implementation objects.

Four concepts

Keep these boundaries separate.

01Application

The portable thing being distributed: its requirements, topology, workload identity, and semantic service needs.

02Environment

A declaration of what one place can execute and provide: resources, workload classes, providers, versions, and features.

03Deployment

The result of matching one application release against one environment at one point in time.

04Materialization

Turning the symbolic plan into concrete runtime/provider implementations plus runtime-only settings such as endpoints and credentials.

Boundary

What changes—and what must not.

Application identity may contain
  • capability requirements
  • workload artifact identity
  • minimum resources
  • network policy
  • application topology
Application identity must not contain
  • selected environment ID
  • selected provider ID
  • cloud credentials or secrets
  • service endpoints
  • database paths or connection strings

This separation is the invariant exercised by the portability proofs in the repository.

Compatibility + selection

Compatible is a deterministic statement.

A successful result means the environment can satisfy every mandatory application requirement represented by the current semantic model. A rejected result returns structured problems instead of silently weakening the request.

Resolved

Required workload execution is available, resource minimums fit, capability versions match, and required semantic features are supported.

Rejected

Examples include unsupported workload classes, insufficient resources, no compatible provider version, or a missing required feature.

presolve check
# Status: compatible

presolve plan
# presolve:sql/database → postgres-sql @ 0.1.0
Materialization

Provider identity connects the plan to an implementation.

Plan outputDeployment planprovider_id = prv_…
→
Runtime registryProvider registryprv_… → implementation
→
Concrete executionRuntimememory · Redis · S3 · SQLite · PostgreSQL · queue

Endpoint addresses, credentials, file paths, and similar operational settings are supplied only when the selected provider is materialized.

Invariants

The rules Presolve is trying to preserve.

  1. Application identity is independent of deployment environment.
  2. Application, environment, and deployment are separate concepts.
  3. Applications request capability semantics, not vendors.
  4. Capability semantics are independent of binding transport.
  5. Compatibility/planning output remains symbolic until runtime materialization.
  6. The runtime executes a resolved plan; it does not own environment resolution.
  7. A .presolved release never encodes environment-specific provider selection.
Canonical architecture source on GitHub ↗
Continue

Follow the model into concrete files.