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.4.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.4.0
File Size Uploaded
rigorix_verifier-0.4.0.tar.gz 48.0 kB Details

Built distribution (wheel)

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

Total release size: 110.9 kB

Release files / rigorix_verifier-0.4.0.tar.gz

Download URL rigorix_verifier-0.4.0.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
64308ed49f7f433a3185c192c1defb782384d25e87ab84ae5862ee9b4f876275
BLAKE2b-256 checksum
How to use checksums
8fa9a300b0359a8f35bceb0e6e5bf5824d780fcf1439baf5d45d9ee7af8ebfd6
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 11, 2026.

Transparency log

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

Download URL rigorix_verifier-0.4.0-py3-none-any.whl
Size 62.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
451d6db4456dd7b774bcbdeeae54ce1ed7a5cb499b201f811411f5d12eb583e7
BLAKE2b-256 checksum
How to use checksums
83873a325423786c87fb61200b497be52d37a0e8ca4cd94c638287abe909410d
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 11, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.0

2 release files

This release

0.4.0 This release

2 release files

0.3.0

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