Skip to main content

rigorix-verifier (Python)

Strategy A parity for the Rigorix signed audit trail: an independent, protocol-only verifier so a Python consumer can check envelopes without shelling out to Rust. No engine dependency.

  • HMAC-SHA256 over the canonical form (signature nulled) — byte-exact with the rigorix-oss engine and the Rust verifier.
  • JSON Schema conformance (draft 2020-12, jsonschema).
  • ADR-016 chains: per-producer sequence + prev_hash continuity, gaps accepted only when covered by a valid signed compaction checkpoint.
  • Ed25519 anchor artifacts (cryptography): ledger receipt, history slice, compaction checkpoint.

Install

pip install rigorix-verifier==0.2.0   # published artifact (embedded corpus)
pip install .                          # or: pip install -e ".[test]" (from source)

Usage

import json
from rigorix_verifier import (
    verify_signature, validate_envelope, verify_chain,
    verify_chain_with_checkpoints, verify_history_slice,
)

envelope = json.load(open("envelope.json"))
verify_signature(envelope, "fixture-hmac-key-2026")   # byte-exact HMAC
validate_envelope(envelope)                            # schema conformance

chain = json.load(open("chain.json"))
verify_chain(chain)                                    # ADR-016 local chain

Canonical form

The HMAC is over serde_json::to_string(envelope with signature=None) as the engine emits it: struct field order, skip_serializing_if fields omitted when None/empty, non-skipped Option fields as null, scoring_results and its dimensions maps sorted, and serde_json::Value payloads with sorted keys. The field order is read from schemas/envelope.json. The committed engine fixtures prove byte-exact parity (tests/test_envelope.py).

Contract corpus

Resolution (mirrors the Rust verifier):

  1. RIGORIX_SDK_SCHEMAS — an explicit external corpus (CI/local override).
  2. The bundled rigorix_verifier/_schemas directory.

The bundled copy is generated from the repo-root schemas/ (the single source of truth) by scripts/bundle_schemas.py: the setuptools build_py/sdist hooks run it before packing, and conftest.py runs it before tests. It is a real directory (setuptools will not dereference a symlink into a wheel/sdist), never a committed duplicate; tests/test_corpus_sync.py fails if it drifts from the canonical corpus. The pack gate (python -m build → install wheel/sdist → verify with RIGORIX_SDK_SCHEMAS unset) runs in CI. Run python scripts/bundle_schemas.py manually if you need the copy outside a build.

Test

pytest -q

Metadata

Release files for rigorix-verifier 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rigorix-verifier 0.3.0
File Size Uploaded
rigorix_verifier-0.3.0.tar.gz 47.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rigorix-verifier 0.3.0
File Interpreter ABI Platform
rigorix_verifier-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 109.8 kB

Release files / rigorix_verifier-0.3.0.tar.gz

Download URL rigorix_verifier-0.3.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
16ef01537918eb024d8d4ce9656fa81b681343dd3003ac26b132fe1a5430d8af
BLAKE2b-256 checksum
How to use checksums
4820678c1450956b1112355c344e415a0a35f870ec60285e84e8bbb32f5c7446
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / rigorix_verifier-0.3.0-py3-none-any.whl

Download URL rigorix_verifier-0.3.0-py3-none-any.whl
Size 62.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3feb24cd3e5c5c7815d0782d548dda1f355b6de1084d3c3bd66764445978b348
BLAKE2b-256 checksum
How to use checksums
0b5f93612b851ad61b35c599d28c3d60ff5e7daa12e56aa24f8af6cae011288c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.0

2 release files

0.4.0

2 release files

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page