szl-gov 0.1.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 (49) hide show
  1. szl_gov-0.1.0/LICENSE +201 -0
  2. szl_gov-0.1.0/NOTICE +31 -0
  3. szl_gov-0.1.0/PKG-INFO +195 -0
  4. szl_gov-0.1.0/README.md +180 -0
  5. szl_gov-0.1.0/pyproject.toml +34 -0
  6. szl_gov-0.1.0/setup.cfg +4 -0
  7. szl_gov-0.1.0/szl_gov.egg-info/PKG-INFO +195 -0
  8. szl_gov-0.1.0/szl_gov.egg-info/SOURCES.txt +47 -0
  9. szl_gov-0.1.0/szl_gov.egg-info/dependency_links.txt +1 -0
  10. szl_gov-0.1.0/szl_gov.egg-info/requires.txt +1 -0
  11. szl_gov-0.1.0/szl_gov.egg-info/top_level.txt +1 -0
  12. szl_gov-0.1.0/tests/test_audit_data_builder.py +71 -0
  13. szl_gov-0.1.0/tests/test_bootstrap_signing_key.py +94 -0
  14. szl_gov-0.1.0/tests/test_dependency_pins.py +29 -0
  15. szl_gov-0.1.0/tests/test_forbidden_domain_gate.py +84 -0
  16. szl_gov-0.1.0/tests/test_ledgers_reproducible.py +45 -0
  17. szl_gov-0.1.0/tests/test_lexicon_gate_scope.py +33 -0
  18. szl_gov-0.1.0/tests/test_pr_source_binding.py +30 -0
  19. szl_gov-0.1.0/tests/test_pricing_catalog.py +430 -0
  20. szl_gov-0.1.0/tests/test_public_only_inventory.py +185 -0
  21. szl_gov-0.1.0/tests/test_pypi_trusted_publisher_contract.py +66 -0
  22. szl_gov-0.1.0/tests/test_release_gate.py +122 -0
  23. szl_gov-0.1.0/tests/test_spaces_gate_coverage.py +85 -0
  24. szl_gov-0.1.0/tests/test_tier_spaces_evidence.py +49 -0
  25. szl_gov-0.1.0/tests/test_verify_receipt_cli.py +122 -0
  26. szl_gov-0.1.0/tests/test_x402_challenge_receipt.py +199 -0
  27. szl_gov-0.1.0/tests/test_x402_post_method_watch.py +159 -0
  28. szl_gov-0.1.0/tests/test_x402_public_policy_watch.py +175 -0
  29. szl_gov-0.1.0/tests/test_x402_public_policy_workflow.py +39 -0
  30. szl_gov-0.1.0/tests/test_x402_public_probe.py +257 -0
  31. szl_gov-0.1.0/tools/__init__.py +8 -0
  32. szl_gov-0.1.0/tools/audit_data_builder.py +186 -0
  33. szl_gov-0.1.0/tools/build_bom.py +115 -0
  34. szl_gov-0.1.0/tools/build_ledgers.py +288 -0
  35. szl_gov-0.1.0/tools/lexicon_gate.py +86 -0
  36. szl_gov-0.1.0/tools/pricing_catalog.py +1000 -0
  37. szl_gov-0.1.0/tools/public_snapshot.py +85 -0
  38. szl_gov-0.1.0/tools/receipt.py +191 -0
  39. szl_gov-0.1.0/tools/release_gate.py +178 -0
  40. szl_gov-0.1.0/tools/spaces_gate.py +134 -0
  41. szl_gov-0.1.0/tools/szl_master_bootstrap.py +218 -0
  42. szl_gov-0.1.0/tools/test_receipt.py +199 -0
  43. szl_gov-0.1.0/tools/tier_spaces.py +143 -0
  44. szl_gov-0.1.0/tools/verify_receipt.py +118 -0
  45. szl_gov-0.1.0/tools/x402_challenge_receipt.py +273 -0
  46. szl_gov-0.1.0/tools/x402_post_method_watch.py +183 -0
  47. szl_gov-0.1.0/tools/x402_public_policy_watch.py +164 -0
  48. szl_gov-0.1.0/tools/x402_public_probe.py +232 -0
  49. szl_gov-0.1.0/tools/yamlite.py +87 -0
szl_gov-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
szl_gov-0.1.0/NOTICE ADDED
@@ -0,0 +1,31 @@
1
+ szl-gov — estate truth layer
2
+ Copyright 2026 Lutar, Stephen P. — SZL Holdings
3
+
4
+ This product includes software developed by SZL Holdings.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+
18
+ --------------------------------------------------------------------------------
19
+ KEY MATERIAL
20
+
21
+ keys/szl-audit-ed25519.pub.pem is a PUBLIC verification key, published so third
22
+ parties can verify estate audit receipts offline. No private key material is
23
+ present in this repository, and none may ever be committed to it.
24
+
25
+ VERIFICATION BOUNDARY
26
+
27
+ A signed estate-audit receipt proves integrity and origin of the audit record —
28
+ that these values were observed and signed at that time. It does NOT prove the
29
+ estate is secure, compliant, or correct. Λ = Conjecture 1 (advisory; uniqueness
30
+ open) — never "proven trust." Absent evidence is reported as UNKNOWN, never
31
+ converted into a pass.
szl_gov-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,195 @@
1
+ Metadata-Version: 2.4
2
+ Name: szl-gov
3
+ Version: 0.1.0
4
+ Summary: Estate truth layer: signed, offline-verifiable audit of the SZL estate + gates that keep it honest
5
+ Author-email: Stephen Lutar <stephen@szlholdings.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://a-11-oy.com
8
+ Project-URL: Repository, https://github.com/szl-holdings/szl-gov
9
+ Requires-Python: >=3.11
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Requires-Dist: cryptography==50.0.2
14
+ Dynamic: license-file
15
+
16
+ # szl-gov — estate truth layer
17
+ <!-- szl:header v1 -->
18
+ <!-- Native identity: szl-brand@4309f6fce89179331b0b3ed8c99494e76c5be256; Orbit v2 icon. -->
19
+ <p>
20
+ <a href="https://github.com/szl-holdings">
21
+ <img src="https://raw.githubusercontent.com/szl-holdings/szl-brand/4309f6fce89179331b0b3ed8c99494e76c5be256/kit/logos/orbit-v2/suite/szl-icon-32.svg" alt="SZL Holdings — Orbit v2" width="32" height="32" />
22
+ </a>
23
+ </p>
24
+
25
+ **Control before action. Evidence after.**
26
+
27
+ [Product](https://a-11-oy.com) · [Proof](https://a11oy.net) · [GitHub organization](https://github.com/szl-holdings)
28
+ <!-- /szl:header -->
29
+
30
+ Signed, offline-verifiable audit of the SZL estate, plus the gates that keep it honest.
31
+
32
+ szl-gov holds a dated, public-only snapshot of the `szl-holdings` GitHub organization and the
33
+ `SZLHOLDINGS` Hugging Face organization (captured 2026-08-30), the ledgers generated from it
34
+ (inventory, claims, commercial, contradictions, model BOM, dataset licenses, Space tiering), a
35
+ DSSE/Ed25519-signed `GovernedAction/v1` receipt for that audit with an offline verifier, and three
36
+ gates whose non-zero exit codes are the open checklist. Pure Python, one runtime dependency
37
+ (`cryptography`, pinned identically in `requirements.txt` and `pyproject.toml`).
38
+
39
+ ## Install
40
+
41
+ ```bash
42
+ python3 -m venv .venv && . .venv/bin/activate
43
+ pip install -r requirements.txt pytest
44
+ ```
45
+
46
+ CI runs Python 3.11 and 3.12; the suites also pass on 3.13.
47
+
48
+ ## Run it
49
+
50
+ ```bash
51
+ python3 tools/verify_receipt.py receipts/audit-receipt-2026-08-30.dsse.json keys/szl-audit-ed25519.pub.pem
52
+ python3 tools/verify_receipt.py receipts/audit-receipt-2026-08-30.dsse.json keys/szl-audit-ed25519.pub.pem --evidence-root .
53
+ python3 tools/lexicon_gate.py # honesty gate (exit 5 = banned phrasing)
54
+ python3 tools/spaces_gate.py # spaces tiering gate (exit 2/3)
55
+ python3 tools/release_gate.py # raise gate (exit 6 = blocked/unattested/invalid ledgers)
56
+ python3 tools/build_ledgers.py && python3 tools/tier_spaces.py # rebuild the ledgers from the snapshot
57
+ ```
58
+
59
+ Today these exit 0, 2, 0, 3, 6 and 0. Rebuilt ledgers are byte-identical to the committed ones
60
+ (`tests/test_ledgers_reproducible.py`).
61
+
62
+ Per-call (x402) prices live in one place, [`pricing/catalog.yaml`](pricing/README.md). Both of
63
+ these exit 0 today; the first fails on any disagreement with the exported gateway rules:
64
+
65
+ ```bash
66
+ python3 tools/pricing_catalog.py check --rules pricing/snapshots/monetization-rules-2026-11-12.redacted.json
67
+ python3 tools/pricing_catalog.py generate --check # manifest, /pricing table, README snippets
68
+ ```
69
+
70
+ **Developer / investor payment evidence:** the [public GET route-policy witness](docs/X402_CHALLENGE_READBACK.md)
71
+ and [unsigned POST method witness](docs/X402_POST_METHOD_WITNESS.md) separately
72
+ test Cloudflare challenge delivery; both are Python, bounded and fail-closed.
73
+ The POST tool is opt-in (`--execute`) and issues only two deliberately invalid
74
+ requests. A correct HTTP 402 is **not** an authorized payment, fulfillment,
75
+ settlement or revenue. Neither witness uses a wallet or calls a facilitator.
76
+
77
+ **Python package publication:** [PyPI trusted-publisher release admission](docs/PYPI_RELEASE_ADMISSION.md)
78
+ provides an OIDC-only, pinned, tag-and-version-bound release gate for
79
+ `szl-gov`. The distribution is **not public on PyPI yet** (HTTP 404 observed
80
+ November 17, 2026); building a wheel or passing CI is not publication.
81
+
82
+ ```bash
83
+ python3 -m pytest -q tests/test_x402_post_method_watch.py
84
+ python3 tools/x402_post_method_watch.py --execute \
85
+ --output /secure/local/x402-post-method.json
86
+ ```
87
+
88
+ The verifier exits 0 when the signature is valid, 1 when it is not (or the payload is not a
89
+ `GovernedAction/v1` in-toto Statement), and, with `--evidence-root`, 2 when a recorded evidence
90
+ digest does not match its file. It exits 2 on this checkout: the receipt records sha256 digests for
91
+ `audit_data/gh_repos.json` and `audit_data/hf_org_listing.json` as originally captured, and [#16](https://github.com/szl-holdings/szl-gov/pull/16)
92
+ later rewrote both to public rows only. The signature is intact; the evidence binding needs a
93
+ receipt re-signed by the key holder over the current files.
94
+
95
+ ```bash
96
+ python3 tools/szl_master_bootstrap.py --run # key holder only: ledgers + signed receipt + all gates
97
+ ```
98
+
99
+ The bootstrap signs with the private key in `../szl-gov-keys/` (outside the repo) whose public half
100
+ is `keys/szl-audit-ed25519.pub.pem`. Without that key, or with a different one, it refuses with
101
+ exit 7 and writes nothing. `--new-key` rotates the published identity on purpose, and only when no
102
+ key exists there yet.
103
+
104
+ Space readiness requires one recognized tier decision for every public Space
105
+ in the captured inventory, bound by its full `path`. Missing, duplicate,
106
+ unknown, or malformed tier rows block readiness (exit 2). Non-public rows are
107
+ withheld and counted; flagship attestation and Docker billing checks still apply.
108
+
109
+ The flagship tests use committed evidence only. The deployment test passes when the Hub-reported
110
+ `runtime.sha` equals the source revision; stage RUNNING is not evidence. The mobile smoke test is
111
+ UNKNOWN for every Space because no mobile-UA capture was committed. 0 of 5 flagships pass all 8.
112
+
113
+ ## Test
114
+
115
+ ```bash
116
+ pytest -q tests # 91 tests (CI: base-python-ci)
117
+ python3 tools/test_receipt.py # 15 receipt contract tests (CI: Repository truth checks)
118
+ ```
119
+
120
+ ## What's here
121
+
122
+ | Path | What |
123
+ |---|---|
124
+ | `tools/receipt.py` | GovernedAction/v1 predicate, in-toto Statement, DSSE Ed25519 sign/verify |
125
+ | `tools/build_ledgers.py` | generates the four ledgers from the audit snapshot |
126
+ | `tools/tier_spaces.py` | applies the 8 flagship tests to every public Space (7 in the snapshot) -> `spaces_tiering.json` |
127
+ | `tools/build_bom.py` | Model BOM + Dataset License Register (diligence deliverables) |
128
+ | `tools/lexicon_gate.py`, `tools/spaces_gate.py`, `tools/release_gate.py` | the three gates (exit codes above) |
129
+ | `tools/szl_master_bootstrap.py` | key holder's one command: ledgers + signed receipt + gates |
130
+ | `tools/verify_receipt.py` | offline verifier — the artifact a CISO runs; `--evidence-root` also checks evidence digests |
131
+ | `tools/public_snapshot.py` | reduces a fresh API capture to public rows before commit; other rows are kept only as counts in `audit_data/withheld_private_counts.json` |
132
+ | `audit_data/` | the 2026-08-30 snapshot: public-only API captures, README captures and Hub probes for the 7 public Spaces |
133
+ | `ledgers/` | ESTATE_INVENTORY / CLAIMS / COMMERCIAL (25 metrics, all blocking the raise; 19 UNKNOWN) / CONTRADICTION_REGISTER / MODEL_BOM / DATASET_LICENSE_REGISTER / spaces_tiering.json |
134
+ | `patches/` | proposed `models:` front-matter READMEs for 3 backlink-gap Spaces, written against the 2026-08-30 READMEs. Stale: some Spaces they link no longer exist; regenerate before applying (needs a write-scoped HF token) |
135
+ | `receipts/` | DSSE-signed receipt for this audit, completeness INCOMPLETE (honest) |
136
+ | `pricing/catalog.yaml` | the canonical per-call (x402) price catalog: every price the Cloudflare Monetization Gateway charges, checked against an exported rules snapshot (`pricing/snapshots/`); see [pricing/README.md](pricing/README.md) |
137
+ | `tools/pricing_catalog.py` | `check` the catalog against a rules export, `generate` the x402 manifest, the a-11-oy.com/pricing per-call table and README snippets (`pricing/generated/`), `redact` an export before commit |
138
+ | `commercial/index.html` | the 2026-08-30 hypothesis pricing page; that list was withdrawn from a11oy.net on 2026-09-27 ([a11oy-net#231](https://github.com/szl-holdings/a11oy-net/pull/231)) and is kept here as history |
139
+ | `docs/ARTICLE_12_CONFORMANCE.yaml` | machine-readable Article 12 logging conformance profile (a profile, not a compliance claim) |
140
+ | `SZL_MASTER_PAYLOAD.md` | the Codex build directive |
141
+ | `docs/positioning/AUTO_REVIEW_DELTA.md` | Codex auto-review comparison, 12 rows |
142
+
143
+ ## Ground truth (2026-08-30 snapshot)
144
+
145
+ 98 GitHub repos (59 active public · 34 archived public · 5 private, counted only) · 45 HF Spaces (28 Docker, 7 public) · 43 models · 36 datasets — the counts in `ledgers/ESTATE_INVENTORY.yaml`.
146
+ A same-day GitHub API census quoted here earlier counted 100 repos (36 archived public); its capture is not committed, so the ledgers keep 98.
147
+ Marketed count was 26 Spaces — stale (B-01). Flagship capacity 5, attested 0. <!-- lexicon-ok -->
148
+
149
+ Listings in `audit_data/` and `ledgers/` name public repos, Spaces, models and datasets only. The totals above still include non-public rows, as aggregate counts.
150
+
151
+ The snapshot is dated and the estate has changed since. Refreshing it means re-collecting, running
152
+ `tools/public_snapshot.py`, rebuilding the ledgers and re-signing the receipt.
153
+
154
+ Gates fail on first run by design. The exit codes are the Week 1 checklist.
155
+
156
+ The release gate requires both truth ledgers in the flat YAML format emitted by
157
+ `build_ledgers.py`/`yamlite.py`; unsupported syntax, missing or duplicate fields,
158
+ missing metrics, and ledgers over 1 MiB are refusals. It checks the builder's full
159
+ commercial metric set, honors `blocks_raise`, and requires populated values and
160
+ evidence references. An explicit `contradictions: []` is allowed; an absent or
161
+ empty register is not. These are local ledger consistency checks, not independent
162
+ authentication of the referenced evidence or approval to release.
163
+
164
+ ## What changed 2026-08-30 v2
165
+
166
+ - All 7 public Spaces probed RUNNING with HEAD SHA (`audit_data/probes/`)
167
+ - 45 Spaces tiered: 5 FLAGSHIP (recommended), 38 LAB, 1 SUPPORTING, 1 ORG_CARD (since [#16](https://github.com/szl-holdings/szl-gov/pull/16) the committed tiering lists only the 7 public Spaces — 5 FLAGSHIP, 1 SUPPORTING, 1 ORG_CARD — and counts the other 38)
168
+ - Model BOM: 43/43 license declared (all Apache-2.0), 13/43 base lineage, 12 third-party Qwen bases
169
+ - Dataset license register: 28/36 declared, 8 UNKNOWN (all private — owner must declare)
170
+ - Backlink coverage measured on the Hub at 10/43 models; 3 patches staged, 30 Spaces still need `models:` lines (not reproducible from the public-only snapshot, whose 7 public Space probes declare 12 of the 43 models)
171
+ - Signed receipt v2 includes BOM, license register, tiering as generated_artifact evidence
172
+
173
+ ## What changed 2026-11-06
174
+
175
+ - `forbidden-domain` CI now really scans: its ripgrep call was missing on the runner, and `|| true` reported every run clean
176
+ - `spaces_tiering.json` no longer marks Spaces attested on stage RUNNING or on an unrecorded mobile check (was: 2 "Fully machine-attested")
177
+ - the bootstrap refuses instead of minting a new signing key; the verifier checks statement type and, on request, evidence digests
178
+ - the commercial ledger records the 2026-08-30 price list as withdrawn instead of live
179
+
180
+ ## License
181
+
182
+ Apache-2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).
183
+
184
+ **Key material.** `keys/szl-audit-ed25519.pub.pem` is a **public** verification key,
185
+ published so third parties can verify estate audit receipts offline. No private key
186
+ material is present in this repository, and none may ever be committed to it.
187
+
188
+ **Verification boundary.** A signed estate-audit receipt proves integrity and origin
189
+ of the audit record — that these values were observed and signed at that time. It does
190
+ not prove the estate is secure, compliant, or correct. `--evidence-root` shows whether the
191
+ files in a checkout still match the digests the receipt recorded; a match does not make
192
+ that evidence true. Λ = Conjecture 1 (advisory).
193
+ Absent evidence is reported as UNKNOWN, never converted into a pass.
194
+
195
+ Estate on Hugging Face: models, datasets and Spaces are published under the [SZLHOLDINGS](https://huggingface.co/SZLHOLDINGS) org.
@@ -0,0 +1,180 @@
1
+ # szl-gov — estate truth layer
2
+ <!-- szl:header v1 -->
3
+ <!-- Native identity: szl-brand@4309f6fce89179331b0b3ed8c99494e76c5be256; Orbit v2 icon. -->
4
+ <p>
5
+ <a href="https://github.com/szl-holdings">
6
+ <img src="https://raw.githubusercontent.com/szl-holdings/szl-brand/4309f6fce89179331b0b3ed8c99494e76c5be256/kit/logos/orbit-v2/suite/szl-icon-32.svg" alt="SZL Holdings — Orbit v2" width="32" height="32" />
7
+ </a>
8
+ </p>
9
+
10
+ **Control before action. Evidence after.**
11
+
12
+ [Product](https://a-11-oy.com) · [Proof](https://a11oy.net) · [GitHub organization](https://github.com/szl-holdings)
13
+ <!-- /szl:header -->
14
+
15
+ Signed, offline-verifiable audit of the SZL estate, plus the gates that keep it honest.
16
+
17
+ szl-gov holds a dated, public-only snapshot of the `szl-holdings` GitHub organization and the
18
+ `SZLHOLDINGS` Hugging Face organization (captured 2026-08-30), the ledgers generated from it
19
+ (inventory, claims, commercial, contradictions, model BOM, dataset licenses, Space tiering), a
20
+ DSSE/Ed25519-signed `GovernedAction/v1` receipt for that audit with an offline verifier, and three
21
+ gates whose non-zero exit codes are the open checklist. Pure Python, one runtime dependency
22
+ (`cryptography`, pinned identically in `requirements.txt` and `pyproject.toml`).
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ python3 -m venv .venv && . .venv/bin/activate
28
+ pip install -r requirements.txt pytest
29
+ ```
30
+
31
+ CI runs Python 3.11 and 3.12; the suites also pass on 3.13.
32
+
33
+ ## Run it
34
+
35
+ ```bash
36
+ python3 tools/verify_receipt.py receipts/audit-receipt-2026-08-30.dsse.json keys/szl-audit-ed25519.pub.pem
37
+ python3 tools/verify_receipt.py receipts/audit-receipt-2026-08-30.dsse.json keys/szl-audit-ed25519.pub.pem --evidence-root .
38
+ python3 tools/lexicon_gate.py # honesty gate (exit 5 = banned phrasing)
39
+ python3 tools/spaces_gate.py # spaces tiering gate (exit 2/3)
40
+ python3 tools/release_gate.py # raise gate (exit 6 = blocked/unattested/invalid ledgers)
41
+ python3 tools/build_ledgers.py && python3 tools/tier_spaces.py # rebuild the ledgers from the snapshot
42
+ ```
43
+
44
+ Today these exit 0, 2, 0, 3, 6 and 0. Rebuilt ledgers are byte-identical to the committed ones
45
+ (`tests/test_ledgers_reproducible.py`).
46
+
47
+ Per-call (x402) prices live in one place, [`pricing/catalog.yaml`](pricing/README.md). Both of
48
+ these exit 0 today; the first fails on any disagreement with the exported gateway rules:
49
+
50
+ ```bash
51
+ python3 tools/pricing_catalog.py check --rules pricing/snapshots/monetization-rules-2026-11-12.redacted.json
52
+ python3 tools/pricing_catalog.py generate --check # manifest, /pricing table, README snippets
53
+ ```
54
+
55
+ **Developer / investor payment evidence:** the [public GET route-policy witness](docs/X402_CHALLENGE_READBACK.md)
56
+ and [unsigned POST method witness](docs/X402_POST_METHOD_WITNESS.md) separately
57
+ test Cloudflare challenge delivery; both are Python, bounded and fail-closed.
58
+ The POST tool is opt-in (`--execute`) and issues only two deliberately invalid
59
+ requests. A correct HTTP 402 is **not** an authorized payment, fulfillment,
60
+ settlement or revenue. Neither witness uses a wallet or calls a facilitator.
61
+
62
+ **Python package publication:** [PyPI trusted-publisher release admission](docs/PYPI_RELEASE_ADMISSION.md)
63
+ provides an OIDC-only, pinned, tag-and-version-bound release gate for
64
+ `szl-gov`. The distribution is **not public on PyPI yet** (HTTP 404 observed
65
+ November 17, 2026); building a wheel or passing CI is not publication.
66
+
67
+ ```bash
68
+ python3 -m pytest -q tests/test_x402_post_method_watch.py
69
+ python3 tools/x402_post_method_watch.py --execute \
70
+ --output /secure/local/x402-post-method.json
71
+ ```
72
+
73
+ The verifier exits 0 when the signature is valid, 1 when it is not (or the payload is not a
74
+ `GovernedAction/v1` in-toto Statement), and, with `--evidence-root`, 2 when a recorded evidence
75
+ digest does not match its file. It exits 2 on this checkout: the receipt records sha256 digests for
76
+ `audit_data/gh_repos.json` and `audit_data/hf_org_listing.json` as originally captured, and [#16](https://github.com/szl-holdings/szl-gov/pull/16)
77
+ later rewrote both to public rows only. The signature is intact; the evidence binding needs a
78
+ receipt re-signed by the key holder over the current files.
79
+
80
+ ```bash
81
+ python3 tools/szl_master_bootstrap.py --run # key holder only: ledgers + signed receipt + all gates
82
+ ```
83
+
84
+ The bootstrap signs with the private key in `../szl-gov-keys/` (outside the repo) whose public half
85
+ is `keys/szl-audit-ed25519.pub.pem`. Without that key, or with a different one, it refuses with
86
+ exit 7 and writes nothing. `--new-key` rotates the published identity on purpose, and only when no
87
+ key exists there yet.
88
+
89
+ Space readiness requires one recognized tier decision for every public Space
90
+ in the captured inventory, bound by its full `path`. Missing, duplicate,
91
+ unknown, or malformed tier rows block readiness (exit 2). Non-public rows are
92
+ withheld and counted; flagship attestation and Docker billing checks still apply.
93
+
94
+ The flagship tests use committed evidence only. The deployment test passes when the Hub-reported
95
+ `runtime.sha` equals the source revision; stage RUNNING is not evidence. The mobile smoke test is
96
+ UNKNOWN for every Space because no mobile-UA capture was committed. 0 of 5 flagships pass all 8.
97
+
98
+ ## Test
99
+
100
+ ```bash
101
+ pytest -q tests # 91 tests (CI: base-python-ci)
102
+ python3 tools/test_receipt.py # 15 receipt contract tests (CI: Repository truth checks)
103
+ ```
104
+
105
+ ## What's here
106
+
107
+ | Path | What |
108
+ |---|---|
109
+ | `tools/receipt.py` | GovernedAction/v1 predicate, in-toto Statement, DSSE Ed25519 sign/verify |
110
+ | `tools/build_ledgers.py` | generates the four ledgers from the audit snapshot |
111
+ | `tools/tier_spaces.py` | applies the 8 flagship tests to every public Space (7 in the snapshot) -> `spaces_tiering.json` |
112
+ | `tools/build_bom.py` | Model BOM + Dataset License Register (diligence deliverables) |
113
+ | `tools/lexicon_gate.py`, `tools/spaces_gate.py`, `tools/release_gate.py` | the three gates (exit codes above) |
114
+ | `tools/szl_master_bootstrap.py` | key holder's one command: ledgers + signed receipt + gates |
115
+ | `tools/verify_receipt.py` | offline verifier — the artifact a CISO runs; `--evidence-root` also checks evidence digests |
116
+ | `tools/public_snapshot.py` | reduces a fresh API capture to public rows before commit; other rows are kept only as counts in `audit_data/withheld_private_counts.json` |
117
+ | `audit_data/` | the 2026-08-30 snapshot: public-only API captures, README captures and Hub probes for the 7 public Spaces |
118
+ | `ledgers/` | ESTATE_INVENTORY / CLAIMS / COMMERCIAL (25 metrics, all blocking the raise; 19 UNKNOWN) / CONTRADICTION_REGISTER / MODEL_BOM / DATASET_LICENSE_REGISTER / spaces_tiering.json |
119
+ | `patches/` | proposed `models:` front-matter READMEs for 3 backlink-gap Spaces, written against the 2026-08-30 READMEs. Stale: some Spaces they link no longer exist; regenerate before applying (needs a write-scoped HF token) |
120
+ | `receipts/` | DSSE-signed receipt for this audit, completeness INCOMPLETE (honest) |
121
+ | `pricing/catalog.yaml` | the canonical per-call (x402) price catalog: every price the Cloudflare Monetization Gateway charges, checked against an exported rules snapshot (`pricing/snapshots/`); see [pricing/README.md](pricing/README.md) |
122
+ | `tools/pricing_catalog.py` | `check` the catalog against a rules export, `generate` the x402 manifest, the a-11-oy.com/pricing per-call table and README snippets (`pricing/generated/`), `redact` an export before commit |
123
+ | `commercial/index.html` | the 2026-08-30 hypothesis pricing page; that list was withdrawn from a11oy.net on 2026-09-27 ([a11oy-net#231](https://github.com/szl-holdings/a11oy-net/pull/231)) and is kept here as history |
124
+ | `docs/ARTICLE_12_CONFORMANCE.yaml` | machine-readable Article 12 logging conformance profile (a profile, not a compliance claim) |
125
+ | `SZL_MASTER_PAYLOAD.md` | the Codex build directive |
126
+ | `docs/positioning/AUTO_REVIEW_DELTA.md` | Codex auto-review comparison, 12 rows |
127
+
128
+ ## Ground truth (2026-08-30 snapshot)
129
+
130
+ 98 GitHub repos (59 active public · 34 archived public · 5 private, counted only) · 45 HF Spaces (28 Docker, 7 public) · 43 models · 36 datasets — the counts in `ledgers/ESTATE_INVENTORY.yaml`.
131
+ A same-day GitHub API census quoted here earlier counted 100 repos (36 archived public); its capture is not committed, so the ledgers keep 98.
132
+ Marketed count was 26 Spaces — stale (B-01). Flagship capacity 5, attested 0. <!-- lexicon-ok -->
133
+
134
+ Listings in `audit_data/` and `ledgers/` name public repos, Spaces, models and datasets only. The totals above still include non-public rows, as aggregate counts.
135
+
136
+ The snapshot is dated and the estate has changed since. Refreshing it means re-collecting, running
137
+ `tools/public_snapshot.py`, rebuilding the ledgers and re-signing the receipt.
138
+
139
+ Gates fail on first run by design. The exit codes are the Week 1 checklist.
140
+
141
+ The release gate requires both truth ledgers in the flat YAML format emitted by
142
+ `build_ledgers.py`/`yamlite.py`; unsupported syntax, missing or duplicate fields,
143
+ missing metrics, and ledgers over 1 MiB are refusals. It checks the builder's full
144
+ commercial metric set, honors `blocks_raise`, and requires populated values and
145
+ evidence references. An explicit `contradictions: []` is allowed; an absent or
146
+ empty register is not. These are local ledger consistency checks, not independent
147
+ authentication of the referenced evidence or approval to release.
148
+
149
+ ## What changed 2026-08-30 v2
150
+
151
+ - All 7 public Spaces probed RUNNING with HEAD SHA (`audit_data/probes/`)
152
+ - 45 Spaces tiered: 5 FLAGSHIP (recommended), 38 LAB, 1 SUPPORTING, 1 ORG_CARD (since [#16](https://github.com/szl-holdings/szl-gov/pull/16) the committed tiering lists only the 7 public Spaces — 5 FLAGSHIP, 1 SUPPORTING, 1 ORG_CARD — and counts the other 38)
153
+ - Model BOM: 43/43 license declared (all Apache-2.0), 13/43 base lineage, 12 third-party Qwen bases
154
+ - Dataset license register: 28/36 declared, 8 UNKNOWN (all private — owner must declare)
155
+ - Backlink coverage measured on the Hub at 10/43 models; 3 patches staged, 30 Spaces still need `models:` lines (not reproducible from the public-only snapshot, whose 7 public Space probes declare 12 of the 43 models)
156
+ - Signed receipt v2 includes BOM, license register, tiering as generated_artifact evidence
157
+
158
+ ## What changed 2026-11-06
159
+
160
+ - `forbidden-domain` CI now really scans: its ripgrep call was missing on the runner, and `|| true` reported every run clean
161
+ - `spaces_tiering.json` no longer marks Spaces attested on stage RUNNING or on an unrecorded mobile check (was: 2 "Fully machine-attested")
162
+ - the bootstrap refuses instead of minting a new signing key; the verifier checks statement type and, on request, evidence digests
163
+ - the commercial ledger records the 2026-08-30 price list as withdrawn instead of live
164
+
165
+ ## License
166
+
167
+ Apache-2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).
168
+
169
+ **Key material.** `keys/szl-audit-ed25519.pub.pem` is a **public** verification key,
170
+ published so third parties can verify estate audit receipts offline. No private key
171
+ material is present in this repository, and none may ever be committed to it.
172
+
173
+ **Verification boundary.** A signed estate-audit receipt proves integrity and origin
174
+ of the audit record — that these values were observed and signed at that time. It does
175
+ not prove the estate is secure, compliant, or correct. `--evidence-root` shows whether the
176
+ files in a checkout still match the digests the receipt recorded; a match does not make
177
+ that evidence true. Λ = Conjecture 1 (advisory).
178
+ Absent evidence is reported as UNKNOWN, never converted into a pass.
179
+
180
+ Estate on Hugging Face: models, datasets and Spaces are published under the [SZLHOLDINGS](https://huggingface.co/SZLHOLDINGS) org.
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "szl-gov"
7
+ version = "0.1.0"
8
+ description = "Estate truth layer: signed, offline-verifiable audit of the SZL estate + gates that keep it honest"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "Apache-2.0"
12
+ authors = [{ name = "Stephen Lutar", email = "stephen@szlholdings.com" }]
13
+ dependencies = ["cryptography==50.0.2"] # keep in step with requirements.txt (tests/test_dependency_pins.py)
14
+
15
+ [project.urls]
16
+ Homepage = "https://a-11-oy.com"
17
+ Repository = "https://github.com/szl-holdings/szl-gov"
18
+
19
+ [tool.setuptools]
20
+ packages = ["szl_gov"]
21
+
22
+ [tool.setuptools.package-dir]
23
+ szl_gov = "tools"
24
+
25
+ [tool.szl.release]
26
+ import_names = ["szl_gov"] # wheel top-level import names; the release gate fails if the built wheel differs
27
+
28
+ [tool.ruff]
29
+ line-length = 120
30
+ target-version = "py311"
31
+ extend-exclude = ["build", "dist", ".venv", "node_modules"]
32
+
33
+ [tool.pytest.ini_options]
34
+ minversion = "7.0"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+