Search by

kumwe / idempotency

llewellyn

Portable idempotency keys, immutable replay state and ledger ports.

Package info

github.com/kumwe/idempotency

pkg:composer/kumwe/idempotency

Statistics

Installs: 65

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.2 2026-09-08 16:53 UTC

README

Packagist version Idempotency CI PHP requirement License

Immutable replay identities, request fingerprints, captured results, state transitions and durable ledger ports under Kumwe\Idempotency. Requires PHP 8.5, JSON and exact Canonical JSON 0.1.1.

Installation and use

Install the published package with an exact pre-1.0 pin:

composer require kumwe/idempotency:0.1.2
<?php

require 'vendor/autoload.php';

use Kumwe\Idempotency\IdempotencyKey;

$key = IdempotencyKey::fromString('request-001');
assert($key->value() === 'request-001');
assert($key->equals(IdempotencyKey::fromHeader(' request-001 ')));

Record and result operations require an explicitly supplied Kumwe\CanonicalJson\CanonicalEncoder conforming to kumwe-canonical-json/generic-v1. There is no encoder fallback. The typed consumer example demonstrates claim collision and stable replay with test adapters.

Core integration

Core binds IdempotencyLedger, SecretOnceIdempotencyLedger and IdempotencyPurger to durable adapters. Values are constructed directly; no ConfigProvider is needed. Core supplies authenticated actor/site/organization scope, current authorization fingerprints, atomic ownership writes, transaction coupling, lease/recovery policy and secret-safe replay. See the Core contract, integration guide and adapter conformance.

Public API, architecture, charter and release record describe the maintained public boundary and consumer compatibility.

Development and releases

composer install
composer governance:install
composer check
composer examples

The complete gate validates public schemas, source/documentation agreement, ownership, behavior and an isolated no-dev authoritative archive consumer. Local fixture composition does not establish durable concurrency or release provenance. Published versions and CI status are linked above; Core validates its actual retained integration suites. Release guidance describes exact dependency identity and independent evidence requirements. Licensed under Apache-2.0.