meridian-storage-valkey
meridian-storage-valkey is Meridian V1's Valkey adapter for disposable Cache
Catalog data. It provides bounded key-value storage, canonical value envelopes,
mandatory TTLs, exact-key and generation invalidation, single-key atomic
operations, transparent cache-aside coordination, health verification, and
standalone or Sentinel failover profiles.
Valkey is never an authority in this adapter. Eviction, restart, corruption, and read unavailability all resolve to a cache miss when an authoritative loader exists. The adapter does not advertise structured, object, evidence, or streaming behavior and cannot be selected as their fallback.
Compatibility
| Component | Supported release |
|---|---|
| Python | 3.12, 3.13, 3.14 |
meridian-storage-core |
exactly 1.0.0 |
meridian-storage-semantics |
exactly 1.0.0 |
valkey client |
exactly 6.1.1 |
| Valkey server | exactly 8.1.9 |
| Engine profiles | valkey-standalone, valkey-sentinel |
The machine-readable pins and predecessor artifact digests are in
compatibility.json. Install the published distribution
with:
python -m pip install meridian-storage-valkey==1.0.0
Meridian discovers ValkeyAdapterFactory through the
meridian_storage.adapters entry-point group. Platform or Vangu composition
owns the Binding, endpoint or service reference, credentials, ACLs, topology,
memory policy, recovery, and namespace-generation rollout.
Advertised contract
The adapter advertises only the released Cache operations at version 1.0.0:
| Operation contract | Behavior |
|---|---|
meridian.cache.get |
Validated hit, miss, or unavailable-as-miss |
meridian.cache.put |
TTL-bounded disposable write |
meridian.cache.put_if_absent |
Single-key atomic insert |
meridian.cache.compare_and_set |
Envelope-version or source-version CAS |
meridian.cache.delete |
Exact-key deletion |
meridian.cache.invalidate |
One key or a bounded explicit key list |
Bounded multi-get, single-flight get_or_load, numeric increment, leases, and
Lua scripts are private adapter coordination primitives. They are not invented
Meridian Catalog operations. Namespace-wide invalidation is a deployment
change: increment namespaceGeneration in IaC and roll the Binding; no key scan
is performed.
Binding settings
Settings are closed and fail on unknown fields. This test-only example omits real secret values, which must be resolved by the Meridian composition root:
{
"namespaceGeneration": 1,
"resources": {
"cache:example.items": {
"schemaFingerprint": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
"serializerId": "canonical-json",
"defaultTtlMs": 60000,
"maximumStalenessMs": 60000,
"negativeCaching": true,
"authoritative": false
}
},
"limits": {
"maxKeyBytes": 512,
"maxValueBytes": 4194304,
"maxBatchSize": 128
},
"ttl": {
"defaultTtlMs": 60000,
"minimumTtlMs": 10,
"maximumTtlMs": 86400000,
"negativeTtlMs": 5000
},
"singleFlight": {"leaseMs": 5000, "waitMs": 250, "pollMs": 10},
"memory": {
"requireMaxmemory": true,
"allowedEvictionPolicies": ["allkeys-lru"],
"requirePersistenceDisabled": true
},
"topology": {"mode": "standalone", "minimumReplicas": 0},
"database": 0,
"seedEndpoints": [],
"allowInsecureTestProfile": true
}
Production Bindings use valkeys:// with verified server TLS. Plaintext is
accepted only when allowInsecureTestProfile is explicitly true. Sentinel
Bindings use a service reference or seed endpoints plus a topology setting such
as {"mode":"sentinel","minimumReplicas":2,"sentinelMaster":"meridian-cache"}.
Safety and consistency
- Physical keys contain digests, not logical keys, tenant values, or Resource names. Tenant and scope still participate in the digest.
- Values carry serializer, schema, source version, creation and expiry times, payload length and digest, and an envelope version. Non-canonical, stale, schema-mismatched, or corrupt entries are deleted best-effort and treated as misses.
- A
raw-bytesResource carries bytes through serialized Operations as a canonical unpadded base64url JSON string. Results includevalueEncoding: "base64url"; internal cache-aside composition may pass bytes directly. - TTL is mandatory and bounded by deployment policy and maximum staleness.
- Adapter-owned scripts have stable SHA-1 identifiers and reload only after
NOSCRIPT; consumer scripts and unbounded scans are rejected by design. - Multi-key atomic helpers require a shared Valkey hash slot. Public invalidation is a bounded sequence of independent exact-key deletes.
- Startup verifies authentication, exact engine version, maxmemory, eviction, persistence policy, primary role, replica count, and script permission.
- Telemetry contains event names, counters, and hashed Resource identifiers; it never emits keys, values, endpoints, usernames, or credentials.
See docs/architecture.md for the design boundary,
docs/operations.md for deployment and recovery, and
docs/conformance.md for deterministic evidence.
Development
python -m venv .venv
.venv/bin/pip install -e '.[test]'
./scripts/verify.sh
./scripts/test-integration.sh
./scripts/test-failover.sh
The integration scripts use disposable Valkey 8.1.9 containers. They never
provision production infrastructure. See CONTRIBUTING.md
and SECURITY.md before submitting a change.
License
Copyright 2026 Meridian contributors. Licensed under the Apache License,
Version 2.0. See LICENSE and NOTICE.
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 meridian_storage_valkey-1.0.0.tar.gz.
File metadata
- Download URL: meridian_storage_valkey-1.0.0.tar.gz
- Upload date:
- Size: 105.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
544c16df4f6e13b651035bfbd006769b81d9f0379d310c9c46e6e3215097bae8
|
|
| MD5 |
c709b3e8af165999ef46290e556242b2
|
|
| BLAKE2b-256 |
793099cc09f058ed2a030521bdb48a928ed0a37e45766dbcb0d17d286d103f75
|
Provenance
The following attestation bundles were made for meridian_storage_valkey-1.0.0.tar.gz:
Publisher:
release.yml on zephytiju/meridian-storage-valkey
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meridian_storage_valkey-1.0.0.tar.gz -
Subject digest:
544c16df4f6e13b651035bfbd006769b81d9f0379d310c9c46e6e3215097bae8 - Sigstore transparency entry: 2609131481
- Sigstore integration time:
-
Permalink:
zephytiju/meridian-storage-valkey@acc1fd4ac51d071056739190f0283af64b83ff4c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zephytiju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@acc1fd4ac51d071056739190f0283af64b83ff4c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file meridian_storage_valkey-1.0.0-py3-none-any.whl.
File metadata
- Download URL: meridian_storage_valkey-1.0.0-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
282136e4be38ae6343bcdb240939e5f036e9edc3d3a7459a73b4d3ef33be4ba5
|
|
| MD5 |
514b4b1c07b894a060c81a5c7080e1b0
|
|
| BLAKE2b-256 |
98be20d69a60ad03ecf38560156c414b9f1f3fb134d466599c9a88135f217ac1
|
Provenance
The following attestation bundles were made for meridian_storage_valkey-1.0.0-py3-none-any.whl:
Publisher:
release.yml on zephytiju/meridian-storage-valkey
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meridian_storage_valkey-1.0.0-py3-none-any.whl -
Subject digest:
282136e4be38ae6343bcdb240939e5f036e9edc3d3a7459a73b4d3ef33be4ba5 - Sigstore transparency entry: 2609131661
- Sigstore integration time:
-
Permalink:
zephytiju/meridian-storage-valkey@acc1fd4ac51d071056739190f0283af64b83ff4c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zephytiju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@acc1fd4ac51d071056739190f0283af64b83ff4c -
Trigger Event:
workflow_dispatch
-
Statement type: