@rotorsoft/act-tck 1.17.0 → 1.18.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 +66 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/cache-differential-tck.d.ts +80 -0
- package/dist/@types/cache-differential-tck.d.ts.map +1 -0
- package/dist/@types/index.d.ts +6 -0
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/@types/logger-differential-tck.d.ts +61 -0
- package/dist/@types/logger-differential-tck.d.ts.map +1 -0
- package/dist/@types/store-differential-tck.d.ts +93 -0
- package/dist/@types/store-differential-tck.d.ts.map +1 -0
- package/dist/@types/store-tck.d.ts.map +1 -1
- package/dist/index.cjs +1001 -514
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +974 -490
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { Cache } from "@rotorsoft/act/types";
|
|
2
|
+
/**
|
|
3
|
+
* One {@link Cache} implementation to feed into
|
|
4
|
+
* {@link runCacheDifferentialTck}. The harness drives the identical
|
|
5
|
+
* generated workload against all of them, then compares the observable
|
|
6
|
+
* `get()` snapshot after every operation.
|
|
7
|
+
*/
|
|
8
|
+
export type DifferentialCache = {
|
|
9
|
+
/** Display name used in assertion messages and the describe block. */
|
|
10
|
+
readonly name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Produces the cache under test. Called once in `beforeAll`; the
|
|
13
|
+
* harness owns its lifecycle (`dispose`). Must return an empty cache
|
|
14
|
+
* with capacity for at least {@link CacheDifferentialTckOptions.streams}
|
|
15
|
+
* entries so nothing is evicted mid-comparison.
|
|
16
|
+
*/
|
|
17
|
+
readonly factory: () => Cache | Promise<Cache>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Options for {@link runCacheDifferentialTck}.
|
|
21
|
+
*/
|
|
22
|
+
export type CacheDifferentialTckOptions = {
|
|
23
|
+
/** Display name for the differential suite. */
|
|
24
|
+
readonly name: string;
|
|
25
|
+
/**
|
|
26
|
+
* Two or more caches to drive in lockstep and compare. The first entry
|
|
27
|
+
* is the reference; every other cache's observable `get()` snapshot
|
|
28
|
+
* must match it exactly after every operation.
|
|
29
|
+
*/
|
|
30
|
+
readonly caches: ReadonlyArray<DifferentialCache>;
|
|
31
|
+
/**
|
|
32
|
+
* Base PRNG seed. Workload `r` of {@link CacheDifferentialTckOptions.runs}
|
|
33
|
+
* is built from `seed + r`, so the campaign is reproducible. Default
|
|
34
|
+
* `0xcac`.
|
|
35
|
+
*/
|
|
36
|
+
readonly seed?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Number of distinct streams (cache keys) per workload. Kept small so a
|
|
39
|
+
* bounded cache never evicts during the comparison. Default `6`.
|
|
40
|
+
*/
|
|
41
|
+
readonly streams?: number;
|
|
42
|
+
/**
|
|
43
|
+
* How many independent randomized workloads to generate and compare,
|
|
44
|
+
* each from a distinct seed. Default `8`.
|
|
45
|
+
*/
|
|
46
|
+
readonly runs?: number;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Cross-implementation differential contract for the {@link Cache} port
|
|
50
|
+
* (#1057).
|
|
51
|
+
*
|
|
52
|
+
* Where {@link runCacheTck} pins each method's contract against a single
|
|
53
|
+
* implementation, this harness drives a **family of randomized, seeded
|
|
54
|
+
* workloads** (`set` / `invalidate` / `clear`) against two or more caches
|
|
55
|
+
* in lockstep and asserts their observable `get()` snapshot is identical
|
|
56
|
+
* after **every** operation. A cache that mishandles overwrite ordering,
|
|
57
|
+
* leaks an invalidated key, or clears partially diverges from the
|
|
58
|
+
* reference on the exact operation that broke it — with the seed in the
|
|
59
|
+
* describe block for replay.
|
|
60
|
+
*
|
|
61
|
+
* Streams stay within the cache's capacity, so eviction (an adapter
|
|
62
|
+
* policy, not a contract guarantee) never enters the comparison.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* import { runCacheDifferentialTck } from "@rotorsoft/act-tck";
|
|
67
|
+
* import { InMemoryCache } from "@rotorsoft/act";
|
|
68
|
+
* import { RedisCache } from "../src/index.js";
|
|
69
|
+
*
|
|
70
|
+
* runCacheDifferentialTck({
|
|
71
|
+
* name: "InMemory vs Redis",
|
|
72
|
+
* caches: [
|
|
73
|
+
* { name: "InMemoryCache", factory: () => new InMemoryCache({ maxSize: 1000 }) },
|
|
74
|
+
* { name: "RedisCache", factory: () => new RedisCache({ url: process.env.REDIS_URL }) },
|
|
75
|
+
* ],
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare const runCacheDifferentialTck: (options: CacheDifferentialTckOptions) => void;
|
|
80
|
+
//# sourceMappingURL=cache-differential-tck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-differential-tck.d.ts","sourceRoot":"","sources":["../../src/cache-differential-tck.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAc,MAAM,sBAAsB,CAAC;AAI9D;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CAChD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAClD;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AA6FF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,2BAA2B,KACnC,IAsCF,CAAC"}
|
package/dist/@types/index.d.ts
CHANGED
|
@@ -59,16 +59,22 @@
|
|
|
59
59
|
* adapters keep passing until they explicitly opt in.
|
|
60
60
|
*/
|
|
61
61
|
export type { Cache, CacheEntry, Logger, Store, StoreNotification, } from "@rotorsoft/act/types";
|
|
62
|
+
export type { CacheDifferentialTckOptions, DifferentialCache, } from "./cache-differential-tck.js";
|
|
63
|
+
export { runCacheDifferentialTck } from "./cache-differential-tck.js";
|
|
62
64
|
export type { CacheTckOptions } from "./cache-tck.js";
|
|
63
65
|
export { runCacheTck } from "./cache-tck.js";
|
|
64
66
|
export type { CounterEvents } from "./fixtures/events.js";
|
|
65
67
|
export { COUNTER_EVENT_NAMES, CounterSchemas, Decremented, Incremented, Reset, } from "./fixtures/events.js";
|
|
66
68
|
export type { CommittedCounterEvent, CounterMessage, } from "./fixtures/helpers.js";
|
|
67
69
|
export { actor, collect, dec, inc, reset, uid, } from "./fixtures/helpers.js";
|
|
70
|
+
export type { DifferentialLogger, LoggerDifferentialTckOptions, } from "./logger-differential-tck.js";
|
|
71
|
+
export { runLoggerDifferentialTck } from "./logger-differential-tck.js";
|
|
68
72
|
export type { LoggerTckOptions } from "./logger-tck.js";
|
|
69
73
|
export { runLoggerTck } from "./logger-tck.js";
|
|
70
74
|
export type { StabilityTckOptions } from "./stability-tck.js";
|
|
71
75
|
export { runStabilityTck } from "./stability-tck.js";
|
|
76
|
+
export type { DifferentialStore, StoreDifferentialTckOptions, } from "./store-differential-tck.js";
|
|
77
|
+
export { runStoreDifferentialTck } from "./store-differential-tck.js";
|
|
72
78
|
export type { StorePropertyTckOptions } from "./store-property-tck.js";
|
|
73
79
|
export { runStorePropertyTck } from "./store-property-tck.js";
|
|
74
80
|
export type { StoreCapabilities, StoreTckOptions } from "./store-tck.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAOH,YAAY,EACV,KAAK,EACL,UAAU,EACV,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,WAAW,EACX,KAAK,GACN,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,qBAAqB,EACrB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,EACL,OAAO,EACP,GAAG,EACH,GAAG,EACH,KAAK,EACL,GAAG,GACJ,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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AAM,yBAAyB,CAAC;AAC9D,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Logger } from "@rotorsoft/act/types";
|
|
2
|
+
/**
|
|
3
|
+
* One {@link Logger} implementation to feed into
|
|
4
|
+
* {@link runLoggerDifferentialTck}. The harness drives the identical call
|
|
5
|
+
* sequence against all of them and compares the **portable** observable
|
|
6
|
+
* contract — robustness (does a call throw?) and structural conformance
|
|
7
|
+
* (is `level` a non-empty string, does `child()` satisfy the contract).
|
|
8
|
+
*/
|
|
9
|
+
export type DifferentialLogger = {
|
|
10
|
+
/** Display name used in assertion messages and the describe block. */
|
|
11
|
+
readonly name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Produces the logger under test. Called before each test; the harness
|
|
14
|
+
* owns its lifecycle (`dispose`).
|
|
15
|
+
*/
|
|
16
|
+
readonly factory: () => Logger;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Options for {@link runLoggerDifferentialTck}.
|
|
20
|
+
*/
|
|
21
|
+
export type LoggerDifferentialTckOptions = {
|
|
22
|
+
/** Display name for the differential suite. */
|
|
23
|
+
readonly name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Two or more loggers to drive in lockstep and compare. The first entry
|
|
26
|
+
* is the reference; every other logger must uphold the same portable
|
|
27
|
+
* observable contract under the identical call sequence.
|
|
28
|
+
*/
|
|
29
|
+
readonly loggers: ReadonlyArray<DifferentialLogger>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Cross-implementation differential contract for the {@link Logger} port
|
|
33
|
+
* (#1057).
|
|
34
|
+
*
|
|
35
|
+
* A logger has no portable return value to byte-compare — its output
|
|
36
|
+
* format is adapter-specific by design, which is exactly why
|
|
37
|
+
* {@link runLoggerTck} checks shape rather than bytes. The meaningful
|
|
38
|
+
* differential is therefore **robustness and structural parity**: driven
|
|
39
|
+
* through the identical call sequence (every level, both overloads, null
|
|
40
|
+
* and cyclic payloads, child spawning), do two implementations agree on
|
|
41
|
+
* what throws and what conforms? They must. A logger that throws on a
|
|
42
|
+
* cyclic payload the reference tolerates, or returns a non-conforming
|
|
43
|
+
* child, diverges from the reference vector.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { runLoggerDifferentialTck } from "@rotorsoft/act-tck";
|
|
48
|
+
* import { ConsoleLogger } from "@rotorsoft/act";
|
|
49
|
+
* import { PinoLogger } from "../src/index.js";
|
|
50
|
+
*
|
|
51
|
+
* runLoggerDifferentialTck({
|
|
52
|
+
* name: "Console vs Pino",
|
|
53
|
+
* loggers: [
|
|
54
|
+
* { name: "ConsoleLogger", factory: () => new ConsoleLogger({ level: "trace" }) },
|
|
55
|
+
* { name: "PinoLogger", factory: () => new PinoLogger({ level: "trace" }) },
|
|
56
|
+
* ],
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const runLoggerDifferentialTck: (options: LoggerDifferentialTckOptions) => void;
|
|
61
|
+
//# sourceMappingURL=logger-differential-tck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger-differential-tck.d.ts","sourceRoot":"","sources":["../../src/logger-differential-tck.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,MAAM,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACrD,CAAC;AAwDF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,4BAA4B,KACpC,IA+BF,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { Store } from "@rotorsoft/act/types";
|
|
2
|
+
/**
|
|
3
|
+
* One {@link Store} implementation to feed into
|
|
4
|
+
* {@link runStoreDifferentialTck}. The harness drops + seeds each store,
|
|
5
|
+
* replays the identical generated workload against all of them, then
|
|
6
|
+
* compares their normalized outputs.
|
|
7
|
+
*/
|
|
8
|
+
export type DifferentialStore = {
|
|
9
|
+
/** Display name used in assertion messages and the describe block. */
|
|
10
|
+
readonly name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Produces the store under test. Called once in `beforeAll`; the
|
|
13
|
+
* harness owns its lifecycle (`drop` + `seed`, then `dispose`).
|
|
14
|
+
*/
|
|
15
|
+
readonly factory: () => Store | Promise<Store>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Options for {@link runStoreDifferentialTck}.
|
|
19
|
+
*/
|
|
20
|
+
export type StoreDifferentialTckOptions = {
|
|
21
|
+
/** Display name for the differential suite. */
|
|
22
|
+
readonly name: string;
|
|
23
|
+
/**
|
|
24
|
+
* Two or more stores to drive in lockstep and compare. The first
|
|
25
|
+
* entry is the reference; every other store's normalized output must
|
|
26
|
+
* match it exactly. Pass `InMemoryStore` as the reference and the
|
|
27
|
+
* durable adapter(s) as the comparands.
|
|
28
|
+
*/
|
|
29
|
+
readonly stores: ReadonlyArray<DifferentialStore>;
|
|
30
|
+
/**
|
|
31
|
+
* Base PRNG seed. Workload `r` of {@link StoreDifferentialTckOptions.runs}
|
|
32
|
+
* is built from `seed + r`, so the whole fuzz campaign is reproducible:
|
|
33
|
+
* the same `seed` ⇒ the same family of workloads ⇒ any divergence is
|
|
34
|
+
* deterministically replayable. Default `0xac7`.
|
|
35
|
+
*/
|
|
36
|
+
readonly seed?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Number of distinct event-bearing streams per workload.
|
|
39
|
+
* Default `4`.
|
|
40
|
+
*/
|
|
41
|
+
readonly streams?: number;
|
|
42
|
+
/**
|
|
43
|
+
* How many independent randomized workloads to generate and compare,
|
|
44
|
+
* each from a distinct seed (`seed`, `seed + 1`, …, `seed + runs - 1`).
|
|
45
|
+
* More runs widen the slice of the input space the differential
|
|
46
|
+
* explores; fewer keep durable-adapter suites fast. Default `8`.
|
|
47
|
+
*/
|
|
48
|
+
readonly runs?: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Cross-adapter differential contract (#1030, fuzz workloads #1057).
|
|
52
|
+
*
|
|
53
|
+
* Adapters can drift in ways per-adapter cases don't catch — event
|
|
54
|
+
* ordering, the `with_snaps` snapshot floor, the exact shape of
|
|
55
|
+
* `query_stats` / `query_streams` output. This harness drives a **family
|
|
56
|
+
* of randomized, seeded workloads** (commits, inline snapshots, truncates,
|
|
57
|
+
* subscriptions) against every store in `options.stores`, then asserts
|
|
58
|
+
* their **normalized** outputs are byte-for-byte identical for every
|
|
59
|
+
* workload.
|
|
60
|
+
*
|
|
61
|
+
* Each workload is its own seeded plan (`seed`, `seed + 1`, …): the
|
|
62
|
+
* operation sequence — and even its length — varies by seed, so divergence
|
|
63
|
+
* is hunted across a slice of the input space rather than one fixed script.
|
|
64
|
+
* The seeds are deterministic, so a failing workload is always replayable.
|
|
65
|
+
*
|
|
66
|
+
* Normalization drops only the fields that legitimately differ between
|
|
67
|
+
* stores (absolute event ids, `created` timestamps, correlation/causation
|
|
68
|
+
* uuids) and keeps everything that defines correctness (stream, version,
|
|
69
|
+
* name, data, and emission order). A one-adapter `with_snaps` regression —
|
|
70
|
+
* the canonical failure mode — surfaces as a diff against the in-memory
|
|
71
|
+
* reference, with the offending seed in the describe block.
|
|
72
|
+
*
|
|
73
|
+
* Wire it with the in-memory store as the reference and one or more
|
|
74
|
+
* durable adapters as comparands:
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* import { runStoreDifferentialTck } from "@rotorsoft/act-tck";
|
|
79
|
+
* import { InMemoryStore } from "@rotorsoft/act";
|
|
80
|
+
* import { PostgresStore } from "../src/index.js";
|
|
81
|
+
*
|
|
82
|
+
* runStoreDifferentialTck({
|
|
83
|
+
* name: "InMemory vs Postgres",
|
|
84
|
+
* runs: 6, // durable adapter: fewer workloads keep the suite fast
|
|
85
|
+
* stores: [
|
|
86
|
+
* { name: "InMemoryStore", factory: () => new InMemoryStore() },
|
|
87
|
+
* { name: "PostgresStore", factory: () => new PostgresStore({ ... }) },
|
|
88
|
+
* ],
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare const runStoreDifferentialTck: (options: StoreDifferentialTckOptions) => void;
|
|
93
|
+
//# sourceMappingURL=store-differential-tck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-differential-tck.d.ts","sourceRoot":"","sources":["../../src/store-differential-tck.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAsB,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAYtE;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CAChD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAClD;;;;;OAKG;IACH,QAAQ,CAAC,I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