Skip to main content

Deterministic Boundary Layer - projection layer on dbl-core

Project description

DBL Main

DBL Main provides a deterministic projection of the dbl-core event stream V into a finite state model. It does not execute tasks.

Scope

  • Pure state projection from V (append-only event stream).
  • Deterministic status evaluation based only on event ordering and DECISION outcomes.
  • No policy engine, no kernel runtime, no IO side effects. dbl-main exports projection primitives only.

Boundaries

  • dbl-core defines event kinds and DECISION semantics; dbl-main only consumes events.
  • dbl-main does not import dbl-policy or evaluate policy.
  • dbl-main does not call dbl-gateway and performs no replay; it projects project_state(V) -> State only.
  • dbl-policy contract: dbl-policy/docs/dbl_policy_contract.md

Contract

  • docs/dbl_main_contract.md

Validation against dbl-reference

See docs/validation_workflow.md.

Install

pip install dbl-main

Requires dbl-core>=0.3.0, Python 3.11+.

Usage

from dbl_core import DblEvent, DblEventKind, GateDecision
from dbl_main import Phase, RunnerStatus, project_state

v = [
    DblEvent(DblEventKind.INTENT, correlation_id="c1", data={"psi": "x"}),
    DblEvent(DblEventKind.DECISION, correlation_id="c1", data=GateDecision("ALLOW", "ok")),
    DblEvent(DblEventKind.EXECUTION, correlation_id="c1", data={"trace": {}, "trace_digest": "..." }),
    DblEvent(DblEventKind.PROOF, correlation_id="c1", data={"proof": "p1"}),
]

state = project_state(v)
assert state.phase in (Phase.EXECUTED, Phase.PROVEN)
assert state.runner_status == RunnerStatus.FINALIZED

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbl_main-0.3.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbl_main-0.3.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file dbl_main-0.3.1.tar.gz.

File metadata

  • Download URL: dbl_main-0.3.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for dbl_main-0.3.1.tar.gz
Algorithm Hash digest
SHA256 37a93989773512d56aebaa8f10573730504157181ed10d2fb52ee92e0c3eb49d
MD5 d3f4b05b2f66a518d624d28c3c9280a7
BLAKE2b-256 8eedfaeab8312293441c72614f5e4d203b335a71144ea30d5ebdba6a01659624

See more details on using hashes here.

File details

Details for the file dbl_main-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: dbl_main-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for dbl_main-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bfbe9e421910767d1f64af57691b17133288f7bfcd1b357e773c32735bc380d
MD5 1a851ae7861b7a194b60b42bad80323d
BLAKE2b-256 215a314fad3c8a1e72004efc15806e86040bf9c598cd05eeba3096c035a74b93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page