Universal Measurement Contract Protocol (UMCP): Production-grade contract-first validation framework with GCD and RCFT. Core Axiom: What Returns Through Collapse Is Real. Features bidirectional cross-references, closure registries, and full reproducibility.
Project description
UMCP: Universal Measurement Contract Protocol
UMCP transforms computational experiments into auditable artifacts based on a foundational principle:
Core Axiom: "What Returns Through Collapse Is Real"
Reality is defined by what persists through collapse-reconstruction cycles. Only measurements that returnโthat survive transformation and can be reproducedโreceive credit as real, valid observations.
# Encoded in every UMCP contract
typed_censoring:
no_return_no_credit: true
UMCP is a production-grade system for creating, validating, and sharing reproducible computational workflows. It enforces mathematical contracts, tracks provenance, generates cryptographic receipts, and validates results against frozen specifications.
๐ Quick Start (5 Minutes)
Prerequisites
- Python 3.11+ (3.12+ recommended)
- pip (Python package installer)
- git (version control)
Installation
# 1. Clone the repository
git clone https://github.com/calebpruett927/UMCP-Metadata-Runnable-Code.git
cd UMCP-Metadata-Runnable-Code
# 2. Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# 3. Install production dependencies (includes numpy, scipy, pyyaml, jsonschema)
pip install -e ".[production]"
Optional installations:
# Install test dependencies (adds pytest, coverage tools)
pip install -e ".[test]"
# Install planned communication extensions (when implemented)
# pip install -e ".[api]" # HTTP API (not yet implemented)
# pip install -e ".[viz]" # Web UI (not yet implemented)
# pip install -e ".[communications]" # All communication (not yet implemented)
# Install everything (production + test + future extensions)
pip install -e ".[all]"
Verify Installation
# System health check (should show HEALTHY status)
umcp health
# Run test suite (should show 344 tests passing)
pytest
# Quick validation test
umcp validate casepacks/hello_world
# Check installed version
python -c "import umcp; print(f'UMCP v{umcp.__version__}')"
Python API:
import umcp
# Validate a casepack
result = umcp.validate("casepacks/hello_world")
if result: # Returns True if CONFORMANT
print("โ CONFORMANT")
print(f"Errors: {result.error_count}, Warnings: {result.warning_count}")
else:
print("โ NONCONFORMANT")
for error in result.errors:
print(f" - {error}")
Expected output:
Status: HEALTHY
Schemas: 11
344 passed in ~13s
Launch Interactive Tools
# Visualization dashboard (port 8501)
umcp-visualize
# REST API server (port 8000)
umcp-api
# List extensions
umcp-ext list
๐ฏ What is UMCP?
UMCP is a measurement discipline for computational claims. It requires that every serious claim be published as a reproducible record (a row) with:
- โ Declared inputs (raw measurements)
- โ Frozen rules (mathematical contracts)
- โ Computed outputs (invariants, closures)
- โ Cryptographic receipts (SHA256 verification)
Operational Terms
Core Invariants (Tier-1: GCD Framework):
| Symbol | Name | Definition | Range | Purpose |
|---|---|---|---|---|
| ฯ | Drift | ฯ = 1 - F | [0,1] | Collapse proximity |
| F | Fidelity | F = ฮฃ wแตขยทcแตข | [0,1] | Weighted coherence |
| S | Entropy | S = -ฮฃ wแตข[cแตข ln(cแตข) + (1-cแตข)ln(1-cแตข)] | โฅ0 | Disorder measure |
| C | Curvature | C = stddev(cแตข)/0.5 | [0,1] | Instability proxy |
| ฮบ | Log-integrity | ฮบ = ฮฃ wแตข ln(cแตข,ฮต) | โค0 | Composite stability |
| IC | Integrity | IC = exp(ฮบ) | (0,1] | System stability |
| ฯ_R | Return time | Re-entry delay to domain Dฮธ | โโช{โ} | Recovery measure |
Extended Metrics (Tier-2: RCFT Framework):
| Symbol | Name | Range | Purpose |
|---|---|---|---|
| D๊ฐ | Fractal dimension | [1,3] | Trajectory complexity |
| ฮจแตฃ | Recursive field | โฅ0 | Self-referential strength |
| B | Basin strength | [0,1] | Attractor robustness |
๐๏ธ System Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UMCP WORKFLOW โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ 1. INPUT โ
โ โโ raw_measurements.csv (experimental data) โ
โ โ
โ 2. INVARIANTS COMPUTATION โ
โ โโ ฯ (drift) โโ F (fidelity) โ
โ โโ S (entropy) โโ C (curvature) โ
โ โ
โ 3. FRAMEWORK SELECTION โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ GCD (Tier-1) โ OR โ RCFT (Tier-2) โ โ
โ โโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโโค โ
โ โ โข Energy (E) โ โ โข Fractal (D๊ฐ) โ โ
โ โ โข Collapse (ฮฆ) โ โ โข Recursive (ฮจแตฃ) โ โ
โ โ โข Flux (ฮฆ_gen) โ โ โข Pattern (ฮป, ฮ) โ โ
โ โ โข Resonance (R) โ โ + all GCD โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ 4. VALIDATION โ
โ โโ Contract conformance (schema validation) โ
โ โโ Regime classification (Stable/Collapse/Watch) โ
โ โโ Mathematical identities (F = 1-ฯ, IC โ exp(ฮบ)) โ
โ โโ Tolerance checks (within tol_seam, tol_id) โ
โ โ
โ 5. OUTPUT โ
โ โโ invariants.json (computed metrics) โ
โ โโ closure_results.json (GCD/RCFT outputs) โ
โ โโ seam_receipt.json (validation status + SHA256) โ
โ โโ CONFORMANT or NONCONFORMANT status โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฆ Framework Selection Guide
GCD (Generative Collapse Dynamics) - Tier-1
Best for: Energy/collapse analysis, phase transitions, basic regime classification
Closures (4):
energy_potential: Total system energyentropic_collapse: Collapse potentialgenerative_flux: Generative fluxfield_resonance: Boundary-interior resonance
Example:
umcp validate casepacks/gcd_complete
RCFT (Recursive Collapse Field Theory) - Tier-2
Best for: Trajectory complexity, memory effects, oscillatory patterns, multi-scale analysis
Closures (7 = 4 GCD + 3 RCFT):
- All GCD closures +
fractal_dimension: Trajectory complexity (D๊ฐ โ [1,3])recursive_field: Collapse memory (ฮจแตฃ โฅ 0)resonance_pattern: Oscillation detection (ฮป, ฮ)
Example:
umcp validate casepacks/rcft_complete
Decision Matrix
| Need | Framework | Why |
|---|---|---|
| Basic energy/collapse | GCD | Simpler, faster, foundational |
| Trajectory complexity | RCFT | Box-counting fractal dimension |
| History/memory | RCFT | Exponential decay field |
| Oscillation detection | RCFT | FFT-based pattern analysis |
| Maximum insight | RCFT | All GCD metrics + 3 new |
๐ Built-In Features
UMCP includes two core features that enhance validation without requiring external dependencies:
1. Continuous Ledger (Automatic)
No install needed - built into core
# Automatically logs every validation run
cat ledger/return_log.csv
Purpose: Provides complete audit trail of all validations
- Timestamp (ISO 8601 UTC)
- Run status (CONFORMANT/NONCONFORMANT)
- Key invariants (ฯ, C, stiffness)
- Enables trend analysis and historical review
๐ Future Communication Extensions
The following communication extensions are planned for future implementation:
- Contract Auto-Formatter (Entry point:
umcp-format- not yet implemented) - REST API (HTTP/JSON interface for remote validation)
- Web Dashboard (Interactive visualization with Streamlit)
These would provide standard protocol interfaces but are not required for core validation.
๐ See: EXTENSION_INTEGRATION.md | QUICKSTART_EXTENSIONS.md
โก Performance
UMCP validation is optimized for production use:
Typical Validation Times:
- Small casepack (hello_world): ~5-10ms
- Medium casepack (GCD complete): ~15-30ms
- Large casepack (RCFT complete): ~30-50ms
- Full repository validation: ~100-200ms
Overhead vs. Basic Validation:
- Speed: +71% slower than basic schema validation
- Value: Contract conformance, closure verification, semantic rules, provenance tracking
- Memory: <100MB for typical workloads
Benchmark Results (from benchmark_umcp_vs_standard.py):
UMCP Validator:
Mean: 9.4ms per validation
Median: 6.5ms
Accuracy: 100% (400/400 errors caught, 0 false positives)
Additional Features:
โ Cryptographic receipts (SHA256)
โ Git commit tracking
โ Contract conformance
โ Closure verification
โ Full audit trail
Scaling: Validated on datasets with 1000+ validation runs. Ledger handles millions of entries efficiently (O(1) append).
Overhead vs. Basic Validation:
- Speed: +71% slower than basic schema validation
- Value: Contract conformance, closure verification, semantic rules, provenance tracking
- Memory: <100MB for typical workloads
Benchmark Results (from benchmark_umcp_vs_standard.py):
UMCP Validator:
Mean: 9.4ms per validation
Median: 6.5ms
Accuracy: 100% (400/400 errors caught, 0 false positives)
Additional Features:
โ Cryptographic receipts (SHA256)
โ Git commit tracking
โ Contract conformance
โ Closure verification
โ Full audit trail
Scaling: Validated on datasets with 1000+ validation runs. Ledger handles millions of entries efficiently (O(1) append).
๐ Documentation
Core Protocol
- AXIOM.md โ Core axiom: "What returns is real"
- INFRASTRUCTURE_GEOMETRY.md โ Three-layer geometric architecture (state space, projections, seam graph)
- TIER_SYSTEM.md โ Tier-0/1/1.5/2 boundaries, freeze gates
- RETURN_BASED_CANONIZATION.md โ How Tier-2 results become Tier-1 canon
- KERNEL_SPECIFICATION.md โ Formal definitions (19 lemmas)
- PUBLICATION_INFRASTRUCTURE.md โ Publication standards
- CASEPACK_REFERENCE.md โ CasePack structure
Indexing & Reference
- GLOSSARY.md โ Authoritative term definitions
- SYMBOL_INDEX.md โ Symbol table (collision prevention)
- TERM_INDEX.md โ Alphabetical cross-reference
Framework Documentation
- GCD Theory โ Tier-1 specification
- RCFT Theory โ Tier-2 mathematical foundations
- RCFT Usage โ Practical examples
Governance
- UHMP.md โ Universal Hash Manifest Protocol
- FACE_POLICY.md โ Boundary governance
- PROTOCOL_REFERENCE.md โ Master navigation
Developer Guides
- Quickstart โ Get started in 10 minutes
- Python Standards โ Development guidelines
- Production Deployment โ Enterprise setup
- PyPI Publishing โ Release workflow
๐ Repository Structure
UMCP-Metadata-Runnable-Code/
โโโ src/umcp/ # All Python code (API, CLI, extensions)
โโโ tests/ # Test suite (344 tests)
โโโ scripts/ # Utility scripts
โโโ contracts/ # Frozen contracts (GCD, RCFT)
โโโ closures/ # Computational functions (7 closures)
โ โโโ gcd/ # 4 GCD closures
โ โโโ rcft/ # 3 RCFT closures
โโโ casepacks/ # Reproducible examples
โ โโโ hello_world/ # Zero entropy example
โ โโโ gcd_complete/ # GCD validation
โ โโโ rcft_complete/ # RCFT validation
โโโ schemas/ # JSON schemas
โโโ canon/ # Canonical anchors
โโโ ledger/ # Validation log (continuous append)
โโโ integrity/ # Integrity metadata (SHA256)
โโโ docs/ # Documentation
โโโ pyproject.toml # Project configuration (v1.4.0)
๐งช Testing
# All tests (344 total)
pytest
# Verbose output
pytest -v
# Specific framework
pytest -k "gcd" # GCD tests
pytest -k "rcft" # RCFT tests
# Coverage report
pytest --cov
# Fast subset
pytest tests/test_00_schemas_valid.py
Test Structure: 344 tests = 142 original + 56 RCFT + 146 integration/coverage
๐ Production Features
- โ 344 tests passing (100% success rate)
- โ
Health checks:
umcp healthfor system monitoring - โ Structured logging: JSON output for ELK/Splunk/CloudWatch
- โ Performance metrics: Duration, memory, CPU tracking
- โ Container ready: Docker + Kubernetes support
- โ Cryptographic receipts: SHA256 verification
- โ Zero technical debt: No TODO/FIXME/HACK markers
- โ <5s validation: Fast for typical repositories
๐ See: Production Deployment Guide
๐ Integrity & Automation
# Verify file integrity
sha256sum -c integrity/sha256.txt
# Update after changes
python scripts/update_integrity.py
# Check merge status
./scripts/check_merge_status.sh
Automated:
- โ 344 tests on every commit (CI/CD)
- โ Code formatting (ruff, black)
- โ Type checking (mypy)
- โ SHA256 tracking (12 files)
๐ What's New in v1.4.0
Complete Protocol Infrastructure:
- โ 8 major protocol documents (~5,500 lines)
- โ Formal specification (19 lemmas, kernel definitions)
- โ Publication standards (CasePack structure)
- โ 344 tests passing (GCD + RCFT frameworks)
- โ Production ready (manuscript-aligned)
๐ See: CHANGELOG.md | IMMUTABLE_RELEASE.md
๐ค Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/name) - Add tests for new functionality
- Ensure all tests pass (
pytest) - Validate code quality (
ruff check,mypy) - Commit changes (
git commit -m 'feat: Description') - Push to branch (
git push origin feature/name) - Open Pull Request
๐ See: Python Coding Standards | CONTRIBUTING.md
๐ License
MIT License - see LICENSE for details.
๐ Support & Resources
- Issues: GitHub Issues
- Documentation: docs/
- Examples: casepacks/
- Immutable Release: IMMUTABLE_RELEASE.md
๐ System Status
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UMCP PRODUCTION SYSTEM STATUS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฏ Core Axiom: "What Returns Through Collapse Is Real"
๐ Canon: UMCP.CANON.v1
๐ Contract: UMA.INTSTACK.v1
๐ DOI: 10.5281/zenodo.17756705 (PRE)
10.5281/zenodo.18072852 (POST)
10.5281/zenodo.18226878 (PACK)
โ๏ธ Tier-1: p=3 ฮฑ=1.0 ฮป=0.2 ฮท=0.001
๐ฏ Regimes: Stable: ฯ<0.038 F>0.90
Collapse: ฯโฅ0.30
๐ Status: CONFORMANT โ
๐งช Tests: 344 passing
๐ฆ Casepacks: 3 validated
๐ Integrity: 12 files checksummed
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
"No improvisation. Contract-first. Tier-1 reserved."
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Citation
Framework: UMCP (Universal Measurement Contract Protocol)
Author: Clement Paulus
Version: 1.4.0
Release: January 23, 2026
Tests: 344 passing
Integrity: SHA256 verified
Frameworks:
- Tier-1: GCD (Generative Collapse Dynamics) - 4 closures
- Tier-2: RCFT (Recursive Collapse Field Theory) - 7 closures
Built with โค๏ธ for reproducible science
"What Returns Through Collapse Is Real"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file umcp-1.4.7.tar.gz.
File metadata
- Download URL: umcp-1.4.7.tar.gz
- Upload date:
- Size: 90.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f53f08a2004dc31bd50d1dc40b7d07a9bf3541e009deaeb3051de64eb0ac607
|
|
| MD5 |
83b2acfe4b9df8d73c557daf9e02403f
|
|
| BLAKE2b-256 |
16e3d064dc64c44e95d3ef57247503bce7854724e8cc2af080be6b81832ffd0f
|
File details
Details for the file umcp-1.4.7-py3-none-any.whl.
File metadata
- Download URL: umcp-1.4.7-py3-none-any.whl
- Upload date:
- Size: 40.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32d0817dc49e3f66abea345c805785177e0dcfa9ab1739e48b4471ad2564a1d0
|
|
| MD5 |
7edb38768ff3bdaf5d00b53a8e29aa3b
|
|
| BLAKE2b-256 |
5f21fbaa272564a9ee27d539361c91c470b1aa63c2ac49b3c5aa6755ec39b66b
|