AbsoluteJS

@absolutejs/secure-messaging-store-conformance

@absolutejs/secure-messaging-store-conformancev0.2.0betaMessaging

Repeatable atomicity, replay, concurrency, and crash-boundary drills for SecureMessagingStore adapters.

#Installation

BASH
bun add @absolutejs/secure-messaging-store-conformance

#Capabilities

Overview

Framework-neutral, repeatable drills for every SecureMessagingStore adapter. The runner checks atomic state/replay/outbox commits, revision compare-and-swap, replay conflicts, rollback, concurrent writers, idempotent outbox acknowledgement, revision rollback rejection, revision-checked deletion, cloning, and ambiguous commit retries.

runSecureMessagingDurabilityUncertaintyConformance() injects the real post-mutation acknowledgement-loss boundary. It requires the adapter to throw SecureMessagingDurabilityUncertainError, resolves the authoritative store, handles both the already-applied and safe-to-retry outcomes, and proves the final state and outbox effect exist exactly once.

Use an isolated tenant or freshly reset database for every scenario. Run this suite in adapter CI, before PaaS releases, and during scheduled durability drills.

Show 2 more

Backup drills can call seedSecureMessagingStoreRecovery, capture an operator-controlled backup, call mutateSecureMessagingStoreAfterRecoveryPoint against the source, restore into an isolated target, and then call verifySecureMessagingStoreRecovery against that target. The fixture contains only synthetic identifiers and encrypted bytes, so drill evidence never needs tenant data or key material.

Licensed under Apache-2.0.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/secure-messaging-store-conformance through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/secure-messaging-store-conformance version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/secure-messaging-store-conformance example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#@absolutejs/secure-messaging-store-conformance quick start

Partial snippet

# @absolutejs/secure-messaging-store-conformance

TS
await runSecureMessagingStoreConformance({
  createStore: (scenario) => createStoreForIsolatedTenant(scenario),
});

#Public entry points

Supported entry points declared by this package manifest.

@absolutejs/secure-messaging-store-conformancePackage entry point declared in package.json.

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build src/index.ts --outdir dist --root src --sourcemap --target=browser --external @absolutejs/secure-messaging && tsc --project tsconfig.build.json
bun run check:packagebun run format:check && bun run typecheck && bun run test && bun run build
bun run format:checkprettier --check "./**/*.{ts,json,md}"
bun run testbun test tests/
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

10 symbols
SecureMessagingStoreConformanceOptionstypePermalinkSource
TS
type SecureMessagingStoreConformanceOptions = {
    readonly createStore: (scenario: string) => Promise<SecureMessagingStore> | SecureMessagingStore;
};
Exported from @absolutejs/secure-messaging-store-conformance