Skip to main content

Invariant deterministic kernel: k=1, boolean closure, canonical execution + receipt hashing, strict CLI.

Project description

DOI

xkernel

Invariant Deterministic Kernel (k = 1, Boolean Closure)

xkernel is a minimal, invariant execution kernel.

It defines:

  • a single admissible action quantum (k = 1),
  • deterministic replay semantics,
  • boolean closure against a target state,
  • canonical execution hashing,
  • and tamper-evident receipts.

xkernel is NOT a runtime engine, simulator, or pattern system. It has NO kernel object, NO mutable configuration, and NO hidden state.

The kernel is the law. Executions and receipts are the artifacts.


What xkernel guarantees

  • Determinism Replaying the same execution always yields the same final state.

  • Admissibility Any step with action != 1 is invalid.

  • Closure Closure is a boolean: an execution either closes to a target state or it does not.

  • Canonical identity Executions and receipts have stable, content-addressed identifiers:

    • xk:sha256:... for executions
    • xr:sha256:... for receipts
  • Tamper evidence Any mutation of execution or receipt content changes its hash and fails verification.


What xkernel does NOT do

  • No engine orchestration
  • No filaments, fibers, or bundles
  • No pattern detection or lenses
  • No identity, signing, or trust semantics
  • No backward compatibility with v1

Those concerns belong in downstream systems.


Installation

pip install -e .

Command-line interface

xkernel ships with a strict reference CLI.

xkernel --help

Available commands:

  • validate Validate execution admissibility and replay
  • hash Compute execution content address (xk:sha256:...)
  • receipt Emit receipt JSON for an execution (optional target closure)
  • verify Verify receipt integrity against an execution
  • receipt-hash Compute receipt content address (xr:sha256:...)

Example:

xkernel validate exec.json
xkernel hash exec.json
xkernel receipt exec.json --target target.json > receipt.json
xkernel verify receipt.json exec.json

Core model (conceptual)

StateVector  : immutable integer coordinate vector
Step         : delta + action (must equal k = 1)
Execution    : init + ordered steps + final
Closure      : boolean equality to a target under replay
Receipt      : canonical record of execution + closure

There is no kernel instance. Correctness is enforced structurally.


Testing

pytest

All tests assert invariants, determinism, hashing stability, and tamper detection.


Versioning

v2.0.0 introduces invariant semantics and removes all v1 engine concepts. There is no backward compatibility.


License

MIT - 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

xkernel-2.0.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

xkernel-2.0.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file xkernel-2.0.0.tar.gz.

File metadata

  • Download URL: xkernel-2.0.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for xkernel-2.0.0.tar.gz
Algorithm Hash digest
SHA256 257ad7924df73792b16226d60ee1c3f3a536a6d158f49811090218ca909a7410
MD5 af90665ea5b19c47f8e2b9b0ba3515b7
BLAKE2b-256 b1f8b812102b5bd724f03a211df38f21338a85152c73716677a724e0333cea82

See more details on using hashes here.

File details

Details for the file xkernel-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: xkernel-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for xkernel-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 737707fc31f8cd633c27e198883b0f6808624e7c3e4a7c2ad0c1576880b1a0fc
MD5 355e16481e2a2706656c6c4d9951bad9
BLAKE2b-256 0b1df2da13862bb62e062d47725359ec4f072bcf0f4f795e1caf502d51a522f8

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