StoreCapabilities
@rotorsoft/act-root / act-tck/src / StoreCapabilities
Type Alias: StoreCapabilities
StoreCapabilities =
object
Defined in: libs/act-tck/src/store-tck.ts:48
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?
readonlyoptionalconcurrent_claim?:boolean
Defined in: libs/act-tck/src/store-tck.ts:100
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?
readonlyoptionallease_correlation?:boolean
Defined in: libs/act-tck/src/store-tck.ts:80
Adapter honours subscribe's optional correlator argument and answers
correlating. 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 how every worker scanned before keyed checkpoints, and remains correct: the marks are idempotent, so the duplication is waste rather than error.
notify?
readonlyoptionalnotify?:boolean
Defined in: libs/act-tck/src/store-tck.ts:61
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 stream a commit appends to, carrying that stream's events.
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?
readonlyoptionalpattern_claim_source?:boolean
Defined in: libs/act-tck/src/store-tck.ts:119
Gates nothing. claim reads only the subscription row and never
matches a source; correlate does, so a pattern source (e.g. the
calculator's ^(A|B)$) works on every adapter that accepts it at
subscribe. Kept so specs that set it still compile. Stores that
cannot run an arbitrary regex reject a non-portable source at subscribe
instead; see rejects_nonportable_claim_source.
pii_isolation?
readonlyoptionalpii_isolation?:boolean
Defined in: libs/act-tck/src/store-tck.ts:89
Adapter supports sensitive-data isolation: 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?
readonlyoptionalrejects_nonportable_claim_source?:boolean
Defined in: libs/act-tck/src/store-tck.ts:129
Adapter cannot faithfully match every regex source when the drain
fetches a stream's events, 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
fetching them. 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 sources.
restore?
readonlyoptionalrestore?:boolean
Defined in: libs/act-tck/src/store-tck.ts:69
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?
readonlyoptionalsource_matches?:boolean
Defined in: libs/act-tck/src/store-tck.ts:110
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?
readonlyoptionalwork_set?:boolean
Defined in: libs/act-tck/src/store-tck.ts:145
Adapter honors the SubscribeInput.correlated_at work mark:
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: 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.