Skip to main content

sovos-invariants

Sovereign substrate invariants every layer of SOVOS consults: NAME/OWEM normalization, CARE floor enforcement, SIGIL sign+verify, tally validation. Absorbed 2026-08-11 from sov_invariants.py (top-level) into the canonical package form.

Functions

Function Job
normalize_name(value) Canonical sovereign-name normalization (whitespace, casing)
normalize_owem(value) OWEM agent identifier normalization
validate_care_floor(value) CARE floor (≥0.95) check on a tally or score
care_score(text, short_floor=0.0) Compute CARE score from text content (≥short_floor)
validate_tally(tally) Validate a tally dict structure
emit_sigil(payload, tally, care, prev_hash, agent_did) Ed25519-signed SIGIL for a chain record
verify_sigil(sigil, payload) Verify a SIGIL
(private) _private_key() Lazy-loaded Ed25519 private key (file at ~/.runpod/sov_sigil_key or /runpod/sov_sigil_key)

Provenance

The original sov_invariants.py (163 lines) was used by every model in the substrate — sov4_router.py, csoai_governance.py, forest/*, api/*.js — but lived at repo root. Pinning it as a package here gives every other package a canonical import path:

from sovos_invariants import (
    care_score, emit_sigil, verify_sigil,
    normalize_name, normalize_owem, validate_care_floor, validate_tally,
    SOVEREIGN_DID,
)

Use

from sovos_invariants import emit_sigil, verify_sigil, SOVEREIGN_DID, care_score

# sign a payload
sigil = emit_sigil(
    payload={"ts": 1722350400, "kind": "audit", "...": "..."},
    tally={"yes": 9, "no": 1, "abstain": 0},
    care=0.95,
    agent_did=SOVEREIGN_DID,
)

# verify
ok = verify_sigil(sigil, payload)

The SIGIL/CARE crypto layer is a substrate-wide primitive. Every package that signs attestations (sovos-arena, sovos-oscal, sovos-chain, the absorbed sovos-router, etc.) is expected to import from here. The sigil key is not in this repo (lives on the runtime host per ~/.runpod/sov_sigil_key); the package is fine on the Mac without it but emits nothing verifiable without the key — exactly the right hardening for a public repo.

Metadata

Release files for sovos-invariants 0.1.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 sovos-invariants 0.1.0
File Size Uploaded
sovos_invariants-0.1.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sovos-invariants 0.1.0
File Interpreter ABI Platform
sovos_invariants-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / sovos_invariants-0.1.0.tar.gz

Download URL sovos_invariants-0.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a8b3d10db4bebd9de4e869bdbd8ae6eb2fac2e904c2f06290070677110d5d741
BLAKE2b-256 checksum
How to use checksums
7f53df868cbdfc67d4cce2f663b2bc9e2c436360c06afdc04640ab5b2fd7e882
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / sovos_invariants-0.1.0-py3-none-any.whl

Download URL sovos_invariants-0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75f0fa2f7fd22fccbcb62b4385c3cbe78470b0ba10b1c756c6c6a9b2fc99d7c8
BLAKE2b-256 checksum
How to use checksums
d3e17b3caa4d424185d551802c19e7d2d2b5087c60b44aeba6d47bcb70bd0725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.1.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