Metadata-Version: 2.4
Name: szl-trust
Version: 0.1.0
Summary: SZL Holdings Public Trust Portal — Covenant Proof Standard run artifacts, deterministic replay receipts. Doctrine v11 LOCKED (749/14/163)
Author-email: Stephen Lutar <stephen@szlholdings.com>
License-Expression: CC-BY-4.0
Project-URL: Homepage, https://a-11-oy.com
Project-URL: Repository, https://github.com/szl-holdings/szl-trust
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Dynamic: license-file

> **SZL Holdings** · Doctrine v11 · Λ = Conjecture 1 (advisory, never "green"/theorem) · canonical [a-11-oy.com](https://a-11-oy.com)

# szl-trust
<!-- szl:header v1 -->
<!-- Native identity: szl-brand@4309f6fce89179331b0b3ed8c99494e76c5be256; Orbit v2 icon. -->
<p>
  <a href="https://github.com/szl-holdings">
    <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" />
  </a>
</p>

**Control before action. Evidence after.**

[Product](https://a-11-oy.com) · [Proof](https://a11oy.net) · [GitHub organization](https://github.com/szl-holdings)
<!-- /szl:header -->

> **STATUS — ACTIVE HISTORICAL PROOF REGISTRY.** This repository remains the source-of-record for the published trust run artifacts and their offline verification helpers stored here. The former `docs-site` consolidation target is now an archived mirror whose repository metadata points to [`a11oy-net`](https://github.com/szl-holdings/a11oy-net) as the canonical proof-site source. The public proof surface is [a11oy.net](https://a11oy.net). See [`DEPRECATED.md`](./DEPRECATED.md) for the superseded consolidation history; it is not current deprecation authority for this repository.

**SZL Holdings Public Trust Portal** · Doctrine v11 LOCKED (749 / 14 / 163) · CC-BY-4.0

[![CI](https://github.com/szl-holdings/szl-trust/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/szl-holdings/szl-trust/actions/workflows/ci.yml) [![CodeQL](https://github.com/szl-holdings/szl-trust/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/szl-holdings/szl-trust/actions/workflows/codeql.yml) [![SBOM](https://github.com/szl-holdings/szl-trust/actions/workflows/sbom.yml/badge.svg?branch=main)](https://github.com/szl-holdings/szl-trust/actions/workflows/sbom.yml)

[![Doctrine v11](https://img.shields.io/badge/Doctrine-v11_LOCKED-3b82f6?style=flat-square)](https://github.com/szl-holdings/.github/tree/main/doctrine) [![SLSA](https://img.shields.io/badge/SLSA-L1_honest-eab308?style=flat-square)](https://slsa.dev/spec/v1.0/levels) [![License: CC-BY-4.0](https://img.shields.io/badge/license-CC--BY--4.0-C8B26A?style=flat-square)](./LICENSE)

[![DOI 10.5281/zenodo.20434276 (v18.0)](https://img.shields.io/badge/DOI-zenodo.20434276_v18.0-5b8dee?style=flat-square&logo=doi)](https://doi.org/10.5281/zenodo.20434276) [![DOI Concept (always-latest)](https://zenodo.org/badge/DOI/10.5281/zenodo.24239896.svg)](https://doi.org/10.5281/zenodo.24239896)

> **Source-of-truth note (2026-09-22):** The June `docs-site` copy is historical. `szl-trust` owns the published historical artifact bytes and verification material in this repository; `a11oy-net` owns the current proof-site source and deployment evidence for `a11oy.net`. A copied or archived mirror does not establish current runtime alignment.

---

A measurable governance operator on the receipt-bus σ-algebra of agentic AI — publishing
Covenant Proof Standard run artifacts from experiment executions that the run producer flagged
`mocked:false`, with evidence chains for external auditability.

## What this is

**szl-trust** is the public transparency layer of the SZL Holdings governed AI platform.
It publishes Covenant Proof Standard (CPS) run artifacts — hash-chained, cryptographically
verifiable governance receipts from experiment executions flagged `mocked:false` by the run
producer. The canonical reference run
is the **E4 Codex Kernel (2026-04-29)**: 12 receipts, all `mocked:false`, 12 proof ledger
steps, 12 trace spans in `trace.jsonl` (all validators PASS), with a `deployment_contract.json` anchoring the full
run to a specific `repo_commit`. `mocked:false` is a flag the producer sets; on its own it does
not show how the run was executed. The run's `version_lineage.json` records
`model_provider: proxy_or_offline_emulator` and `model_version: deterministic`.

External auditors, partners, and regulators can verify every decision without SZL tooling.

## Quickstart

Receipts are plain JSON, verifiable without any SZL tooling:

```bash
git clone https://github.com/szl-holdings/szl-trust
cd szl-trust

# Inspect the E4 Codex Kernel run
cat runs/E4-codex-kernel-2026-04-29/run_manifest.json | jq '.deliverables'
cat runs/E4-codex-kernel-2026-04-29/proof_ledger.jsonl | head -3 | jq '.'

# Verify mocked:false on all receipts
cat runs/E4-codex-kernel-2026-04-29/trace.jsonl | jq '[.decision_receipt.mocked] | unique'
# → [false]
```

## E4 Codex Kernel run at a glance

| Metric | Value |
|--------|-------|
| Run ID | `E4-codex-kernel-governed-loop-unified-replit-all-in-one` |
| Date | 2026-04-29 |
| Receipts | 12 (`mocked:false` on all) |
| Proof ledger steps | 12 (hash-chained, covenant-v1) |
| Span IDs in trace | 12 spans (all validators PASS) |
| Policy version | `covenant-v1` |
| Repo commit | `7eb623f8b870128e615ac6be9880e0265204b454` |

## Key files

| Path | Role |
|------|------|
| `runs/E4-codex-kernel-2026-04-29/run_manifest.json` | Run manifest — payload hash, ledger digest, deliverable SHAs |
| `runs/E4-codex-kernel-2026-04-29/proof_ledger.jsonl` | 12-step hash-chained proof ledger |
| `runs/E4-codex-kernel-2026-04-29/trace.jsonl` | 12 execution spans — all `mocked:false` |
| `runs/E4-codex-kernel-2026-04-29/deployment_contract.json` | Deployment contract (platform: replit, repo_commit anchored) |
| `runs/E4-codex-kernel-2026-04-29/decision_receipt.json` | Canonical decision receipt |
| `ops/evidence-snapshot-worker/` | Cloudflare Worker source for `GET https://api.a-11-oy.com/v1/evidence-snapshot`. The SKU is offered in source (`OFFERED = true`); the origin does not return an `accepts` list. |
| `ops/revenue-tracker-worker/` | `szl-revenue-tracker` Worker: records only verified `PAYMENT-CONTEXT` authorizations and origin-reported settlements; no route by default |

## Honesty scope

- **Not a live execution system.** Read-only audit artifact registry — publishes receipts, does not execute AI decisions.
- **Not independently sufficient for trust.** Receipts should be verified against the Ouroboros runtime.
- **Not a general-purpose blockchain ledger.** JSON artifacts anchored by Merkle roots; Cardano anchoring (via the receipt-minting layer) is separate.
- **SLSA L1 honest** — provenance generated; **L2/L3 not claimed**.
- **Λ-uniqueness = Conjecture 1** (not a theorem).
- No FedRAMP / Iron Bank / CMMC claims.

## Related

| Repo | Role |
|------|------|
| [ouroboros](https://github.com/szl-holdings/ouroboros) | Runtime that generates the receipts |
| [lutar-lean](https://github.com/szl-holdings/lutar-lean) | Lean 4 proofs — 749 decls / 14 unique axioms (15 raw, 1 dup) / 163 sorries @ c7c0ba17 |
| [a11oy](https://github.com/szl-holdings/a11oy) | Flagship governance app |
| [a11oy-net](https://github.com/szl-holdings/a11oy-net) | Current proof-site source and deployment evidence for `a11oy.net` |
| [docs-site](https://github.com/szl-holdings/docs-site) | Archived historical documentation mirror; not current proof authority |

## Citation

See [CITATION.cff](./CITATION.cff). Preferred: [The Ouroboros Substrate (v18.0)](https://doi.org/10.5281/zenodo.20434276), DOI 10.5281/zenodo.20434276.

## License

[CC-BY-4.0](./LICENSE). Artifacts may be used and redistributed with attribution to SZL Holdings.
Security disclosures: [security@szlholdings.com](mailto:security@szlholdings.com) — see [SECURITY.md](./SECURITY.md).

---

*Doctrine v11 LOCKED · 749/14/163 · kernel c7c0ba17 · Λ = Conjecture 1 · SLSA L1 honest*

Signed-off-by: stephenlutar2-hash <stephenlutar2@gmail.com>

## One-click buyer verification

Run `verify.sh` to verify a receipt from this repo in under 30 seconds — no SZL tooling required:

```bash
# Clone and run
git clone https://github.com/szl-holdings/szl-trust
cd szl-trust
chmod +x verify.sh
./verify.sh
```

The script:
1. Fetches the org cosign public key from [szl-lake](https://huggingface.co/datasets/SZLHOLDINGS/szl-lake)
2. Fetches `decision_receipt.json` from the E4 run in this repo
3. Confirms the receipt carries `mocked:false` (a flag set by the run producer)
4. Recomputes SHA-256 of the decoded payload
5. Attempts ECDSA-P256 DSSE signature verification against the cosign public key
6. Probes Lean-kernel liveness against the ROADMAP HF Space `SZLHOLDINGS/lean-kernel` (not yet deployed — the probe reports unreachable and is non-fatal). Live governed-kernel artifacts: [SZLHOLDINGS/szl-kernels](https://huggingface.co/SZLHOLDINGS/szl-kernels)

Expected verdict line when the `mocked:false` check passes: `✓  VERIFIED — receipt is flagged mocked:false by its producer`

**Honest limits:** DSSE signing is `PLACEHOLDER` when `HATUN_MCP_SIGNING_KEY` is unset at
runtime — the receipt will say so honestly (never fabricates a signature). Trust ceiling = 0.97
(never 1.0 by doctrine). Λ = Conjecture 1 (advisory, not a theorem).

To verify the DSSE sig with cosign directly:
```bash
cosign verify-blob \
  --key /tmp/szl_cosign.pub \
  --bundle runs/E4-codex-kernel-2026-04-29/cosign-bundle.json \
  runs/E4-codex-kernel-2026-04-29/decision_receipt.json
```

## Source-manifest structure check

```bash
python3 scripts/validate_source_manifest.py docs/source-manifest.example.json
python3 -m unittest discover -s tests -p test_validate_source_manifest.py -v
```

The validator rejects duplicate JSON members (including nested source and proof
fields), non-finite numbers, and invalid required structure. Exit `0` and the
`DECLARED` message mean structural validation only. Historical and unbound
inventory records can remain in a structurally valid manifest.
Producer-supplied proof booleans, signer names, and source revisions are
declarations; this checker does not verify their authenticity, freshness, served
bytes, signatures, or execution authority. It never grants admission or changes
the status of the recorded assets. Malformed JSON exits `2`; schema errors exit
`1`.

## Offline chain-integrity check (no network, no SZL tooling)

`scripts/verify_chain.py` verifies the **internal consistency** of a published
run entirely offline (Python 3 standard library only — no deps, no network):

```bash
python3 scripts/verify_chain.py            # verify every run under runs/
python3 scripts/verify_chain.py runs/E4-codex-kernel-2026-04-29
```

It is **fail-closed**: a malformed / truncated JSON record, a step gap or
reorder, a broken hash-chain link, a ledger↔trace state-binding mismatch, a
receipt-id disagreement, a non-boolean `mocked` posture, or a manifest anchor
that does not match the final ledger state each cause a non-zero exit — nothing
is silently skipped. The adversarial suite in `tests/test_verify_chain.py`
(run: `python3 -m unittest discover -s tests`) mutates a copy of the real E4
artifacts and asserts every such tampering is rejected.

Duplicate JSON member names are rejected in every ledger, trace, manifest, and
optional final-receipt object, including nested objects, identical values, and
escaped spellings that decode to the same name. This prevents a parser's
last-value-wins behavior from silently hiding conflicting artifact fields.

State hashes in the ledger, trace (previous and next), and manifest anchor must
be 32-character lowercase hexadecimal strings, matching the historical E4 run
format. Nulls, non-string values, and malformed hash strings are rejected before
comparison. Every span after the first must link to its predecessor; the first
previous-state hash is checked for format but has no external genesis anchor.
This format check does not identify a hash algorithm or establish authenticity.

**Honest scope:** this is **advisory tamper-evidence** — it shows the published
artifacts are self-consistent (any edit to one record breaks a cross-referenced
invariant), **not** a proof of authenticity. It does not assert the state hashes
were produced by a trusted signer and never fabricates a signature. Λ =
Conjecture 1 (advisory). Trust ceiling 0.97 — never 1.0 by doctrine.

## x402 `PAYMENT-CONTEXT` validators (offline; nothing here charges)

This repository holds the estate's two `PAYMENT-CONTEXT` validators for
Cloudflare Monetization Gateway: `scripts/x402_payment_context.py` (Python)
and `ops/evidence-snapshot-worker/src/payment-context.mjs` (Workers runtime).
They share one contract and the vectors in
`tests/vectors/x402-payment-context.v1.json`, which
`tools/x402_payment_context_vectors.py` generates from test-only keys. The
validator in `governed-receipt-spec` (`science_evidence/payment.py`) is
deprecated in favour of these.

The caller must state the route's scheme and price: an `exact` context must
sign exactly that amount and an `upto` maximum may not exceed it, so a payment
made under a cheaper rule is rejected. Leeway is 5 seconds by default and at
most 30. Keys come only from the pinned JWKS, and a key set that cannot be
fetched fails closed.

```bash
python3 -m unittest discover -s tests -p 'test_x402_*.py' -v
python3 tools/x402_payment_context_vectors.py --check
(cd ops/evidence-snapshot-worker && npm ci && npm test)
```

In this repository they are wired only to the evidence snapshot. Owner decision
(2026-11-12): that route is `https://api.a-11-oy.com/v1/evidence-snapshot` and
the apex stays free. The SKU is offered in source (`OFFERED = true`). Gateway
rule `8f6c7d526b7c4a42a1075671898474b9` is the exact `$1.00` rule and should be
re-enabled after merge and Worker redeploy. The origin does not return HTTP 402
(see `docs/monetization/evidence-snapshot-activation-2026-11-02.md`).
