@nifrajs/testing 1.11.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -68,6 +68,66 @@ const report = await assertAdversarialContract(app, {
68
68
  request for each declared response schema, so use an isolated test app/database—never point the
69
69
  laboratory at production.
70
70
 
71
+ `nifra levels` L4 uses this same deep engine through the explicitly configured isolated executor;
72
+ the older core invariant runner remains only as a compatibility export.
73
+
74
+ ## Durable failure laboratory
75
+
76
+ `createFailureLab` injects replayable failures at named seams in a disposable test adapter. It
77
+ supports crash-after-commit, duplicate delivery, event reordering, virtual delay, budget expiry,
78
+ lost provider replies, and checkpoint contention. It never sleeps and its evidence records only
79
+ the schedule tokens - not requests, events, provider results, error messages, or stacks.
80
+
81
+ ```ts
82
+ import { FailureInjectedError, runFailureScenario } from "@nifrajs/testing"
83
+
84
+ let committed = false
85
+ const report = await runFailureScenario({
86
+ name: "outbox-crash-after-commit",
87
+ execute(lab) {
88
+ committed = true // the real disposable transaction committed
89
+ lab.checkpoint("outbox.after_commit")
90
+ },
91
+ verify: ({ error }) => committed && error instanceof FailureInjectedError,
92
+ }, {
93
+ seed: 73,
94
+ schedule: [{ kind: "crash", point: "outbox.after_commit" }],
95
+ })
96
+
97
+ expect(report.ok).toBe(true)
98
+ // Re-run with report.replay.seed + report.replay.schedule.
99
+ ```
100
+
101
+ Use `lab.deliveries()` around a relay batch, `lab.provider()` around a provider call,
102
+ `lab.remaining()` before a deadline-bound hop, and `lab.checkpointContended()` at a projection CAS.
103
+ The laboratory is a test port: production code does not import it and pays no hot-path cost.
104
+
105
+ ## Adapter certification
106
+
107
+ `@nifrajs/testing/certification` turns an adapter interface into portable, hash-verifiable evidence.
108
+ Built-in profiles cover storage (including optional paging/signing/copy-move), cache, jobs, Node/Deno-
109
+ style runtimes, and durable event delivery. Every check receives a fresh adapter, capability status is
110
+ explicit, and failures retain only the error class - never provider messages or credentials.
111
+
112
+ ```ts
113
+ import {
114
+ certifyAdapter,
115
+ storageAdapterCertificationProfile,
116
+ verifyAdapterCertification,
117
+ } from "@nifrajs/testing/certification"
118
+
119
+ const report = await certifyAdapter({
120
+ profile: storageAdapterCertificationProfile({ paging: true, presign: true, move: true }),
121
+ adapterId: "s3-production-shape",
122
+ createAdapter: () => createDisposableS3Adapter(),
123
+ })
124
+
125
+ if (!report.ok || !(await verifyAdapterCertification(report))) throw new Error("adapter uncertified")
126
+ ```
127
+
128
+ Run profiles only against disposable namespaces. The certification module is structural and
129
+ dependency-free, so adapter packages keep it in test/CI and acquire no production runtime dependency.
130
+
71
131
  ## Stateful sessions
72
132
 
73
133
  [`@nifrajs/client`](../client)'s **`testClient`** is already the typed, no-network in-process request
@@ -97,6 +157,10 @@ that every call carries and captures cookies via a shared jar.
97
157
 
98
158
  - `assertAdversarialContract(app, options?)` → green report or throws `AdversarialContractError`.
99
159
  - `runAdversarialContract(app, options?)` → structured `{ ok, results, failures, gaps, seed }` report.
160
+ - `createFailureLab(options)` → deterministic controller for isolated durable adapters.
161
+ - `runFailureScenario(scenario, options)` → token-only `{ ok, replay, evidence, error? }` report.
162
+ - `certifyAdapter({ profile, adapterId, createAdapter })` → capability matrix + SHA-256 evidence.
163
+ - `verifyAdapterCertification(report)` → recompute and verify portable certification evidence.
100
164
  - `testSession<App>(app, { origin?, cookies? })` → `{ client: Treaty<App>, cookies: CookieJar }`.
101
165
  - `cookieJar()` → `CookieJar` — `header()` · `applyTo(headers)` · `store(response)` · `set` · `get` · `clear` · `size`.
102
166
  Honours removal (`Max-Age=0` / past `Expires`); other cookie attributes are ignored (in-process, same-origin).
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Profile-based adapter certification. Profiles are structural and dependency-free: an adapter package
3
+ * uses this only in its test/CI surface, while the resulting capability matrix is portable JSON evidence.
4
+ */
5
+ export interface CertificationContext {
6
+ /** Deterministic per-check key safe for shared test backends and stable re-runs. */
7
+ readonly key: (suffix: string) => string;
8
+ }
9
+ export interface CertificationCheck<Adapter> {
10
+ readonly id: string;
11
+ readonly capability: string;
12
+ readonly run: (adapter: Adapter, context: CertificationContext) => void | Promise<void>;
13
+ }
14
+ export interface AdapterCertificationProfile<Adapter> {
15
+ readonly id: string;
16
+ readonly version: number;
17
+ readonly capabilities: readonly string[];
18
+ readonly checks: readonly CertificationCheck<Adapter>[];
19
+ }
20
+ export interface CertificationCheckEvidence {
21
+ readonly id: string;
22
+ readonly capability: string;
23
+ readonly ok: boolean;
24
+ /** Error class only. Messages may contain credentials/provider payloads and are never evidence. */
25
+ readonly errorName?: string;
26
+ }
27
+ export interface CertificationCapabilityEvidence {
28
+ readonly capability: string;
29
+ readonly status: "passed" | "failed";
30
+ readonly checks: readonly string[];
31
+ }
32
+ export interface AdapterCertificationReport {
33
+ readonly schemaVersion: 1;
34
+ readonly ok: boolean;
35
+ readonly profile: {
36
+ readonly id: string;
37
+ readonly version: number;
38
+ };
39
+ readonly adapterId: string;
40
+ readonly checks: readonly CertificationCheckEvidence[];
41
+ readonly capabilities: readonly CertificationCapabilityEvidence[];
42
+ readonly evidenceHash: string;
43
+ }
44
+ export declare class AdapterCertificationError extends Error {
45
+ readonly report: AdapterCertificationReport;
46
+ constructor(report: AdapterCertificationReport);
47
+ }
48
+ /** Define and validate a custom domain/provider profile at module initialization. */
49
+ export declare function defineCertificationProfile<Adapter>(profile: AdapterCertificationProfile<Adapter>): AdapterCertificationProfile<Adapter>;
50
+ export declare function certifyAdapter<Adapter>(options: {
51
+ readonly profile: AdapterCertificationProfile<Adapter>;
52
+ readonly adapterId: string;
53
+ /** A fresh adapter per check prevents one failed check from contaminating the next. */
54
+ readonly createAdapter: () => Adapter | Promise<Adapter>;
55
+ readonly cleanup?: (adapter: Adapter) => void | Promise<void>;
56
+ }): Promise<AdapterCertificationReport>;
57
+ export declare function assertAdapterCertification(report: AdapterCertificationReport): void;
58
+ /** Recompute the portable evidence hash. Consumers should verify before trusting a stored report. */
59
+ export declare function verifyAdapterCertification(report: AdapterCertificationReport): Promise<boolean>;
60
+ export interface CertifiableCacheEntry {
61
+ readonly value: unknown;
62
+ readonly staleAt: number;
63
+ readonly expiresAt: number;
64
+ }
65
+ export interface CertifiableCacheStore {
66
+ get(key: string): CertifiableCacheEntry | undefined | Promise<CertifiableCacheEntry | undefined>;
67
+ set(key: string, entry: CertifiableCacheEntry, tags: readonly string[]): void | Promise<void>;
68
+ delete(key: string): void | Promise<void>;
69
+ invalidateTag(tag: string): void | Promise<void>;
70
+ clear(): void | Promise<void>;
71
+ }
72
+ export declare function cacheStoreCertificationProfile(): AdapterCertificationProfile<CertifiableCacheStore>;
73
+ export interface CertifiableStoredJob {
74
+ readonly id: string;
75
+ readonly name: string;
76
+ readonly payload: unknown;
77
+ readonly attempt: number;
78
+ readonly maxAttempts: number;
79
+ }
80
+ export interface CertifiableJobStore {
81
+ enqueue(job: {
82
+ name: string;
83
+ payload: unknown;
84
+ runAt: number;
85
+ maxAttempts: number;
86
+ }): string | Promise<string>;
87
+ lease(now: number, limit: number, leaseMs: number): CertifiableStoredJob[] | Promise<CertifiableStoredJob[]>;
88
+ complete(id: string): void | Promise<void>;
89
+ retry(id: string, runAt: number): void | Promise<void>;
90
+ deadLetter(id: string, error: string): void | Promise<void>;
91
+ counts(): {
92
+ pending: number;
93
+ active: number;
94
+ dead: number;
95
+ } | Promise<{
96
+ pending: number;
97
+ active: number;
98
+ dead: number;
99
+ }>;
100
+ }
101
+ export declare function jobStoreCertificationProfile(): AdapterCertificationProfile<CertifiableJobStore>;
102
+ export interface CertifiableStorageObject {
103
+ readonly body: Uint8Array;
104
+ readonly size: number;
105
+ readonly contentType?: string;
106
+ readonly metadata?: Readonly<Record<string, string>>;
107
+ }
108
+ export interface CertifiableStorageAdapter {
109
+ put(key: string, data: Uint8Array | ArrayBuffer | string, options?: {
110
+ readonly contentType?: string;
111
+ readonly metadata?: Readonly<Record<string, string>>;
112
+ }): Promise<void>;
113
+ get(key: string): Promise<CertifiableStorageObject | null>;
114
+ delete(key: string): Promise<void>;
115
+ exists(key: string): Promise<boolean>;
116
+ list(options?: {
117
+ readonly prefix?: string;
118
+ readonly limit?: number;
119
+ }): Promise<string[]>;
120
+ listPage?(options?: {
121
+ readonly prefix?: string;
122
+ readonly limit?: number;
123
+ readonly cursor?: string;
124
+ }): Promise<{
125
+ readonly keys: readonly string[];
126
+ readonly cursor?: string;
127
+ }>;
128
+ presign?(key: string, operation: "get" | "put", options?: {
129
+ readonly expiresInSeconds?: number;
130
+ readonly contentType?: string;
131
+ readonly contentLength?: number;
132
+ }): Promise<{
133
+ readonly url: string;
134
+ readonly expiresAt?: Date;
135
+ }>;
136
+ copy?(sourceKey: string, destinationKey: string): Promise<void>;
137
+ move?(sourceKey: string, destinationKey: string): Promise<void>;
138
+ }
139
+ export declare function storageAdapterCertificationProfile(options?: {
140
+ readonly paging?: boolean;
141
+ readonly presign?: boolean;
142
+ readonly move?: boolean;
143
+ }): AdapterCertificationProfile<CertifiableStorageAdapter>;
144
+ export interface CertifiableRuntimeServer {
145
+ readonly origin: string;
146
+ stop(): void | Promise<void>;
147
+ }
148
+ export interface CertifiableRuntimeAdapter {
149
+ start(app: {
150
+ fetch(request: Request): Response | Promise<Response>;
151
+ }): CertifiableRuntimeServer | Promise<CertifiableRuntimeServer>;
152
+ }
153
+ export declare function runtimeAdapterCertificationProfile(): AdapterCertificationProfile<CertifiableRuntimeAdapter>;
154
+ export interface CertifiableDomainEvent {
155
+ readonly id: string;
156
+ readonly type: string;
157
+ readonly version?: number;
158
+ readonly aggregateId: string;
159
+ readonly payload: unknown;
160
+ readonly timestamp: string;
161
+ }
162
+ export interface CertifiableEventRecord {
163
+ readonly position: string;
164
+ readonly event: CertifiableDomainEvent;
165
+ readonly claimId: string | null;
166
+ }
167
+ export interface CertifiableEventDeliveryAdapter {
168
+ append(event: CertifiableDomainEvent): Promise<void>;
169
+ claimPending(limit: number, now: string): Promise<CertifiableEventRecord[]>;
170
+ markDelivered(id: string, claimId: string, at: string): Promise<boolean>;
171
+ readPage(options?: {
172
+ readonly after?: string;
173
+ readonly limit?: number;
174
+ }): Promise<{
175
+ readonly records: readonly CertifiableEventRecord[];
176
+ readonly nextPosition: string | null;
177
+ readonly hasMore: boolean;
178
+ }>;
179
+ }
180
+ export declare function eventDeliveryCertificationProfile(): AdapterCertificationProfile<CertifiableEventDeliveryAdapter>;
181
+ //# sourceMappingURL=certification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"certification.d.ts","sourceRoot":"","sources":["../src/certification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,oBAAoB;IACnC,oFAAoF;IACpF,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;CACzC;AAED,MAAM,WAAW,kBAAkB,CAAC,OAAO;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxF;AAED,MAAM,WAAW,2BAA2B,CAAC,OAAO;IAClD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,QAAQ,CAAC,MAAM,EAAE,SAAS,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAA;CACxD;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;IACpB,mGAAmG;IACnG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WA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