Overview
Provider-neutral reliability primitives for side-effecting integrations:
@absolutejs/reliabilityv0.1.0betaPlatform & InfraProvider-neutral atomic inbox, transaction, and idempotent-operation primitives for AbsoluteJS.
bun add @absolutejs/reliabilityProvider-neutral reliability primitives for side-effecting integrations:
checked-out PostgreSQL transactions that keep every statement on one connection;
scoped, payload-fingerprinted idempotent operations with fencing and an explicit
indeterminate state after an external side effect may have started;
an atomic webhook inbox with leases, replay claims, completion, and retention purge.
The package has no database-driver dependency. Pass a pool with connect() to createPostgresTransactionRunner(), apply the exported schemas, and construct the stores. A plain pool-level query() is intentionally not accepted because it cannot guarantee transaction connection affinity.
Use createPostgresIdempotentOperationStore() in multi-process production deployments. The store fences concurrent claims and preserves an indeterminate result when an external side effect may have started but its final outcome is unknown.
createMemoryWebhookInboxStore() covers tests. createPostgresWebhookInboxStore() and drainWebhookInbox() provide atomic leases, retries, replay protection, completion, and retention purging for production webhook consumers.
createPostgresTransactionRunner() checks out one connection for the complete transaction. This prevents transaction statements from accidentally crossing pooled connections.
Outcomes
Provider-neutral reliability primitives for side-effecting integrations:
Use createPostgresIdempotentOperationStore() in multi-process production deployments. The store fences concurrent claims and preserves an indeterminate result when an external side effect may have started but its final outcome is unknown.
createMemoryWebhookInboxStore() covers tests. createPostgresWebhookInboxStore() and drainWebhookInbox() provide atomic leases, retries, replay protection, completion, and retention purging for production webhook consumers.
Hardening checklist
Follow in order
Working example for Idempotent operations.
import {
createMemoryIdempotentOperationStore,
fingerprintPayload,
operationId
} from '@absolutejs/reliability';
const scope = { actorId: 'tenant-1', key: 'charge-42', operation: 'charge' };
const id = operationId(scope);
const fingerprint = await fingerprintPayload({ amount: 2500, currency: 'usd' });
const store = createMemoryIdempotentOperationStore();Supported entry points declared by this project’s package manifest. Internal dist paths are not part of the package contract.
Public package entry point declared in package.json.
Scripts declared by this project’s package manifest.
Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.
type OperationScope = {
account?: string;
key: string;
namespace: string;
provider?: string;
tenant?: string;
};@absolutejs/reliabilityThese playbooks show where this package fits, how to verify the combined system, and what changes before production.