protocol_runtime
Deterministic execution engine for Protocol-Governed Computing (import package: runtime).
The runtime traverses a precompiled execution graph and produces traceable, governed outcomes. It does not discover behavior, interpret intent, or contain business logic. Everything it will do was decided at compile time; execution is a traversal of what the snapshot already says.
Install
pip install pgc-runtime
Once installed:
protocol_runtime --help
Where it fits
software_governance the normative surface every composition rests on
conformance_workloads workloads that prove conformance
business_domains domains built on the surface
protocol_compiler source → compiled projections
snapshot_assembler projections → assembled snapshot
protocol_runtime snapshot → execution (this repo)
snapshot_inspector snapshot → inspection
protocol_transport governs the boundary at either end of execution — ingress and egress as
first-class contracts. The runtime consumes only the assembled snapshot, never an individual
repo's compiled layout.
What it is, and is not
It is a deterministic graph traverser, a trace generator, and a host for the capability implementations a snapshot names.
It is not a workflow authoring system, a rules engine, a business-logic container, or a framework with pluggable behavior. There is no extension point, because an extension point is a place where ungoverned behavior could enter.
Inputs and outputs
snapshot root the assembled snapshot — the sole source of behavior
payload external input (JSON)
data-root the state storage boundary; one data root is one instance
A run writes an append-only trace alongside the state its declared side effects produce:
traces/<TRACE_ID>/
<TRACE_ID>.jsonl append-only execution log
<TRACE_ID>.md human-readable summary
<TRACE_ID>.png the execution path, rendered
data/
registry/ idempotent state
events/ append-only history
Running
./run.sh # warm-boot the sibling assembled snapshot
./run.sh boot --snapshot /abs/snapshot # explicit boot
./run.sh run --wf <domain>::WF_… --data-root /abs/instance
./run.sh examine /abs/trace.jsonl
run.sh wraps the CLI, also installed as the protocol_runtime console script, with four
subcommands:
| command | what it does |
|---|---|
run |
execute a workflow against a data root |
boot |
warm-boot the assembled snapshot — load and hash-verify every manifest domain |
examine |
analyze a completed trace file |
behavior-logic |
render the execution path from a completed trace as a PNG |
PGC_SNAPSHOT_ROOT overrides the snapshot location; PGC_IMPL_ROOTS is the colon-separated set of
roots on PYTHONPATH for domain capability implementations.
Warm reboot is its own proof. Bringing every manifest domain resident and hash-verified establishes that the snapshot is intact and executable before any workflow runs. A surface-only snapshot has no workflow to traverse, and warm reboot is exactly what proves it sound anyway.
A data root is an instance, not an interface. Two data roots against the same snapshot are two independent instances of the same governed behavior.
How execution works
The runtime loads the compiled graph, admits the request against the intent that declares it, and walks the workflow node by node. At each node it executes the capability contract's steps — invoking transforms, applying side effects — and routes on the declared outcome. It resolves nothing by name at execution time: the compiler assigned integer addresses, and traversal operates on those.
Every step emits evidence. The trace is not a log the runtime chose to write; it is the record of the path actually taken through a graph that was fixed before the run began, which is what makes a run reproducible and reviewable after the fact.
License
Apache-2.0. See LICENSE and NOTICE.
The package family
| Package | Repository | Role |
|---|---|---|
pgc-compiler |
protocol_compiler |
declarations → compiled projections |
pgc-assembler |
snapshot_assembler |
projections → sealed snapshot |
pgc-runtime |
protocol_runtime |
snapshot → governed execution |
pgc-inspector |
snapshot_inspector |
snapshot → read-only inspection |
pgc-transformation |
transformation |
change request → protocol artifacts |
pgc-governance |
software_governance |
the governance surface and its capability implementations |
pgc-workloads |
conformance_workloads |
the workloads that make conformance observable |
pgc-domains |
business_domains |
the business domain implementations the composed snapshot binds |
pip install pgc brings in the whole family.
Installing the toolchain is one of two steps. The compiler resolves the governance surface from
PGC_PLATFORM_ROOT — fail-hard, cwd-independent, zero inference — so the declarations come from a
repository you point at, never from a wheel. A registry inside a package would be a second governance
surface competing with the repository's, and a build could then be governed by a stale copy.
git clone https://github.com/protocol-governed-computing/software_governance
export PGC_PLATFORM_ROOT=$PWD/software_governance
pgc # reports what is installed and whether the anchor resolves
PGC_BUILD_ROOT (compiled output, keeping the governance repo read-only) and PGC_DOMAIN_ROOTS
(additional domains contributing their own registry/structures) are optional.
Versioning. Two schemes, and the published version follows the second.
- Internal — each repository's
VERSIONfile, a monotonic composition ordinal. PGC versions the composition rather than each repo: they release together and the governance closure forces lockstep, so the ordinal names which composition a repo belongs to. Development happens ondev/<N>and each cycle is taggedrelease-<N>. This is not published. - Public —
PUBLIC_VERSION, tagged on every component repository. The platform is atv2.
The published version is the public one: v2 is 2.0.0. The standard the packages implement is a
separate artifact on its own track and is not this number.
The standard these packages implement is published separately: https://doi.org/10.5281/zenodo.22150616
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pgc_runtime-2.0.0.tar.gz.
File metadata
- Download URL: pgc_runtime-2.0.0.tar.gz
- Upload date:
- Size: 50.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3320232ae1c8297b06c745ffd775602b80352b6323fcde125ae7794ad56fefd4
|
|
| MD5 |
e0e258ab457b2f37b84d4ff68f0719ff
|
|
| BLAKE2b-256 |
eef8da52de89c47558e084b08fe345b5566dc2183d052725b8071150b6036211
|
File details
Details for the file pgc_runtime-2.0.0-py3-none-any.whl.
File metadata
- Download URL: pgc_runtime-2.0.0-py3-none-any.whl
- Upload date:
- Size: 60.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9825c29f644aa66ffa3216c27be48f090e26ca81fb61963cf61985f174113fd5
|
|
| MD5 |
4f3513e2755d6f572bab7b04b8b6ebda
|
|
| BLAKE2b-256 |
51cffc40c8c1626e9e3ce00629f0f5f8b367a475d0dc9aa0a0f3df78badfef83
|