protocol-governed-computing 4.0.0__tar.gz → 6.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. protocol_governed_computing-6.0.0/PKG-INFO +63 -0
  2. protocol_governed_computing-6.0.0/README.md +34 -0
  3. {protocol_governed_computing-4.0.0 → protocol_governed_computing-6.0.0}/pgc/cli.py +30 -5
  4. protocol_governed_computing-6.0.0/pgc/composition.py +15 -0
  5. protocol_governed_computing-6.0.0/protocol_governed_computing.egg-info/PKG-INFO +63 -0
  6. {protocol_governed_computing-4.0.0 → protocol_governed_computing-6.0.0}/protocol_governed_computing.egg-info/SOURCES.txt +1 -0
  7. protocol_governed_computing-6.0.0/protocol_governed_computing.egg-info/requires.txt +12 -0
  8. {protocol_governed_computing-4.0.0 → protocol_governed_computing-6.0.0}/pyproject.toml +14 -13
  9. protocol_governed_computing-4.0.0/PKG-INFO +0 -338
  10. protocol_governed_computing-4.0.0/README.md +0 -310
  11. protocol_governed_computing-4.0.0/protocol_governed_computing.egg-info/PKG-INFO +0 -338
  12. protocol_governed_computing-4.0.0/protocol_governed_computing.egg-info/requires.txt +0 -11
  13. {protocol_governed_computing-4.0.0 → protocol_governed_computing-6.0.0}/pgc/__init__.py +0 -0
  14. {protocol_governed_computing-4.0.0 → protocol_governed_computing-6.0.0}/protocol_governed_computing.egg-info/dependency_links.txt +0 -0
  15. {protocol_governed_computing-4.0.0 → protocol_governed_computing-6.0.0}/protocol_governed_computing.egg-info/entry_points.txt +0 -0
  16. {protocol_governed_computing-4.0.0 → protocol_governed_computing-6.0.0}/protocol_governed_computing.egg-info/top_level.txt +0 -0
  17. {protocol_governed_computing-4.0.0 → protocol_governed_computing-6.0.0}/setup.cfg +0 -0
@@ -0,0 +1,63 @@
1
+ Metadata-Version: 2.4
2
+ Name: protocol-governed-computing
3
+ Version: 6.0.0
4
+ Summary: Protocol-Governed Computing — installs the full toolchain and reports whether an environment is ready to compile, seal, and execute
5
+ Author-email: Bhash Ganti <bachipeachy@gmail.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://omnibachi.org/
8
+ Project-URL: Repository, https://github.com/protocol-governed-computing
9
+ Project-URL: Standard, https://doi.org/10.5281/zenodo.22150616
10
+ Keywords: protocol-governed-computing,pgc,governance,authorization,sdlc
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Topic :: Software Development :: Compilers
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: pgc-governance==6.0.0
19
+ Requires-Dist: pgc-workloads==6.0.0
20
+ Requires-Dist: pgc-domains==6.0.0
21
+ Requires-Dist: pgc-compiler==6.0.0
22
+ Requires-Dist: pgc-runtime==6.0.0
23
+ Requires-Dist: pgc-assembler==6.0.0
24
+ Requires-Dist: pgc-transport==6.0.0
25
+ Requires-Dist: pgc-inspector==6.0.0
26
+ Requires-Dist: pgc-transformation==6.0.0
27
+ Provides-Extra: blockchain
28
+ Requires-Dist: pgc-domains[blockchain]==6.0.0; extra == "blockchain"
29
+
30
+ # Protocol-Governed Computing
31
+
32
+ **Software that runs only what it has declared, and proves it.**
33
+
34
+ In Protocol-Governed Computing (PGC), declarations decide what a system does. They name who may ask,
35
+ which input is admitted, which steps run, and what each step may touch. PGC compiles the declarations
36
+ and seals them into a **snapshot**. The runtime checks the snapshot is unchanged, executes only what it
37
+ declares, refuses everything else, and records a trace of every run.
38
+
39
+ ## Choose where to start
40
+
41
+ | You want to | Start here |
42
+ |---|---|
43
+ | See PGC run on your machine in a few minutes | [**Demos**](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEMO.md) |
44
+ | Build, run and extend PGC from its parts | [**Developer guide**](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEV.md) |
45
+ | Verify the sealed composition a paper cites | [`pgc_release`](https://github.com/protocol-governed-computing/pgc_release) |
46
+ | Read the standard PGC implements | https://doi.org/10.5281/zenodo.22150616 |
47
+
48
+ ## This package
49
+
50
+ This repository publishes `protocol-governed-computing`, the whole toolchain in one install. It
51
+ brings in the eight component packages, pinned to one composition, and puts the `pgc` command on your
52
+ path.
53
+
54
+ ```bash
55
+ pip install protocol-governed-computing
56
+ ```
57
+
58
+ The toolchain carries no declarations. To build and run a platform, follow the
59
+ [developer guide](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEV.md).
60
+ To see one run without building anything, start with the
61
+ [demos](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEMO.md).
62
+
63
+ **Something failed?** Please [open an issue](https://github.com/protocol-governed-computing/pgc_install/issues).
@@ -0,0 +1,34 @@
1
+ # Protocol-Governed Computing
2
+
3
+ **Software that runs only what it has declared, and proves it.**
4
+
5
+ In Protocol-Governed Computing (PGC), declarations decide what a system does. They name who may ask,
6
+ which input is admitted, which steps run, and what each step may touch. PGC compiles the declarations
7
+ and seals them into a **snapshot**. The runtime checks the snapshot is unchanged, executes only what it
8
+ declares, refuses everything else, and records a trace of every run.
9
+
10
+ ## Choose where to start
11
+
12
+ | You want to | Start here |
13
+ |---|---|
14
+ | See PGC run on your machine in a few minutes | [**Demos**](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEMO.md) |
15
+ | Build, run and extend PGC from its parts | [**Developer guide**](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEV.md) |
16
+ | Verify the sealed composition a paper cites | [`pgc_release`](https://github.com/protocol-governed-computing/pgc_release) |
17
+ | Read the standard PGC implements | https://doi.org/10.5281/zenodo.22150616 |
18
+
19
+ ## This package
20
+
21
+ This repository publishes `protocol-governed-computing`, the whole toolchain in one install. It
22
+ brings in the eight component packages, pinned to one composition, and puts the `pgc` command on your
23
+ path.
24
+
25
+ ```bash
26
+ pip install protocol-governed-computing
27
+ ```
28
+
29
+ The toolchain carries no declarations. To build and run a platform, follow the
30
+ [developer guide](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEV.md).
31
+ To see one run without building anything, start with the
32
+ [demos](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEMO.md).
33
+
34
+ **Something failed?** Please [open an issue](https://github.com/protocol-governed-computing/pgc_install/issues).
@@ -20,6 +20,7 @@ FAMILY = [
20
20
  ("pgc-assembler", "projections → sealed snapshot"),
21
21
  ("pgc-runtime", "snapshot → governed execution"),
22
22
  ("pgc-inspector", "snapshot → read-only inspection"),
23
+ ("pgc-transport", "requests → the governed boundary (HTTP and command line)"),
23
24
  ("pgc-transformation", "change request → protocol artifacts"),
24
25
  ("pgc-governance", "governance surface implementations"),
25
26
  ("pgc-workloads", "conformance workload implementations"),
@@ -29,6 +30,19 @@ FAMILY = [
29
30
  STANDARD = "https://doi.org/10.5281/zenodo.22150616"
30
31
 
31
32
 
33
+ def _composition() -> tuple[str, str, dict[str, str]] | None:
34
+ """The composition this distribution was published as, or None for a source install.
35
+
36
+ `pgc/composition.py` is generated when a composition is published. A source tree has none, and
37
+ that is a fact to report rather than an error.
38
+ """
39
+ try:
40
+ from pgc import composition
41
+ except ImportError:
42
+ return None
43
+ return composition.PUBLIC, composition.SNAPSHOT_ID, composition.PINS
44
+
45
+
32
46
  def _installed() -> list[tuple[str, str, str]]:
33
47
  rows = []
34
48
  for dist, role in FAMILY:
@@ -65,12 +79,21 @@ def main(argv: list[str] | None = None) -> int:
65
79
  return 0
66
80
 
67
81
  print("Protocol-Governed Computing\n")
82
+ composed = _composition()
83
+ if composed:
84
+ print(f" composition {composed[0]}, snapshot {composed[1][:16]}…\n")
85
+ else:
86
+ print(" composition: none recorded — this is a source install\n")
87
+ pins = composed[2] if composed else {}
68
88
  print(" toolchain")
69
- missing = 0
89
+ missing = drifted = 0
70
90
  for dist, ver, role in _installed():
71
91
  if ver == "-":
72
92
  missing += 1
73
- print(f" {dist:<20} {ver:<8} {role}")
93
+ pinned = pins.get(dist)
94
+ off = pinned is not None and ver not in ("-", pinned)
95
+ drifted += off
96
+ print(f" {dist:<20} {ver:<8} {role}" + (f" (composition pins {pinned})" if off else ""))
74
97
 
75
98
  print("\n environment")
76
99
  ready = True
@@ -81,7 +104,7 @@ def main(argv: list[str] | None = None) -> int:
81
104
 
82
105
  print()
83
106
  if missing:
84
- print(f" {missing} package(s) not installed — `pip install pgc` installs the family.")
107
+ print(f" {missing} package(s) not installed — `pip install protocol-governed-computing` installs the family.")
85
108
  if not ready:
86
109
  print(" PGC_PLATFORM_ROOT must point at a governance repository (the directory")
87
110
  print(" containing registry/). The declarations are not shipped in any wheel:")
@@ -89,10 +112,12 @@ def main(argv: list[str] | None = None) -> int:
89
112
  print(" governs a build rather than a wheel's stale copy competing with a repo.")
90
113
  print("\n git clone https://github.com/protocol-governed-computing/software_governance")
91
114
  print(" export PGC_PLATFORM_ROOT=$PWD/software_governance")
92
- if not missing and ready:
115
+ if drifted:
116
+ print(f" {drifted} package(s) differ from the composition's pins — this is not {composed[0]}.")
117
+ if not missing and ready and not drifted:
93
118
  print(" Ready: toolchain installed and a governance surface is anchored.")
94
119
  print(f"\n standard: {STANDARD}")
95
- return 0 if (ready and not missing) else 1
120
+ return 0 if (ready and not missing and not drifted) else 1
96
121
 
97
122
 
98
123
  if __name__ == "__main__":
@@ -0,0 +1,15 @@
1
+ """The composition this distribution installs. Generated by `compose_release.py`; never edit."""
2
+
3
+ PUBLIC = 'v6'
4
+ SNAPSHOT_ID = '13e3c5bb502e2548389f5787caa9438247ee34f9d510ce6a8a3ed980fdf974d1'
5
+ PINS = {
6
+ 'pgc-governance': '6.0.0',
7
+ 'pgc-workloads': '6.0.0',
8
+ 'pgc-domains': '6.0.0',
9
+ 'pgc-compiler': '6.0.0',
10
+ 'pgc-runtime': '6.0.0',
11
+ 'pgc-assembler': '6.0.0',
12
+ 'pgc-transport': '6.0.0',
13
+ 'pgc-inspector': '6.0.0',
14
+ 'pgc-transformation': '6.0.0',
15
+ }
@@ -0,0 +1,63 @@
1
+ Metadata-Version: 2.4
2
+ Name: protocol-governed-computing
3
+ Version: 6.0.0
4
+ Summary: Protocol-Governed Computing — installs the full toolchain and reports whether an environment is ready to compile, seal, and execute
5
+ Author-email: Bhash Ganti <bachipeachy@gmail.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://omnibachi.org/
8
+ Project-URL: Repository, https://github.com/protocol-governed-computing
9
+ Project-URL: Standard, https://doi.org/10.5281/zenodo.22150616
10
+ Keywords: protocol-governed-computing,pgc,governance,authorization,sdlc
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Topic :: Software Development :: Compilers
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: pgc-governance==6.0.0
19
+ Requires-Dist: pgc-workloads==6.0.0
20
+ Requires-Dist: pgc-domains==6.0.0
21
+ Requires-Dist: pgc-compiler==6.0.0
22
+ Requires-Dist: pgc-runtime==6.0.0
23
+ Requires-Dist: pgc-assembler==6.0.0
24
+ Requires-Dist: pgc-transport==6.0.0
25
+ Requires-Dist: pgc-inspector==6.0.0
26
+ Requires-Dist: pgc-transformation==6.0.0
27
+ Provides-Extra: blockchain
28
+ Requires-Dist: pgc-domains[blockchain]==6.0.0; extra == "blockchain"
29
+
30
+ # Protocol-Governed Computing
31
+
32
+ **Software that runs only what it has declared, and proves it.**
33
+
34
+ In Protocol-Governed Computing (PGC), declarations decide what a system does. They name who may ask,
35
+ which input is admitted, which steps run, and what each step may touch. PGC compiles the declarations
36
+ and seals them into a **snapshot**. The runtime checks the snapshot is unchanged, executes only what it
37
+ declares, refuses everything else, and records a trace of every run.
38
+
39
+ ## Choose where to start
40
+
41
+ | You want to | Start here |
42
+ |---|---|
43
+ | See PGC run on your machine in a few minutes | [**Demos**](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEMO.md) |
44
+ | Build, run and extend PGC from its parts | [**Developer guide**](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEV.md) |
45
+ | Verify the sealed composition a paper cites | [`pgc_release`](https://github.com/protocol-governed-computing/pgc_release) |
46
+ | Read the standard PGC implements | https://doi.org/10.5281/zenodo.22150616 |
47
+
48
+ ## This package
49
+
50
+ This repository publishes `protocol-governed-computing`, the whole toolchain in one install. It
51
+ brings in the eight component packages, pinned to one composition, and puts the `pgc` command on your
52
+ path.
53
+
54
+ ```bash
55
+ pip install protocol-governed-computing
56
+ ```
57
+
58
+ The toolchain carries no declarations. To build and run a platform, follow the
59
+ [developer guide](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEV.md).
60
+ To see one run without building anything, start with the
61
+ [demos](https://github.com/protocol-governed-computing/pgc_install/blob/main/README_DEMO.md).
62
+
63
+ **Something failed?** Please [open an issue](https://github.com/protocol-governed-computing/pgc_install/issues).
@@ -2,6 +2,7 @@ README.md
2
2
  pyproject.toml
3
3
  pgc/__init__.py
4
4
  pgc/cli.py
5
+ pgc/composition.py
5
6
  protocol_governed_computing.egg-info/PKG-INFO
6
7
  protocol_governed_computing.egg-info/SOURCES.txt
7
8
  protocol_governed_computing.egg-info/dependency_links.txt
@@ -0,0 +1,12 @@
1
+ pgc-governance==6.0.0
2
+ pgc-workloads==6.0.0
3
+ pgc-domains==6.0.0
4
+ pgc-compiler==6.0.0
5
+ pgc-runtime==6.0.0
6
+ pgc-assembler==6.0.0
7
+ pgc-transport==6.0.0
8
+ pgc-inspector==6.0.0
9
+ pgc-transformation==6.0.0
10
+
11
+ [blockchain]
12
+ pgc-domains[blockchain]==6.0.0
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
  # composition takes the full project name. The import package and the console script are unaffected:
8
8
  # a user still runs `pgc`.
9
9
  name = "protocol-governed-computing"
10
- version = "4.0.0"
10
+ version = "6.0.0"
11
11
  description = "Protocol-Governed Computing — installs the full toolchain and reports whether an environment is ready to compile, seal, and execute"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.10"
@@ -24,24 +24,25 @@ classifiers = [
24
24
  "Topic :: Software Development :: Compilers",
25
25
  ]
26
26
 
27
- # The whole family, pinned to one composition. PGC versions the composition:
28
- # the repos release together and the governance closure forces lockstep, so a
29
- # mixed-version install is not a supported configuration.
27
+ # The whole family, pinned to one composition. `compose_release.py` writes these pins from
28
+ # `pgc_release/composition.json`, the record of which version of each distribution the composition
29
+ # holds. Never edit them by hand.
30
30
  dependencies = [
31
- "pgc-compiler==4.0.0",
32
- "pgc-assembler==4.0.0",
33
- "pgc-runtime==4.0.0",
34
- "pgc-inspector==4.0.0",
35
- "pgc-transformation==4.0.0",
36
- "pgc-governance==4.0.0",
37
- "pgc-workloads==4.0.0",
38
- "pgc-domains==4.0.0",
31
+ "pgc-governance==6.0.0",
32
+ "pgc-workloads==6.0.0",
33
+ "pgc-domains==6.0.0",
34
+ "pgc-compiler==6.0.0",
35
+ "pgc-runtime==6.0.0",
36
+ "pgc-assembler==6.0.0",
37
+ "pgc-transport==6.0.0",
38
+ "pgc-inspector==6.0.0",
39
+ "pgc-transformation==6.0.0",
39
40
  ]
40
41
 
41
42
  # The blockchain domain's capability transforms need Keccak-256, which is optional in pgc-domains
42
43
  # for the same reason it is optional there: the core compile path imports none of it.
43
44
  [project.optional-dependencies]
44
- blockchain = ["pgc-domains[blockchain]==4.0.0"]
45
+ blockchain = ["pgc-domains[blockchain]==6.0.0"]
45
46
 
46
47
  [project.scripts]
47
48
  pgc = "pgc.cli:main"
@@ -1,338 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: protocol-governed-computing
3
- Version: 4.0.0
4
- Summary: Protocol-Governed Computing — installs the full toolchain and reports whether an environment is ready to compile, seal, and execute
5
- Author-email: Bhash Ganti <bachipeachy@gmail.com>
6
- License-Expression: Apache-2.0
7
- Project-URL: Homepage, https://omnibachi.org/
8
- Project-URL: Repository, https://github.com/protocol-governed-computing
9
- Project-URL: Standard, https://doi.org/10.5281/zenodo.22150616
10
- Keywords: protocol-governed-computing,pgc,governance,authorization,sdlc
11
- Classifier: Development Status :: 4 - Beta
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Topic :: Software Development :: Compilers
16
- Requires-Python: >=3.10
17
- Description-Content-Type: text/markdown
18
- Requires-Dist: pgc-compiler==4.0.0
19
- Requires-Dist: pgc-assembler==4.0.0
20
- Requires-Dist: pgc-runtime==4.0.0
21
- Requires-Dist: pgc-inspector==4.0.0
22
- Requires-Dist: pgc-transformation==4.0.0
23
- Requires-Dist: pgc-governance==4.0.0
24
- Requires-Dist: pgc-workloads==4.0.0
25
- Requires-Dist: pgc-domains==4.0.0
26
- Provides-Extra: blockchain
27
- Requires-Dist: pgc-domains[blockchain]==4.0.0; extra == "blockchain"
28
-
29
- # pgc_install
30
-
31
- **Protocol-Governed Computing — the whole toolchain in one install.**
32
-
33
- This repository publishes the `protocol-governed-computing` distribution. PyPI prohibits the
34
- short name `pgc`, so the composition carries the full project name; the command it installs is
35
- still `pgc`. It is the composition as *installable
36
- software*, the counterpart to `pgc_release`, which is the same composition as *sealed
37
- evidence* — assembled, immutable, and cited by DOI. The parallel is in role, not in citation:
38
- a release is a thing a paper points at; an install is a thing that changes each version.
39
-
40
- ```bash
41
- pip install protocol-governed-computing
42
- ```
43
-
44
- That brings in the eight component packages of the family, pinned to one composition, and puts
45
- `pgc` on the path. To run the sealed composition a paper cites, rather than build one, see
46
- [`pgc_release`](https://github.com/protocol-governed-computing/pgc_release).
47
-
48
- ## Two steps, not one
49
-
50
- Installing the toolchain installs the machinery, not the declarations that govern it. PGC reads those declarations from the repository named by `PGC_PLATFORM_ROOT` — fail-hard, cwd-independent, with no inference. The wheel supplies the implementation; the repository supplies the governance surface.
51
-
52
-
53
- ```bash
54
- git clone https://github.com/protocol-governed-computing/software_governance
55
- export PGC_PLATFORM_ROOT=$PWD/software_governance
56
- pgc # reports what is installed and whether the anchor resolves
57
- ```
58
-
59
- These two steps establish the working platform: install the toolchain, then point it at its governance surface. The compiler can now resolve and compile the platform. Assembling and executing a snapshot requires additional repositories and anchors, described below.
60
-
61
- ## Who this is for
62
-
63
- Two kinds of work start here, and they diverge after the toolchain is installed.
64
-
65
- **Kicking the tires — you want to see the platform build and run.** Clone the declaration
66
- repositories, compile them, assemble a snapshot, execute a workflow. That is the sequence below,
67
- unmodified.
68
-
69
- **Adding a domain — you trust the platform and want to author against it.** Same sequence, with
70
- your own domain in place of the shipped ones. See *Adding your own domain*.
71
-
72
- A third case is not served here: **verifying the sealed composition a paper cites**. That artifact
73
- is published separately and needs no build — see
74
- [`pgc_release`](https://github.com/protocol-governed-computing/pgc_release).
75
-
76
- **One thing surprises domain authors, so it is worth saying early.** You must clone
77
- `software_governance` even though you never modify it. The wheels give you the toolchain *and* the
78
- platform's capability implementations; they do not give you the governance surface, because
79
- declarations never ship in a wheel. Trusting the platform does not spare you the clone.
80
-
81
- ## Installing a working platform
82
-
83
- A **Profiled Normative Platform** is a composition: a governance surface, one or more
84
- conformance workloads, and the inspection boundary, sealed together under a profile. The
85
- wheels carry implementations; every declaration comes from a cloned repository. Reaching a
86
- snapshot that executes therefore means cloning four repositories and setting the anchors
87
- that tell each build where to read and where to write.
88
-
89
- ### 1. The toolchain
90
-
91
- ```bash
92
- python3.12 -m venv .venv && source .venv/bin/activate
93
- pip install protocol-governed-computing
94
- ```
95
-
96
- ### 2. The declaration repositories
97
-
98
- ```bash
99
- git clone https://github.com/protocol-governed-computing/software_governance
100
- git clone https://github.com/protocol-governed-computing/conformance_workloads
101
- git clone https://github.com/protocol-governed-computing/snapshot_inspector
102
- git clone https://github.com/protocol-governed-computing/.github pgc_github
103
- ```
104
-
105
- `software_governance` is the governance surface. `conformance_workloads` and
106
- `snapshot_inspector` each contribute a domain the reference profile requires.
107
- `.github` carries the snapshot profiles, which are conformance contracts rather than
108
- code and are not published in any wheel.
109
-
110
- ### 3. The anchors
111
-
112
- Six environment variables govern where the toolchain reads and writes.
113
-
114
- | Anchor | Read by | Meaning |
115
- |---|---|---|
116
- | `PGC_PLATFORM_ROOT` | compiler | the governance repository — the directory containing `registry/` |
117
- | `PGC_DOMAIN_ROOTS` | compiler | the domain being compiled — the directory containing `registry/structures/` |
118
- | `PGC_SNAPSHOT_ROOT` | compiler | where compiled projections are written |
119
- | `PGC_SNAPSHOT_ROOT` | runtime | the assembled snapshot to execute — a different meaning; prefer `--snapshot` |
120
- | `PGC_SNAPSHOT_PROFILES` | assembler | the directory holding snapshot profiles |
121
- | `PGC_DATA_ROOT` | runtime | side-effect state and traces — or pass `--data-root` |
122
-
123
- `PGC_DOMAIN_ROOTS` names the directory that directly contains `registry/structures/`, not
124
- the repository above it. For `conformance_workloads` that is the workload directory
125
- (`workloads/collatz`); for `snapshot_inspector` it is the repository root. Pointing it one
126
- level too high is silent — the build config is simply never found.
127
-
128
- `PGC_SNAPSHOT_ROOT` must differ for each domain build. Every layer's output consolidates
129
- into one snapshot root, and verification rejects any file in that root the current build
130
- did not declare. Two domains sharing a root cannot both verify.
131
-
132
- ### 4. Compile each domain
133
-
134
- The platform compiles first: every other domain imports its compiled surface, which is
135
- read from `$PGC_PLATFORM_ROOT/snapshot` regardless of where output is being written.
136
-
137
- ```bash
138
- export PGC_PLATFORM_ROOT=$PWD/software_governance
139
- protocol_compiler compile --structure STRUCTURE_BUILD_PLATFORM_CONFIG_V1
140
- ```
141
-
142
- Then each domain, into its own output root:
143
-
144
- ```bash
145
- PGC_DOMAIN_ROOTS=$PWD/conformance_workloads/workloads/collatz \
146
- PGC_SNAPSHOT_ROOT=$PWD/workload_snapshot \
147
- protocol_compiler compile --structure STRUCTURE_BUILD_WORKLOAD_CONFIG_V0
148
-
149
- PGC_DOMAIN_ROOTS=$PWD/snapshot_inspector \
150
- PGC_SNAPSHOT_ROOT=$PWD/inspection_snapshot \
151
- protocol_compiler compile --structure STRUCTURE_BUILD_INSPECTION_CONFIG_V0
152
- ```
153
-
154
- Each run reports its stages, artifact count, and whether the result verified and attested.
155
-
156
- ### 5. Assemble and seal
157
-
158
- `--source` is repeatable and takes one compiled root per domain. The profile is the
159
- conformance contract the assembled snapshot claims.
160
-
161
- ```bash
162
- export PGC_SNAPSHOT_PROFILES=$PWD/pgc_github/snapshot_profiles
163
-
164
- snapshot_assembler assemble \
165
- --source $PWD/software_governance/snapshot/compiled \
166
- --source $PWD/workload_snapshot/compiled \
167
- --source $PWD/inspection_snapshot/compiled \
168
- --out $PWD/snapshot \
169
- --profile GOVERNANCE_SURFACE_PROFILE_V0
170
- ```
171
-
172
- A conformant assembly reports the domains composed, the snapshot id, a round-trip verify,
173
- and composition conformance over the artifacts it sealed.
174
-
175
- ### 6. Boot and execute
176
-
177
- ```bash
178
- protocol_runtime boot --snapshot $PWD/snapshot
179
-
180
- protocol_runtime run \
181
- --wf workload::WF_COLLATZ_CONJECTURE_V0 \
182
- --payload $PWD/conformance_workloads/workloads/collatz/test_payloads/01_happy_path.json \
183
- --snapshot $PWD/snapshot \
184
- --data-root $PWD/data
185
- ```
186
-
187
- `boot` loads and hash-verifies every domain in the manifest before anything executes. The
188
- payloads are declarations and live in the cloned repository, not in a wheel.
189
-
190
- ## Adding your own domain
191
-
192
- A domain is a directory the compiler is pointed at. It declares what it contributes, compiles against
193
- the platform's compiled surface, and composes into a snapshot alongside it. You author it; nothing
194
- generates it for you.
195
-
196
- The smallest domain that admits a request, does work, and returns a result is **six files producing
197
- seventeen artifacts**. `.github/process/domain_authoring.py` builds exactly that from scratch on every
198
- regression run, so what follows is executed rather than described.
199
-
200
- **The shape.**
201
-
202
- ```
203
- your_domain/
204
- registry/
205
- structures/STRUCTURE_BUILD_YOUR_DOMAIN_CONFIG_V0.md the build manifest
206
- <subdomain>/
207
- actors/AC_*.md intents/IN_*.md workflows/WF_*.md
208
- capability_contracts/CC_*.md capability_transforms/CT_*.md
209
- implementation/
210
- capability_transforms/atoms/*.py one module per CT, each exposing execute(inputs, context)
211
- ```
212
-
213
- **The build manifest.** Three parts of it are easy to get wrong, and each fails in its own way:
214
-
215
- ```yaml
216
- fqdn: your_domain::STRUCTURE_BUILD_YOUR_DOMAIN_CONFIG_V0
217
- artifact_kind: STRUCTURE
218
- version: V0
219
- governed_by: structure::CONSTITUTION_STRUCTURE_V0
220
- authority: pgc.platform
221
- concern: your_domain
222
- structure_scope: your_domain # names the composed domain — see below
223
- reuse_visibility: business
224
- core:
225
- summary: Build-time STRUCTURE manifest for the your_domain scope
226
- layer_definitions:
227
- YOUR_DOMAIN:
228
- domain_subpath: registry
229
- registry_module: your_domain.registry
230
- implementation_namespace: your_domain.implementation.capability_transforms.atoms
231
- layer_category: domain
232
- identity_rules:
233
- - match: your_domain.registry
234
- namespace: your_domain
235
- artifact_discovery:
236
- search_layers:
237
- - YOUR_DOMAIN
238
- import_surface:
239
- domain: platform # compile against the platform's compiled surface
240
- artifact_types: [AC, IN, WF, CC, CT]
241
- output_configuration:
242
- artifacts:
243
- layer: PROTOCOL_BUILD_ROOT
244
- subpath: compiled/canonical
245
- vocabulary_projection_path: {layer: GOVERNANCE, subpath: compiled/vocabulary}
246
- tokenized_projection_path: {layer: GOVERNANCE, subpath: compiled/tokenized}
247
- evidence_projection_path: {layer: GOVERNANCE, subpath: compiled/evidence}
248
- trust_attestation_path: {layer: GOVERNANCE, subpath: compiled/trust}
249
- visualization_projection_path: {layer: GOVERNANCE, subpath: compiled/visualization}
250
- layer_outputs:
251
- YOUR_DOMAIN:
252
- layer: YOUR_DOMAIN
253
- subpath: compiled/canonical
254
- ```
255
-
256
- **All five projection paths are required.** Omitting them does not fail early: the build passes
257
- discovery, governance and construction and dies at S7 with five `E301_WRITE_FAILED` errors naming
258
- each missing path. It reads like a compiler fault and is a missing declaration.
259
-
260
- **`structure_scope` names the composed domain**, not `layer_category` and not the namespace. Set it
261
- to something generic and the snapshot composes a domain literally called that — the assembly
262
- succeeds, conformance passes, and the domain is simply wrongly named. Nothing catches it.
263
-
264
- **Building it** is step 4 above with your directory in place of a shipped one:
265
-
266
- ```bash
267
- PGC_DOMAIN_ROOTS=$PWD/your_domain \
268
- PGC_SNAPSHOT_ROOT=$PWD/your_domain/snapshot \
269
- protocol_compiler compile --structure STRUCTURE_BUILD_YOUR_DOMAIN_CONFIG_V0
270
- ```
271
-
272
- Then add `--source $PWD/your_domain/snapshot/compiled` to the assemble in step 5. The platform must
273
- be compiled first: `import_surface` reads its compiled vocabulary, and a domain cannot compile
274
- against a surface that does not yet exist.
275
-
276
- **Your domain must be importable at execution time.** The compiler reads declarations from the
277
- filesystem, but the runtime *imports* the module a CT names. If your package is not on the path, the
278
- workflow does not raise — it returns `VIOLATION` with the transform's outputs null, which looks like
279
- a failed business rule rather than a missing module. Either `pip install -e your_domain` or:
280
-
281
- ```bash
282
- export PYTHONPATH=$PWD
283
- ```
284
-
285
- **What you do not need:** `conformance_workloads`. It contributes the collatz workload, which the
286
- profile in force does not require — verified by building this path without it. You still need
287
- `software_governance` for the declarations and `snapshot_inspector` for the inspection domain the
288
- profile does require.
289
-
290
- **A profile permits more than it requires.** Composing your domain alongside the platform does not
291
- violate the claimed profile: a snapshot may carry more than a profile requires and still conform.
292
-
293
- ## Known rough edges
294
-
295
- - **`--all-structures` and `STRUCTURE_BUILD_PLATFORM_CONFIG_V0` do not build.** The `_V0`
296
- config requires a layer the resolver does not map, and `--all-structures` additionally
297
- names domain structures that are not part of the governance surface. Compile
298
- `STRUCTURE_BUILD_PLATFORM_CONFIG_V1` by name.
299
- - **`PGC_BUILD_ROOT` is inert.** It is accepted and reported, and nothing reads it.
300
- `PGC_SNAPSHOT_ROOT` is the anchor that controls compiled output.
301
- - **`PGC_SNAPSHOT_ROOT` carries two meanings** — compiled output to the compiler, assembled
302
- snapshot to the runtime. Pass `--snapshot` to the runtime rather than relying on it.
303
- - **`pgc` reports readiness for the platform compile only.** It reads three anchors and
304
- reports "Ready" once the governance surface resolves; assembly and execution need the
305
- other three.
306
-
307
- ## The family
308
-
309
- | Package | Role |
310
- |---|---|
311
- | `pgc-compiler` | declarations → compiled projections |
312
- | `pgc-assembler` | projections → sealed snapshot |
313
- | `pgc-runtime` | snapshot → governed execution |
314
- | `pgc-inspector` | snapshot → read-only inspection |
315
- | `pgc-transformation` | change request → protocol artifacts |
316
- | `pgc-governance` | the governance surface and its capability implementations |
317
- | `pgc-workloads` | the workloads that make conformance observable |
318
- | `pgc-domains` | the business domain implementations the composed snapshot binds |
319
-
320
- **Versioning.** Two schemes. Each repository's `VERSION` is a monotonic composition ordinal —
321
- internal build accounting, tagged `release-<N>`, never published. `PUBLIC_VERSION` is the platform's
322
- public identity, tagged on every component repository; the platform is at **`v4`**.
323
-
324
- **The published version follows the public one: `v4` opens at `4.0.0`.** The family releases in
325
- lockstep, so the composition pins exact versions rather than ranges.
326
-
327
- A public identity may carry more than one published version. A packaging or distribution defect can
328
- be corrected in a patch release within the same identity, because such a fix changes what a wheel
329
- contains and not what the composition determines. A change to what the composition determines takes
330
- the next public identity, and only that mints a new DOI.
331
-
332
- `v4` is the second kind. The wheels stopped shipping declarations, which is the first; but an
333
- identity published by more than one domain now resolves to its authoring copy rather than to
334
- whichever sorted last, and that changes what the composition answers. A patch release would have
335
- said otherwise.
336
-
337
- The standard these packages implement is a separate artifact on its own track, is not this number,
338
- and is published separately: https://doi.org/10.5281/zenodo.22150616