Docket Architecture Docs

Copy Markdown View Source

Operational instrumentation and correctness boundaries are documented in the telemetry guide. Production status, configuration, failure recovery, and inspection are in the PostgreSQL operations guide.

Module docs are authoritative for the current API. Architecture documents capture cross-module contracts and the rationale that is not useful at an individual function boundary.

Current guides and contracts

  • Delivery guarantees — durable transactions, replay, external effects, event export, and best-effort callbacks.
  • PostgreSQL operations — production setup, configuration, migration, recovery, and inspection.
  • TenantFair claim policy — state model, sticky admission, FIFO, bounded ring traversal, formal fair-rotation contract, release evidence, rollout, and nonclaims.
  • ClaimPolicy boundary — the one-statement internal seam and Legacy/TenantFair selection and interlock.
  • 0.0.1 to 0.1.0 migration — drain-and-cut-over instructions for old host-owned persistence adopters.

Graph and compiler internals are documented in graph construction, compiler design, and reducers.

Future planning

  • Future roadmap — the general project-wide home for future features, improvements, investigations, and research across every Docket area.
  • v0.1.1 roadmap — version-focused composability, ergonomics, and runtime follow-up themes.

Historical and research material

Release-Line Boundary

The graph programming model is continuous across the release lines: node modules, graphs, schemas, reducers, interrupts, executors, and Docket.Test helpers carry forward. The lifecycle owner changes:

  • 0.0.1: the host checkpoint callback persisted runs and the host explicitly resumed resident per-run processes.
  • 0.1.0: one required backend owns persistence, scheduling, recovery, and signals. The old supervised run / resume / get_run path is absent.

The historical execution contract is not production guidance. The runtime rationale labels the retired 0.0.1 boundary separately from its current architecture summary. Graph construction and compiler design are current.

Current Core Shape

Durable public documents:

  • Docket.Graph: the graph definition document that host applications build, edit, and verify, and that the backend publishes as an immutable effective version before starting a run. Public topology is represented by edge records; fan-in joins are multi-source edges, and branch groups live on source nodes.
  • Docket.Run: the durable execution state document encoded by the backend's run store and returned through committed reads.

Public read projection:

Derived internal runtime values:

Application-owned surfaces:

  • Authorization and tenant/project ownership.
  • UI projections for editors and live run overlays.
  • External effects performed by node code or adapters.