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.

Contract

  • docs/dbl_main_contract.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.0.tar.gz (5.3 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.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbl_main-0.3.0.tar.gz
  • Upload date:
  • Size: 5.3 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.0.tar.gz
Algorithm Hash digest
SHA256 f06a9bce87fdede1f1fa8f5cb41fbcf5b4f6186572aeac71b9af1dd1e571d7bd
MD5 74a3146788f00f6dfd4d2deb96d87bae
BLAKE2b-256 d550749e172fd42ae73bc577d429faa79f5e3ad747b4095b6fe324e720e35f1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbl_main-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7381080fa70679269455ed35e535044a605611195a398fc40fd9aff2afe50e27
MD5 1d282163ee4028245288d5f16acec0b0
BLAKE2b-256 5cbac86640bf1604514480742007c18b7986472094e07a8566739e01ce9bd7a6

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