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.1.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.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xkernel-2.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 9c325400a97670297b4437170256dd47510541b59ec85ad1a73cb67c3d9bbd6e
MD5 c48c0b520430e733d1a6ae4bc5204953
BLAKE2b-256 185c6de199f5f6b2c0ef55b279e0a024357f05f648f89b595d75c8869c66da78

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xkernel-2.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b35b148b1d1e05a02a5bbf88a21f9130db53ebbf460549d9b0d458238ccd2c19
MD5 9e761c936475b1cf765dac0ecc0d9b92
BLAKE2b-256 bfaf40e0894238729e4d527be299f4dfac38de65128bfb1571302086e7d6aae9

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