pgc-assembler 5.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.
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/NOTICE +1 -1
- {pgc_assembler-5.0.0/pgc_assembler.egg-info → pgc_assembler-6.0.0}/PKG-INFO +11 -10
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/README.md +10 -9
- pgc_assembler-6.0.0/VERSION +1 -0
- pgc_assembler-6.0.0/assembler/VERSION +1 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/assembler/__init__.py +4 -5
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/assembler/core.py +28 -5
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/assembler/indexes.py +6 -9
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0/pgc_assembler.egg-info}/PKG-INFO +11 -10
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/pyproject.toml +1 -1
- pgc_assembler-5.0.0/VERSION +0 -1
- pgc_assembler-5.0.0/assembler/VERSION +0 -1
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/LICENSE +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/MANIFEST.in +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/_build_hook.py +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/assembler/cli.py +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/assembler/conformance.py +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/assembler/signing.py +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/pgc_assembler.egg-info/SOURCES.txt +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/pgc_assembler.egg-info/dependency_links.txt +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/pgc_assembler.egg-info/entry_points.txt +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/pgc_assembler.egg-info/requires.txt +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/pgc_assembler.egg-info/top_level.txt +0 -0
- {pgc_assembler-5.0.0 → pgc_assembler-6.0.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pgc-assembler
|
|
3
|
-
Version:
|
|
3
|
+
Version: 6.0.0
|
|
4
4
|
Summary: PGC snapshot assembler — composes compiled projections into a manifest-pinned executable snapshot (import package: assembler)
|
|
5
5
|
Author-email: Bhash Ganti <bachipeachy@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -118,7 +118,7 @@ Apache-2.0.
|
|
|
118
118
|
| `pgc-assembler` | `snapshot_assembler` | projections → sealed snapshot |
|
|
119
119
|
| `pgc-runtime` | `protocol_runtime` | snapshot → governed execution |
|
|
120
120
|
| `pgc-inspector` | `snapshot_inspector` | snapshot → read-only inspection |
|
|
121
|
-
| `pgc-transformation` | `
|
|
121
|
+
| `pgc-transformation` | `transformation_compilers` | change request → protocol artifacts |
|
|
122
122
|
| `pgc-governance` | `software_governance` | the governance surface and its capability implementations |
|
|
123
123
|
| `pgc-workloads` | `conformance_workloads` | the workloads that make conformance observable |
|
|
124
124
|
| `pgc-domains` | `business_domains` | the business domain implementations the composed snapshot binds |
|
|
@@ -149,15 +149,16 @@ sealed against.
|
|
|
149
149
|
The full sequence, with the repositories it needs, is in
|
|
150
150
|
[`pgc_install`](https://github.com/protocol-governed-computing/pgc_install).
|
|
151
151
|
|
|
152
|
-
**Versioning.** Two
|
|
152
|
+
**Versioning.** Two numbers name two different things.
|
|
153
153
|
|
|
154
|
-
- **
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
- **Published** — this distribution's `version` in `pyproject.toml`. It moves on its own. A release
|
|
155
|
+
that changes this repository bumps it, and a release that leaves the repository unchanged keeps it.
|
|
156
|
+
- **Composition** — the public identity (`v6`, …) names one composition of the whole family.
|
|
157
|
+
`pgc_release` records which version of each distribution that composition holds, and `pgc_install`
|
|
158
|
+
pins exactly those versions.
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
Each repository's `VERSION` file holds the workspace's cycle ordinal, which names the `dev/<N>`
|
|
161
|
+
branch. It is development accounting, and it is never published. The standard the packages
|
|
162
|
+
implement is a separate artifact on its own track, and none of these numbers is its revision.
|
|
162
163
|
|
|
163
164
|
The standard these packages implement is published separately: https://doi.org/10.5281/zenodo.22150616
|
|
@@ -91,7 +91,7 @@ Apache-2.0.
|
|
|
91
91
|
| `pgc-assembler` | `snapshot_assembler` | projections → sealed snapshot |
|
|
92
92
|
| `pgc-runtime` | `protocol_runtime` | snapshot → governed execution |
|
|
93
93
|
| `pgc-inspector` | `snapshot_inspector` | snapshot → read-only inspection |
|
|
94
|
-
| `pgc-transformation` | `
|
|
94
|
+
| `pgc-transformation` | `transformation_compilers` | change request → protocol artifacts |
|
|
95
95
|
| `pgc-governance` | `software_governance` | the governance surface and its capability implementations |
|
|
96
96
|
| `pgc-workloads` | `conformance_workloads` | the workloads that make conformance observable |
|
|
97
97
|
| `pgc-domains` | `business_domains` | the business domain implementations the composed snapshot binds |
|
|
@@ -122,15 +122,16 @@ sealed against.
|
|
|
122
122
|
The full sequence, with the repositories it needs, is in
|
|
123
123
|
[`pgc_install`](https://github.com/protocol-governed-computing/pgc_install).
|
|
124
124
|
|
|
125
|
-
**Versioning.** Two
|
|
125
|
+
**Versioning.** Two numbers name two different things.
|
|
126
126
|
|
|
127
|
-
- **
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
- **Published** — this distribution's `version` in `pyproject.toml`. It moves on its own. A release
|
|
128
|
+
that changes this repository bumps it, and a release that leaves the repository unchanged keeps it.
|
|
129
|
+
- **Composition** — the public identity (`v6`, …) names one composition of the whole family.
|
|
130
|
+
`pgc_release` records which version of each distribution that composition holds, and `pgc_install`
|
|
131
|
+
pins exactly those versions.
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
Each repository's `VERSION` file holds the workspace's cycle ordinal, which names the `dev/<N>`
|
|
134
|
+
branch. It is development accounting, and it is never published. The standard the packages
|
|
135
|
+
implement is a separate artifact on its own track, and none of these numbers is its revision.
|
|
135
136
|
|
|
136
137
|
The standard these packages implement is published separately: https://doi.org/10.5281/zenodo.22150616
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
18
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
18
|
|
@@ -7,12 +7,11 @@ from pathlib import Path
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def _release() -> str:
|
|
10
|
-
"""The
|
|
10
|
+
"""The workspace's cycle ordinal, read from the repo's `VERSION` file.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Never restate it as a literal; two statements of one fact is how they drift apart.
|
|
12
|
+
The ordinal names the development cycle a snapshot was assembled in. It is not the published
|
|
13
|
+
version, which `pyproject.toml` declares on its own. Never restate it as a literal; two
|
|
14
|
+
statements of one fact is how they drift apart.
|
|
16
15
|
"""
|
|
17
16
|
# Source tree and editable installs: the repo-root VERSION is authoritative.
|
|
18
17
|
declared = Path(__file__).resolve().parent.parent / "VERSION"
|
|
@@ -18,7 +18,9 @@ Invariants enforced here:
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
20
|
import hashlib
|
|
21
|
+
import importlib.metadata
|
|
21
22
|
import json
|
|
23
|
+
import re
|
|
22
24
|
import shutil
|
|
23
25
|
import subprocess
|
|
24
26
|
from dataclasses import dataclass
|
|
@@ -196,7 +198,7 @@ def _is_post_seal(rel: str) -> bool:
|
|
|
196
198
|
|
|
197
199
|
|
|
198
200
|
# What an attestation records rather than constitutes, per
|
|
199
|
-
# `cryptographic_trust::
|
|
201
|
+
# `cryptographic_trust::CONSTITUTION_CRYPTOGRAPHIC_TRUST_V0`. The projection binding and the value
|
|
200
202
|
# over it are enforced by the runtime at boot and constitute the composition like any other content;
|
|
201
203
|
# when the signing happened records something *about* it, is read by nothing, and changes on every
|
|
202
204
|
# build. Counting it made a composition's identity a function of when it was built — two compiles of
|
|
@@ -450,16 +452,37 @@ def _git_commit(repo_root: Path | None) -> str:
|
|
|
450
452
|
return "unknown"
|
|
451
453
|
|
|
452
454
|
|
|
455
|
+
def _distribution(repo_root: Path | None) -> tuple[str, str] | None:
|
|
456
|
+
"""The distribution a repo publishes, as its pyproject declares it: `(name, version)`.
|
|
457
|
+
|
|
458
|
+
Read by line rather than parsed as TOML, because `tomllib` is not in every Python this package
|
|
459
|
+
supports. A repo that publishes nothing has no pyproject and records nothing.
|
|
460
|
+
"""
|
|
461
|
+
if repo_root is None or not (repo_root / "pyproject.toml").is_file():
|
|
462
|
+
return None
|
|
463
|
+
text = (repo_root / "pyproject.toml").read_text(encoding="utf-8")
|
|
464
|
+
name = re.search(r'^name\s*=\s*"([^"]+)"', text, re.M)
|
|
465
|
+
version = re.search(r'^version\s*=\s*"([^"]+)"', text, re.M)
|
|
466
|
+
return (name.group(1), version.group(1)) if name and version else None
|
|
467
|
+
|
|
468
|
+
|
|
453
469
|
def _build_provenance(inputs: list[DomainInput], domains: list[dict]) -> dict[str, Any]:
|
|
454
470
|
source_commits: dict[str, str] = {}
|
|
471
|
+
component_versions: dict[str, str] = {}
|
|
455
472
|
for inp in inputs:
|
|
456
473
|
if inp.repo_root is not None:
|
|
457
474
|
source_commits[inp.repo_root.name] = _git_commit(inp.repo_root)
|
|
475
|
+
published = _distribution(inp.repo_root)
|
|
476
|
+
if published:
|
|
477
|
+
component_versions[published[0]] = published[1]
|
|
478
|
+
# The assembler names its own distribution: it is the one component certainly at work here.
|
|
479
|
+
component_versions["pgc-assembler"] = importlib.metadata.version("pgc-assembler")
|
|
458
480
|
compiler_versions = {d["domain"]: d["compiler_version"] for d in domains}
|
|
459
481
|
return {
|
|
460
482
|
"assembler_version": ASSEMBLER_VERSION,
|
|
461
483
|
"assembled_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
|
|
462
484
|
"source_commits": source_commits,
|
|
485
|
+
"component_versions": dict(sorted(component_versions.items())),
|
|
463
486
|
"compiler_versions": compiler_versions,
|
|
464
487
|
}
|
|
465
488
|
|
|
@@ -576,7 +599,7 @@ def assemble(source_roots: list[Path], out_root: Path, profile: str) -> dict[str
|
|
|
576
599
|
# filter (compiler/stages/s1_extract.py): a governance invariant is imported into a domain iff
|
|
577
600
|
# its applies_to_kinds intersects this set and it declares no layer/surface scope.
|
|
578
601
|
# TEST_DATA joined when transform vectors moved into the supplying domain's build
|
|
579
|
-
# (conformance::
|
|
602
|
+
# (conformance::CONSTITUTION_TEST_DATA_V0).
|
|
580
603
|
_DOMAIN_INSTANTIATED = frozenset({"WF", "CC", "CS", "CT", "RB", "AC", "IN", "EV", "TI", "TE", "TEST_DATA"})
|
|
581
604
|
|
|
582
605
|
|
|
@@ -708,9 +731,9 @@ def verify_snapshot(out_root: Path) -> dict[str, Any]:
|
|
|
708
731
|
4. profile — the snapshot claims one, and the profile it claims is the one it was sealed
|
|
709
732
|
against: its declaration digests to the value the identity covers
|
|
710
733
|
|
|
711
|
-
|
|
712
|
-
against attestation —
|
|
713
|
-
who did not build the snapshot (AI-16).
|
|
734
|
+
Every check recomputes from content. Comparing recorded values to recorded values — manifest
|
|
735
|
+
against metadata.json against attestation — is transitive from construction and establishes
|
|
736
|
+
nothing to a party who did not build the snapshot (AI-16).
|
|
714
737
|
|
|
715
738
|
On any failure the snapshot is refused whole (SN-9). There is no partial acceptance.
|
|
716
739
|
"""
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
indexes.py — cross-domain query indexes over the assembled snapshot.
|
|
3
3
|
|
|
4
4
|
Three inspection indexes, built AFTER composition (the assembler is the only point with the full
|
|
5
|
-
federated view of all domains
|
|
5
|
+
federated view of all domains):
|
|
6
6
|
|
|
7
7
|
* artifact_index/index.json — FQDN → domain / kind / owner_subdomain / canonical_path /
|
|
8
8
|
evidence_paths / per-domain addresses. Consumed by `si`.
|
|
@@ -43,14 +43,11 @@ def _authoring_rank(doc: dict) -> int:
|
|
|
43
43
|
capability is executable there, and the authoring stays platform-owned. Both copies are
|
|
44
44
|
canonical and both are legitimate; they are not interchangeable.
|
|
45
45
|
|
|
46
|
-
The binding copy
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
A binding copy also carries the `content_hash` of content it does not hold, which is the sharper
|
|
53
|
-
tell but not one to select on: a hash mismatch is a defect to report, not a discriminator.
|
|
46
|
+
The binding copy records exactly what the authoring copy records, so the two are the same
|
|
47
|
+
document, and `si snapshot validate`'s `republished_copies_agree` refuses any pair that is not.
|
|
48
|
+
An identity resolves to a copy that carries its authored content — `si.artifact.show` promises
|
|
49
|
+
"the published canonical artifact for an FQDN, as authored" — so a copy without content never
|
|
50
|
+
wins over one with it.
|
|
54
51
|
"""
|
|
55
52
|
return 1 if (doc.get("content") or "").strip() else 0
|
|
56
53
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pgc-assembler
|
|
3
|
-
Version:
|
|
3
|
+
Version: 6.0.0
|
|
4
4
|
Summary: PGC snapshot assembler — composes compiled projections into a manifest-pinned executable snapshot (import package: assembler)
|
|
5
5
|
Author-email: Bhash Ganti <bachipeachy@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -118,7 +118,7 @@ Apache-2.0.
|
|
|
118
118
|
| `pgc-assembler` | `snapshot_assembler` | projections → sealed snapshot |
|
|
119
119
|
| `pgc-runtime` | `protocol_runtime` | snapshot → governed execution |
|
|
120
120
|
| `pgc-inspector` | `snapshot_inspector` | snapshot → read-only inspection |
|
|
121
|
-
| `pgc-transformation` | `
|
|
121
|
+
| `pgc-transformation` | `transformation_compilers` | change request → protocol artifacts |
|
|
122
122
|
| `pgc-governance` | `software_governance` | the governance surface and its capability implementations |
|
|
123
123
|
| `pgc-workloads` | `conformance_workloads` | the workloads that make conformance observable |
|
|
124
124
|
| `pgc-domains` | `business_domains` | the business domain implementations the composed snapshot binds |
|
|
@@ -149,15 +149,16 @@ sealed against.
|
|
|
149
149
|
The full sequence, with the repositories it needs, is in
|
|
150
150
|
[`pgc_install`](https://github.com/protocol-governed-computing/pgc_install).
|
|
151
151
|
|
|
152
|
-
**Versioning.** Two
|
|
152
|
+
**Versioning.** Two numbers name two different things.
|
|
153
153
|
|
|
154
|
-
- **
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
- **Published** — this distribution's `version` in `pyproject.toml`. It moves on its own. A release
|
|
155
|
+
that changes this repository bumps it, and a release that leaves the repository unchanged keeps it.
|
|
156
|
+
- **Composition** — the public identity (`v6`, …) names one composition of the whole family.
|
|
157
|
+
`pgc_release` records which version of each distribution that composition holds, and `pgc_install`
|
|
158
|
+
pins exactly those versions.
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
Each repository's `VERSION` file holds the workspace's cycle ordinal, which names the `dev/<N>`
|
|
161
|
+
branch. It is development accounting, and it is never published. The standard the packages
|
|
162
|
+
implement is a separate artifact on its own track, and none of these numbers is its revision.
|
|
162
163
|
|
|
163
164
|
The standard these packages implement is published separately: https://doi.org/10.5281/zenodo.22150616
|
|
@@ -5,7 +5,7 @@ backend-path = ["."]
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "pgc-assembler"
|
|
8
|
-
version = "
|
|
8
|
+
version = "6.0.0"
|
|
9
9
|
description = "PGC snapshot assembler — composes compiled projections into a manifest-pinned executable snapshot (import package: assembler)"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.10"
|
pgc_assembler-5.0.0/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
17
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
17
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|