Rulvar API reference / @rulvar/store-conformance / RestorableEffectLaneStore
Interface: RestorableEffectLaneStore
Defined in: packages/store-conformance/src/effect-lane.ts:26
The store shape under test: the capability plus the restore verb.
Extends
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
effectLane | readonly | true | - | EffectLaneStore.effectLane | packages/core/dist/index.d.ts |
fencedWrites? | readonly | true | Fenced writes capability (the fenced run state RFC, phase 2), optional exactly like getMeta and leaseTtlMs: a store declaring fencedWrites: true PROMISES that every mutation carrying a lease (append, putMeta, delete) verifies it is the CURRENT holder for the run the mutation targets, atomically with the mutation itself, and rejects with the typed LeaseHeldError leaving nothing mutated when it is not (stale epoch, foreign owner, expired, or a lease whose runId is not the mutation's run). The engine threads the segment's lease into every one of these writes on a leased resume, so over a declaring store a superseded worker cannot overwrite run meta or delete run state, exactly as it already cannot append. A mutation carrying NO lease keeps the single-writer semantics unchanged. Stores written before this capability are unaffected: without the marker the extra argument is ignored and hosts know the surface is advisory. | EffectLaneStore.fencedWrites | packages/core/dist/index.d.ts |
leaseTtlMs? | readonly | number | Optional TTL introspection (v1.35.0 review P2-4): the configured lease ttl in milliseconds. A store exposing it lets createWorker VERIFY at construction that the worker's renew cadence matches the store's expiry instead of trusting two config sources to agree; stores without it are accepted with the worker's own ttl. | EffectLaneStore.leaseTtlMs | packages/core/dist/index.d.ts |
Methods
acquire()
acquire(runId, owner): Promise<Lease>;Defined in: packages/core/dist/index.d.ts
Parameters
| Parameter | Type |
|---|---|
runId | string |
owner | string |
Returns
Promise<Lease>
Inherited from
append()
append(
runId,
e,
lease?): Promise<void>;Defined in: packages/core/dist/index.d.ts
Parameters
| Parameter | Type |
|---|---|
runId | string |
e | JournalEntry |
lease? | Lease |
Returns
Promise<void>
Inherited from
bumpRestorationGeneration()
bumpRestorationGeneration(): Promise<number>;Defined in: packages/store-conformance/src/effect-lane.ts:27
Returns
Promise<number>
delete()
delete(runId, lease?): Promise<void>;Defined in: packages/core/dist/index.d.ts
Parameters
| Parameter | Type |
|---|---|
runId | string |
lease? | Lease |
Returns
Promise<void>
Inherited from
listRuns()
listRuns(f?): Promise<RunMeta[]>;Defined in: packages/core/dist/index.d.ts
Parameters
| Parameter | Type |
|---|---|
f? | RunFilter |
Returns
Promise<RunMeta[]>
Inherited from
load()
load(runId): Promise<JournalEntry[]>;Defined in: packages/core/dist/index.d.ts
Parameters
| Parameter | Type |
|---|---|
runId | string |
Returns
Promise<JournalEntry[]>
Inherited from
putMeta()
putMeta(m, lease?): Promise<void>;Defined in: packages/core/dist/index.d.ts
Parameters
| Parameter | Type |
|---|---|
m | RunMeta |
lease? | Lease |
Returns
Promise<void>
Inherited from
release()
release(l): Promise<void>;Defined in: packages/core/dist/index.d.ts
Parameters
| Parameter | Type |
|---|---|
l | Lease |
Returns
Promise<void>
Inherited from
renew()
renew(l): Promise<void>;Defined in: packages/core/dist/index.d.ts
Parameters
| Parameter | Type |
|---|---|
l | Lease |
Returns
Promise<void>
Inherited from
restorationGeneration()
restorationGeneration(): Promise<number>;Defined in: packages/core/dist/index.d.ts
The current restoration generation; 0 until a restore ever ran.
Returns
Promise<number>