Skip to main content
Version: Current

StoreCapabilities

@rotorsoft/act-root


@rotorsoft/act-root / act-tck/src / StoreCapabilities

Type Alias: StoreCapabilities

StoreCapabilities = object

Defined in: libs/act-tck/src/store-tck.ts:40

Optional features a Store implementation may or may not support. Default to false โ€” only enable a flag when the adapter exposes the corresponding surface and you want the TCK to cover it.

Propertiesโ€‹

concurrent_claim?โ€‹

readonly optional concurrent_claim?: boolean

Defined in: libs/act-tck/src/store-tck.ts:92

Adapter supports competing consumers โ€” two workers may call claim() concurrently and the store hands each stream to at most one of them (PostgreSQL via FOR UPDATE SKIP LOCKED; the in-memory store via single-threaded atomic claim). When true, the TCK runs the concurrency suite. Single-writer embedded stores (e.g. SQLite, where concurrent write transactions raise SQLITE_BUSY rather than serializing) leave this false: their deployment model is a single drain worker per database file.


lease_correlation?โ€‹

readonly optional lease_correlation?: boolean

Defined in: libs/act-tck/src/store-tck.ts:72

Adapter honours subscribe's optional correlator argument and answers correlating (#1532). When true, the TCK runs the correlation-lease suite โ€” exclusive acquisition, renewal by the same holder, re-acquisition after expiry, per-key independence, and the keyed checkpoint.

Optional because a store that ignores the argument simply lets every worker scan, which is the pre-#1532 behaviour and remains correct: the marks are idempotent, so the duplication is waste rather than error.


notify?โ€‹

readonly optional notify?: boolean

Defined in: libs/act-tck/src/store-tck.ts:53

Adapter implements Store.notify. When true, the TCK runs the cross-instance conformance cases: a listener receives commits from a sibling instance produced by the same factory, never its own commits (the port's self-filtering MUST), and exactly one notification per commit transaction carrying the full event batch. Requires the factory to produce instances sharing one backing store โ€” e.g. two PostgresStores on the same schema/table, or two withBroker decorators on one broker. True cross-process LISTEN/NOTIFY plumbing needs two processes and stays in the adapter's own suite.


pattern_claim_source?โ€‹

readonly optional pattern_claim_source?: boolean

Defined in: libs/act-tck/src/store-tck.ts:118

Adapter matches a pattern reaction source (one carrying regex metacharacters, e.g. the calculator's ^(A|B)$) as a full RegExp in claim()'s has-work probe, so a stream whose max event id exceeds the subscription watermark is claimed when its name matches the pattern. When true, the TCK runs the pattern-source claim suite. Literal sources stay exact everywhere regardless of this flag โ€” the fast, index-friendly path.

Stores that cannot run an arbitrary regex against candidate streams (e.g. SQLite, whose libsql build has no REGEXP and whose portable LIKE grammar cannot express alternation/grouping) leave this false and instead reject a non-portable claim source at subscribe time โ€” see rejects_nonportable_claim_source.


pii_isolation?โ€‹

readonly optional pii_isolation?: boolean

Defined in: libs/act-tck/src/store-tck.ts:81

Adapter supports sensitive-data isolation (#566): accepts the optional pii field on commit messages, returns it on load outputs, and implements Store.forget_pii. When true, the TCK runs the PII isolation suite โ€” commit-with-pii round-trip, commit-without-pii passthrough, forget_pii happy path, idempotency, and isolation across streams.


rejects_nonportable_claim_source?โ€‹

readonly optional rejects_nonportable_claim_source?: boolean

Defined in: libs/act-tck/src/store-tck.ts:128

Adapter cannot faithfully match every regex claim source, so it fails loud at registration: subscribe throws ValidationError for a source outside its portable subset (alternation/grouping like ^(A|B)$), rather than silently never claiming the stream. When true, the TCK runs the reject-at-subscribe case. Currently only SQLite sets this โ€” its message points operators to InMemory/PG for full regex claim sources.


restore?โ€‹

readonly optional restore?: boolean

Defined in: libs/act-tck/src/store-tck.ts:61

Adapter implements Store.restore. When true, the TCK runs the full restore suite โ€” empty-source / single-stream / multi-stream happy paths, ISO-string created, pre-existing wipe, subscription clearing, causation remap, and atomic rollback on mid-iteration throw.


source_matches?โ€‹

readonly optional source_matches?: boolean

Defined in: libs/act-tck/src/store-tck.ts:102

Adapter implements the QueryStreams.source_matches reverse- match filter โ€” "subscriptions whose stored source pattern matches at least one of these names" (name ~ source). When true, the TCK runs the source_matches suite. Stores that can't express reverse- regex (e.g. an anchor-aware LIKE approximation) leave it false; the close-cycle safety probe then falls back to an unfiltered scan, so correctness never depends on this flag โ€” only probe cost.


work_set?โ€‹

readonly optional work_set?: boolean

Defined in: libs/act-tck/src/store-tck.ts:144

Adapter honors the SubscribeInput.correlated_at work mark (#1485): subscribe applies it as GREATEST(correlated_at, N) and claim serves a marked stream from the subscription row alone (at < correlated_at) instead of probing the event log. When true, the TCK runs the work-set suite โ€” mark-then-claim, monotonicity across positive/zero/negative values, ack retiring a stream from the claimable set and a later mark re-adding it, and the operator surfaces (reset, unblock, defer, prioritize) leaving the mark intact.

Deprecatedโ€‹

Ignored since #1488 โ€” the mark is the only eligibility rule, so this suite always runs. The field is kept so an adapter that still passes work_set: true keeps compiling.