Skip to main content

Meridian Storage Projection

meridian-storage-projection is the Apache-2.0 Meridian V1 lifecycle library for transactional outbox processing, derived projections, cache policy and normal-read reuse, explicit Schema migration, logical export/import, and projection rebuild.

It is a library, not a Projection Catalog. Meridian still has exactly five Catalogs: structured, object, cache, evidence, and streaming. This package registers none of them. The released cache Catalog retains its exact public surface and this package supplies policy and coordination helpers around it.

Install

python -m pip install meridian-storage-projection==1.0.2

Python 3.12 through 3.14 is supported. Runtime dependencies are pinned to the released Meridian Core 1.0.1, Semantics 2.0.0, and Query 1.0.2 contracts.

Projection

from meridian_storage.projection import ProjectionRunner, ProjectionSpec

spec = ProjectionSpec(
    name="case-search-v1",
    source_catalog="structured",
    source="investigation.cases",
    target_catalog="structured",
    target="investigation.case_search",
    source_schema="investigation.case@3",
    target_schema="investigation.case_search@1",
)

runner = ProjectionRunner(
    meridian=meridian,
    spec=spec,
    project=project_case_for_search,
    outbox=outbox_adapter,
    batch_size=100,
    lease_seconds=60,
)

# The host process owns scheduling and shutdown.
runner.run_once()

The runner advances a checkpoint only after the derived target acknowledges the exact source version. Crashed workers reclaim expired leases, duplicate delivery requires idempotent target writes, and poison records enter quarantine until an explicit operator retry.

Construct the runner after meridian.start(). Both Resources must have the exact Schemas in the spec and resolved Bindings satisfying their declared Capability requirements. Construction performs no target writes or projector calls.

Adapter authors can run the wheel's shared lifecycle fixtures via meridian_storage.projection.testing; see conformance. The owner-only port does not fence an older attempt after the same owner is reused. Hosts must prevent overlapping owner reuse.

Transparent read cache

from datetime import timedelta

from meridian_storage.projection import (
    CacheCoordinator,
    CachePolicy,
    LoadedValue,
    MeridianCacheBackend,
)

policy = CachePolicy(
    source_resource="investigation.cases",
    cache_resource="investigation.case_cache",
    key_fields=("case_id",),
    serializer_id="canonical-json-v1",
    schema_fingerprint="sha256:" + schema_fingerprint_hex,
    default_ttl=timedelta(seconds=30),
    maximum_ttl=timedelta(minutes=5),
    maximum_staleness=timedelta(seconds=30),
)
cache = CacheCoordinator(policy=policy, backend=MeridianCacheBackend(meridian))

result = cache.read(
    {"case_id": case_id},
    lambda: LoadedValue(load_authoritative_case(), source_version=record_version),
    required_source_version=record_version,
)

Every stored value carries a versioned cache envelope with its logical key, serializer, Schema fingerprint, creation/expiry timestamps, and source version. Positive and negative values use distinct tagged payloads, so user Data cannot collide with the negative-cache marker. Cache outage, corruption, and invalidation failure never change authoritative correctness. Explicit CAS/unavailable operations fail retryably; normal reads may fall back according to policy.

Migration and portability

MigrationPlanner classifies released SchemaDocument values and verifies an explicit logical MigrationBundleV1. Preconditions, validations, and postconditions carry complete serialized Meridian V1 Operations, never Adapter or Engine concepts. MigrationExecutor runs only when called by a deployment job, against injected Adapter compilation/lock/apply/activation hooks. Runtime startup remains read-only.

LogicalExportCoordinator and LogicalImportCoordinator stream bounded, canonical NDJSON partitions with counts, byte sizes, logical-id bounds, and SHA-256 verification. Import verifies every immutable artifact before target preflight or writes, then detects any artifact change between verification and consumption. Cache state is excluded. PortableRecoveryCoordinator only correlates logical evidence with an IaC-owned backup/restore validation; it performs no Engine lifecycle action.

V1 boundaries

  • No service, scheduler, broker, worker deployment, or Engine client is started.
  • No physical table, index, topic, bucket, endpoint, or credential is public.
  • Streaming replay/group positions remain versioned Streaming Operations.
  • Online dual-write, CDC catch-up, zero-downtime cross-engine cutover, snapshot-stable pagination, and high-volume specialization are forward-looking.
  • Platform/Vangu IaC owns provisioning, identity, ACL, migration jobs, backup, restore, recovery, topology, scaling, and worker lifecycle.

Normative JSON Schemas are in contracts/data-lifecycle/. Unit, integration, contract, crash-boundary, and packaging tests are included in the source distribution.

Verification

Run the same release gate used by CI:

python scripts/verify.py

It runs formatting, lint, strict typing, unit/integration/contract/crash and packaging tests, branch coverage, dependency consistency, reproducible builds, wheel installation, and Twine metadata validation. Deterministic hashes and results are written to build/evidence/verification.json. See docs/CONFORMANCE.md for acceptance traceability.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meridian_storage_projection-1.0.2.tar.gz (76.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meridian_storage_projection-1.0.2-py3-none-any.whl (73.5 kB view details)

Uploaded Python 3

File details

Details for the file meridian_storage_projection-1.0.2.tar.gz.

File metadata

File hashes

Hashes for meridian_storage_projection-1.0.2.tar.gz
Algorithm Hash digest
SHA256 019210a67f2c1e0e27ad964bd7e29f03ced3b8fbb2915ba042f0b18a49217cd0
MD5 240a79ad6d02155f5c5c2c2f72b1aa85
BLAKE2b-256 f83a4b453e87c4fd762e7ef944b9ea77d10ee40434d30206f46a5c163216cd76

See more details on using hashes here.

Provenance

The following attestation bundles were made for meridian_storage_projection-1.0.2.tar.gz:

Publisher: release.yml on zephytiju/MeridianDataLifecycle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meridian_storage_projection-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for meridian_storage_projection-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f4d071609aa34f76871e195b567635ea990176341c04a2bcb6b8125b8e82390d
MD5 a91e21dd3237457d1a061ba528fd9a80
BLAKE2b-256 bc45bb5a56bbc4ae888f0ea4ff618cf38b85acb62b35ff4a7ce058b094ba9a9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for meridian_storage_projection-1.0.2-py3-none-any.whl:

Publisher: release.yml on zephytiju/MeridianDataLifecycle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.3

2 files

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 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